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.
Syntax Highlighting in Vim inside iTerm2 : Old is Gold
Those who are landing as newcomers. Thing is that, there is a quite interesting guide we wrote before how to Customize iTerm2 with Color Schemes, Syntax Highlighting etc. These are must to follow for Syntax Highlighting in Vim inside iTerm2 to get the optimum looking result.
Steps for Syntax Highlighting in Vim inside iTerm2
Vim of command line version is located here :
You can change directory to that folder :
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) :
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 :Advertisement
Oh yes, here is the link to the needed text to be pasted :
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.