Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim only highlights part of the python syntax

Tags:

python

vim

I'm using the Vim editor to edit my python script on some remote clusters.I'm sure the Vim editors on both clusters have syntax highlight on. However, on one cluster I could see that all python keywords have been highlighted, while on the other one I could see only some of the python keywords are highlighted, and some keywords such as "range", "open" and "float" are not highlighted. Is there anything I can do in the .vimrc file such that all python keywords can be highlighted on that machine?

I don't know if this is related to the version of the Vim editor. On the machine that does not highlight all python keywords, the version of Vim is 7.2. While for the other machine, the version of Vim is 7.4.

Thanks.

like image 819
user2226358 Avatar asked Feb 18 '26 18:02

user2226358


1 Answers

This has been solved by adding "let python_highlight_builtins=1" in the .vimrc file.

like image 88
user2226358 Avatar answered Feb 21 '26 06:02

user2226358



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!