For some reasons when I'm editing my ~/.config/nvim/init.vim, it adds 8 spaces even though I set set tabstop=4 on the file. Actually, :verbose set tabstop returns 4, so it should be 4 spaces.
I already read the questions here and here, and strangely, in Python I have no problem on adding 4 spaces.
What is causing the problem? How can I investigate the problem further and fix it up?
Tab. That is, unless you have some other settings with non-default values...particularaly'expandtabs'. And what do you have for'softtabstop','shiftwidth','cpoptions'while we're at it? This is only for*.vimfiles? Only when you simply hit Tab in Insert mode or other circumstances (e.g. autoindent scenarios)? – B Layer Jul 08 '18 at 22:27:setlocaland would show up as the value returned by:set tabstop... OP said that returns 4. – B Layer Jul 08 '18 at 22:44'smarttab', too @Blaszard. – B Layer Jul 08 '18 at 22:52softtabstopis 4, and I found that theshiftwidthis set to 8. Setting it to 4 solved the problem, thanks. – Blaszard Jul 08 '18 at 23:19tabstop,softtabstop, andshiftwidthis common enough to warrant a question? – Martin Tournoij Jul 09 '18 at 14:55shiftwidth): What issofttabstopused for? I'm surprised we don't have a question on this already! – Martin Tournoij Jul 09 '18 at 15:14'shiftwidth','softtabstop', et al. But there are already answers that discuss them, AFAIK. The only way to add value, IMO, is to totally rewrite the question here to ask specifically about the settings. Otherwise, there are no better odds of someone wanting to know about them finding this page than any of the others. (Probably lower odds at this point since the others surely have more votes.) Is this kind of situation that calls for a community q&a? (If there is such a thing.) Otherwise just dup this..? – B Layer Jul 09 '18 at 17:19