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:
- Open command prompt (Terminal)
- Type ‘cd /usr/share/vim’
- Type ‘sudo vim vimrc’
- Type in your password
- Press ‘i’ to insert text in the file.
- Add the following lines to the file:
- ‘syntax on’ (this is for highlighting)
- ‘set background=dark’ (this makes the characters bold and better to read)
- Press escape
- Type ‘:x’ to save and exit
- Highlighting and bold characters are now enabled