Syntax Highlighting In VIm

Syntax highlighting in vim can be super tricky, by default a lot of desktop environments seem to have white terminals, which is a bit dumb as it’s easier to read white on black than black on white, as such the default vim syntax highlighting is often unreadable if you have a black terminal, giving blue comments on a black background and the like.

The fix for this is to set your vim background to dark, e.g.

set background=dark

You can either set this on a per session basis, but as I always use black terminals I’ve set this in my .vimrc file in my home directory.

Learning the vi and Vim Editors

Learning the vi And Vim Editors is a great book thoroughly covering both editors and the incredible power they contain. There’s a reason it’s been one of the most popular editors in the world since 1979!

About rus

Arrogant, narcissistic and imperatively logical. I first started coding in the mid 80s on an Amstrad 6128, entering games found in the back of Amstrad Action.After watching Hackers and falling in love with Angelina Jolie I installed Slackware 2.0 on a P200 in 1997and spent the next 6-7 years studying computery things at various colleges and universities.Several years later I can now be found in an office premises by day sat in front of a Macbook, using a Windows VM to manage Linux servers, or in a field by night, fire dancing and holding pyrotechnics casually in my hands whilst they explode.

, ,

  • James Grant

    If you’re in a hurry you can just do set bg=dark too