Posted By

wolfie on 04/11/07


syntax vi highlighting

Versions (?)

Redefining colours in vi

 / Published in: Bash

Paste the contents of this into the file ~/.vimrc and you'll be able to redefine colours as you see fit. This also sets the background to be a default colourscheme of 'dark', with a tabstop of 4. Note that " is used for comments.

  1. set background=dark
  2. set tabstop=4
  3. syntax on
  4. " Determine terminal type
  5. let term=$TERM
  7. if term != "linux"
  8. colorscheme evening
  9. " Set colors for none linux (console) term
  10. "hi Comment ctermfg=DarkBlue guifg=Blue
  11. "hi Statement ctermfg=DarkRed guifg=Brown
  12. "hi Identifier ctermfg=Blue guifg=DarkCyan
  13. "hi PreProc ctermfg=Magenta guifg=Purple
  14. "hi Constant ctermfg=Black guifg=Magenta
  15. "hi Special ctermfg=DarkMagenta guifg=SlateBlue
  16. "hi Type ctermfg=DarkCyan guifg=SeaGreen
  17. "hi Ignore ctermfg=Gray guifg=bg
  18. hi Comment ctermfg=DarkGreen guifg=Green
  19. endif

Report this snippet  

You need to login to post a comment.