First two things to do using VIM: Syntax highlighting & Line Number Configuration in Mac

One of the easiest and most commonly recommended methods is by creating a file called .vimrc in your home directory. The one and only command you need to run is echo syntax on >> ~/.vimrc. The next time you access a non-txt file with vim, you will notice highlighted text.

echo "syntax on" >> ~/.vimrc

If you want line numbers to appear each time you launch Vim, add the appropriate command to your .vimrc (Vim configuration file). For example, to enable absolute line numbering, you would add the following:

vim ~/.vimrc
:set number


Popular Posts