Syntax highlighting for Vim

Today I was looking for syntax highlighting for Vim on Mac OSX (10.5.6). A lot of sources only tell which rules there are to enable this, but a lot less tell where to add / edit these rules. I found this source to be very useful to do this. The first comment on the post is also very useful. By adding just two lines to my configuration file I had a nice highlighting with bold characters.

In short:

  1. Open command prompt (Terminal)
  2. Type ‘cd /usr/share/vim’
  3. Type ‘sudo vim vimrc’
  4. Type in your password
  5. Press ‘i’ to insert text in the file.
  6. Add the following lines to the file:
  7. ‘syntax on’  (this is for highlighting)
  8. ‘set background=dark’  (this makes the characters bold and better to read)
  9. Press escape
  10. Type ‘:x’ to save and exit
  11. Highlighting and bold characters are now enabled
Getagged ,

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *