Syntax highlighting in vim for python Syntax highlighting in vim for python python python

Syntax highlighting in vim for python


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. Verify that you have the latest version of vim, equally execute sudo apt-get install vim
  2. Modify the .vimrc file with the instruction echo "syntax on" >> ~/.vimrc
  3. Open the file with vi app.py. You will see the Syntax highlighting

enter image description here