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 or comment out this line in the system-wide vimrc file (the ‘plugin’ word may or may not appear):

filetype plugin indent on

To remove the setting for your user only, add this line to ~/.vimrc:

filetype indent off

You will need to restart your Vim session to pick up the new settings.