I love the syntax highlighting that VI/VIM provides. I refuse to use any text editor without it. It just makes it much easier on my eyes to navigate the code. It’s a very useful feature, and I have no idea why common pagers such as more or less don’t offer this.
- Open up a terminal and type cd. This will take you to your home directory in case you aren’t already.
- You need to edit your .bashrc or .bash_profile include this alias: alias vless=’vim -u /usr/share/vim/vim71/macros/less.vim’. You will most likely have to modify that path depending on your system, but it should always start with /usr/share/vim.
- Save and close, then type “. .bashrc” or “. .bash_profile” to re-read the file and have the alias take effect.