3

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.

2
  • Aside: "range", "open", and "float" are not Python keywords. They are, however, the names of builtin functions. Commented Oct 15, 2015 at 21:29
  • Have you tried the Vim docs? Commented Oct 15, 2015 at 21:32

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.