Tonight, I took a look at Google App Engine after watching a video on it at our weekly brown bag lunch meetings and starting working through the Python tutorial. I quickly wanted Python syntax highlighting in Vim. Here’s how you can get it in Ubuntu as well.
It seems syntax highlighting doesn’t work in vim-tiny (which apparently is in Ubuntu by default), so I installed vim-full and vim-common.
sudo apt-get install vim vim-full vim-common
Next, we need to get the Python syntax package for Vim. I got it from vim.org. Save the python.vim file where you can find it.
Now, move python.vim to ~/.vim/syntax. You will most likely need to create these directories unless you have previous used Vim syntax packages.
Lastly, edit your ~/.vimrc file. Again, you will most like need to create this file. Add the following line:
syntax on
There, that should be all you need. I believe the colors are based on a black background, so you might need to do some tinkering if you use a a light background for your terminal. Hope this helps make your Python code a little easier to read in the future.
References:
http://www.vim.org/scripts/script.php?script_id=790
http://ubuntuforums.org/showthread.php?t=262750