Syntax Highlighting in Vim inside iTerm2

Advertisement

Syntax Highlighting in Vim inside iTerm2 requires few lines of coding. All PHP, HTML etc. files will open in translucent iterm2 with nice syntax highlighting. If you are landing from somewhere else and not our regular reader, you need some extra tips. First, cool down your head, finding any profile file, any odd named file will never be required. You will not need to fight to find an odd named file on your OS X 10.8.x for Syntax Highlighting in Vim inside iTerm2.

Steps for Syntax Highlighting in Vim inside iTerm2

If you run ls command, there will be two files. Great. One of them is vimrc file. In order to edit this file, open with sudo in vim (do not get confused with the command) :

Vim

1

sudo vim vimrc

And copy paste that all text like things from that vim-syntax.txt file linked below. Use i key to go in to insert mode to paste them. After pasting press Esc key. Then type :x and hit enter from keyboard. That is it. Open any HTML or some kind of file now :

I have not written it, where I found I forgot. One person asked on Facebook how to enable the Syntax Highlighting in Vim inside iTerm2, actually it was intended for him. The License of the code is MIT as I do not know the owner. Second version will be full GNU GPL. There is no reason to give me any credit for any means, its quite easy and honestly not coded by me.