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

Hi, I'm Rus and after 10 years of Linux administration and software development, in September 2014 I quit my day job, sold all my stuff and moved to Thailand to live the good life.My new website, http://www.ruspow.com shows how I'm making money online as well as what life can be like when you're not sat behind a desk and are free to make your own decisions!

, ,

  • James Grant

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

banner