To check which editor is set as default in your Debian distro you can do two things:
- in your favorite shell press CTRL+X+CTRL+E which will launch your default editor or
- use command update-alternatives –list-editor to list installed editors and you can expect result similar like this one:
# update-alternatives --list editor
To set for example vim.basic as your default editor you can use following command:
# update-alternatives --set editor /usr/bin/vim.basic
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in manual mode
Now if you again quick launch your editor with CTRL+X+CTRL+E you will notice that vim is invoked.
I do not use vim macros often, but they can be useful from time to time. But when I need them I always need to re-learn the shortcuts, so now I will summarize them in simple example which will create number list from 1. to 50.
Start your vim editor by typing:
Continue reading “Create incremental number list in vim with using simple macro”
I always forget how to do this and I need to write it down:
Turn on syntax highlighting with:
If highlighting looks to dark, then you are probably using dark background, so set it to achieve better readability:
To make these two changes permanent, edit ~/.vimrc file and enter:
To turn of syntax highlighting do:
To go back to light background do:
or delete the lines from ~/.vimrc file.