I have most of the usual tab commands in ~/.vimrc:
set tabstop=4 set softtabstop=4 set shiftwidth=4 set expandtab
set breakindent set autoindent set smartindent.
There are no problems when I open a file that uses spaces over tabs; all tabs produce 4 spaces. But when I open a file someone else has written using tabs, the tabs produce a space of length 8 and stretches out the lines. I can remove this by typing :set tabstop=4 but why must I do this when that command is already loaded in ~/.vimrc? How can I make it automatically alter the tabs to length 4 upon opening the file?
tabstop. You can also use:verbose set tabstopto check where it was last set. – Martin Tournoij Sep 01 '17 at 02:32tabstopor where I can look this up? Does this apply to e.g.C,C++, orJavafiles? – domoremath Sep 01 '17 at 03:44ag setlocal /usr/share/vim/vim80/{ftplugin,indent,syntax}comes reasonably close (usegrep -rif you don't haveaginstalled). – Martin Tournoij Sep 01 '17 at 04:15