How do I set syntax highlighting in Vim 7 for python?
I would like to set my own color schemes and syntax highlighting for the code file type.
The command to enable syntax highlighting in vim :syntax on , if you want it to be active every time vim starts, just add the line containing syntax on to your .vimrc file.
:syntax on
syntax on
Here's a step-by-step guide on setting syntax highlighting in Python for Ubuntu 12.10. What you see is what you get:
https://github.com/sentientmachine/Pretty-Vim-Python/
Once you learn how to embed the color scheme and syntax highlighting in the vi editor for a specific user, you can configure it.
There are hundreds of trendy color schemes here: https://github.com/morhetz/gruvbox
Choose the one you like. Then download the python.vim and foobarcolorscheme9000.vim and put them in the right place as defined here: https://alvinalexander.com/linux/vi-vim-editor-color-scheme-colorscheme Set the appropriate commands to ~ /. vimrc and log out.
python.vim
foobarcolorscheme9000.vim
Page with a list of the most useful and trendy python color schemes:
stack overflow
Then you can try programming in the VimL scripting language yourself.
Learn how to edit code that makes vim syntax highlighting work. Do it better than ever.
http://en.wikibooks.org/wiki/Learning_the_vi_Editor/Vim/VimL_Script_language
Put the syntax on line in .vimrc .
.vimrc
sudo apt-get install vim
echo "syntax on" >> ~/.vimrc
vi app.py