Thursday, July 18, 2013

How do you permanently set colors for VI/VIM editor?

1. Go to your HOME directory using the following command
cd ~
or
cd $HOME
2. Create a file ".vimrc" (if not present in HOME directory) by typing
vi .vimrc
3. Thereafter make the following entries in insert mode
set nu
syntax on
highlight normal cterfg=white ctermbg=black
4. Save and exit

To temporarily override the attributes within vi, you may use
:set bg = [dark | light]
:set background = [dark | light]
:synatx [on | off]
:colorscheme [nature | desert | torte | pablo | evening]

No comments :