changing tabstop has no effect #88

Closed
linuxfreakus opened this Issue May 17, 2012 · 13 comments

Comments

Projects
None yet
8 participants

in my .vimrc.local

set shiftwidth=3
set tabstop=3
set softtabstop=3

But when I hit tab, it still uses 4 spaces. The values are set, and set tabstop reports 3 but something else must be overriding it.

slajax commented Jul 4, 2012

I can confirm this as well only I edited the values in .vimrc directly.

I eventually realized it was because of the way it saves the settings for each buffer you open. If you delete all the buffer directory contents and then try it, it should work as expected using the .vimrc.local

slajax commented Jul 4, 2012

@linuxfreakus where is the buffer directory?

there are:

.vimbackup
.vimswap
.vimundo
.vimviews

I believe the .vimviews was the one which I deleted (it will be recreated when you start editing files again). It stores things like the last position in the file, etc..

slajax commented Jul 4, 2012

Awesome it worked.

You have to search for tabstop and shiftwidth in .vimrc, change them, remove .viewviews/* and it's fixed.

Good find @linuxfreakus

hevets commented Oct 10, 2012

Nice find!! this was driving me absolutely crazy :D

I've been wracking my brain trying to figure out why I could not get Python files to obey my tabstop settings and it turns out that it's because the python-mode plugin enforces PEP8 indenting. :h python-mode to figure out how to turn that off.

Ended up leaving it on in the end.

+1, I hit this too.

+1, ~/.vimview/ was the issue for me. And thank you for the incredible setup!

@ghost

ghost commented Jul 10, 2014

+1 this was very helpful to see in context. Thank you.

+1 This has been bugging me for like, a year! I am so happy now!

And 2 years later, hit this again, and found myself in the list of people who hit this. Amazing.

+1 again, I guess? Two years later this bit me again... ToT;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment