Posts Tagged ‘vimrc’

Disabling auto indent in Vim

Posted: 12th October 2014 by Tim in Vim
Tags: , , , , , , ,

Auto indent is disabled by default in Vim, but some systems have this feature enabled in the system-wide vimrc file (found in /usr/share/vim/vimrc or a similar location). There are two ways to disable this: remove the system-wide setting, or remove the setting for your user only. To remove the setting system-wide, search for and remove […]

Vim, by default, will insert a tab character when you press the <tab> key. Some people prefer to use spaces instead, and the number of spaces preferred varies from person to person. To use spaces instead of tabs, you need to set tabstop, shiftwidth and expandtab in your .vimrc file. If, for example, you wanted […]

Highlighting tabs in Vim

Posted: 26th April 2012 by Tim in Vim
Tags: , , , , , , , ,

Some people like to indent code with tabs, and others like to indent with spaces. There are advantages and disadvantages to both. Regardless of which you prefer, it can be useful to see which indent style has been used. In Vim, you can do this by adding the following line to you .vimrc file (which […]