If you open python file first time on your terminal, it will be plain black color text. To enable the color highlighting follow below steps -
- open the file - vi myProg.py
- hit esc (escape) - : syntax on
It will enable the color highlighting, which will be helpful to recognize any syntactical error.
To enable the highlighting permanent follow below steps -
- open the file - vi ~/.vimrc
- hit i > it will enable the insert mode
- type - syntax on
- hit esc (escape) - :wq
open the python file in vi and check the syntax.
good one.
ReplyDelete