Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 854
hidroto Avatar asked Jan 20 '11 11:01

hidroto


People also ask

How do I enable syntax highlighting in Vim?

After opening login.sh file in vim editor, press ESC key and type ':syntax on' to enable syntax highlighting. The file will look like the following image if syntax highlighting is on. Press ESC key and type, “syntax off” to disable syntax highlighting.

Can Vim be used for Python?

Vim (source code), short for Vi IMproved, is a configurable text editor often used as a Python development environment.

Does Vim support syntax highlighting?

VIM is an alternative and advanced version of VI editor that enables Syntax highlighting feature in VI. Syntax highlighting means it can show some parts of text in another fonts and colors. VIM doesn't show whole file but have some limitations in highlighting particular keywords or text matching a pattern in a file.

How do I highlight keywords in Vim?

Press 1 to highlight the current visually selected text, or the current word (if nothing is selected). Highlight group hl1 is used. Press 2 for highlight hl2 , 3 for highlight hl3 , etc. Press 0 to remove all highlights from the current visually selected text, or the current word.


1 Answers

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.

like image 96
mdeous Avatar answered Sep 21 '22 08:09

mdeous