Configuring vim for syntax highlighting over ssh.
0
I’ve recently switched from textmate to MacVim and so far I’m loving it. It’s great since you can use vim on any platform and that allows me to use vim on my production server over ssh to editing config files and even fixing some minor bugs for some websites.
So wouldn’t it be great if I could use vims syntax highlighting? Here are the steps I used.
- Make sure that your current terminal is capable of displaying 256 colors. Since I use a Mac I had to make the switch from terminal.app to Iterm. In Iterm’s profiles I changed the terminal type to “xterm-256color”. Then I ran a color test that verified that I was using 256 color mode.
- On my machine I also had to set my TERM variable to “xterm-256color”.
- export TERM=xterm256color
- Then you just need to find a nice color scheme that only uses a 256 color palette. I choose summerfruit.
- And finally you have to turn on syntax highlighting in vim with (if it’s not already on):
- :syntax on













