Syntax highlighting in vim for python


How do I do I set the syntax highlighting in Vim 7 for python?

I would like to set my own colorschemes, and syntax highlighting for a type of code file.

12/25/2013 7:56:15 PM

Accepted Answer

The command to enable syntax highlighting in vim is :syntax on, if you want it to be active everytime you launch vim, just add a line containing syntax on in your .vimrc file.

1/20/2011 11:37:03 AM

Syntax highlighting in vim for python (target is Ubuntu 12.10)

Here is a walkthrough on how to setup syntax highlighting in Python for Ubuntu 12.10. What you see is what you get:

enter image description here

Once you get the hang of how to inject a color scheme and syntax highlighting into your vi editor for a particular user, then you can customize it

There are hundreds of fashionable color schemes here:

Pick one that you like. Then download the python.vim and foobarcolorscheme9000.vim files and put them in the right spot as defined here: Set the appropriate commands in the ~/.vimrc and logout login.

Page listing most useful and fashionable python Color schemes:

Then you could try programming in VimL script language yourself.

Learn to edit the code that causes vim syntax highlighting to work. Make it better than it ever was.

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow