- Add to ~/.bashrc
- Install a 256 color VIM colorcheme, see desert256 for example.
- Add the following to ~/.vimrc:
set t_Co=256 set t_AB=^[[48;5;%dm set t_AF=^[[38;5;%dm
‘t_Co’ specifies exactly how many colours VIM can use. The other two lines seem to be Debian-specific color code escape sequences.
- If you want 256 color VIM for your root user when you sudo edit, then edit /usr/share/vim/vimrc and copy across your settings from your local ~/.vimrc and ~/.vim to this global environment.