Table of Contents
1. Context
Knowing the commonly used vim editor commands is absolute bliss. You can get your work done much faster with frequently used commands. The syntax highlighting feature of text editors marks keywords, operators, numbers, strings, etc. differently according to the programming language constructs. For developers, modern IDEs offer syntax highlighting. In this article, I’ll share the configuration to enable syntax highlighting in both vi
and vim
editors.
2. Enable Syntax Highlighting in vi and vim
To permanently enable syntax highlighting in vim
and vi
editors, open the file ~/.vimrc
and add the configuration syntax on
.
# Open ~/.vimrc in vi editor vi ~/.vimrc # Add option to enable syntax highlighting syntax on
3. Conclusion
In this article, you have learned how to enable syntax highlighting in the vim
and vi
editors. To work with the vi
editor like a pro, refer to this article: Work With vi Editor Like a Pro. To know how to go to a specific line in vi
editor, refer to this article: vi Show Line Numbers.
Join our list to get instant access to new articles and weekly newsletter.