I have set autoindentation, but vim somehow ignores it because :set autoindent?
says noautoindent
however the last file to have set autoindent is really my vimrc file according to :verbose set autoindent?
noautoindent
Last set from ~/myScripts/.vim/vimrc line 10
However set autoindent
is really in my vimrc file :
$ grep -n autoindent ~/myScripts/.vim/vimrc
10:set autoindent
EDIT0 : Lines between 9 and 11 of my ~/myScripts/.vim/vimrc
file :
$ sed -n 9,11p ~/myScripts/.vim/vimrc
set nohls
set autoindent
set noexpandtab tabstop=4 shiftwidth=4
EDIT1 : ~/.vim/vimrc
is pointing to my ~/myScripts/.vim/vimrc
:
$ readlink -f ~/.vim/vimrc
/home/sebastien/myScripts/.vim/vimrc
EDIT2: Thanks to filbranden, it seems that paste
and autoindent
are mutually exclusive :
The 'autoindent' option is reset when the 'paste' option is set and restored when 'paste' is reset.
Here's what I had in my ~/myScripts/.vim/vimrc
:
$ egrep -n "^set ((no)?autoindent|(no)?paste)" ~/myScripts/.vim/vimrc
10:set autoindent
67:set paste
\!
or something like that?:set paste?
enabled! Do:set nopaste
and that should restore autoindent to its original state!