I have a stupid question but I am stuck. I do set set ts=4 in my .vimrc file, but it looks not work. Open a new file, tab is still extended as 3 spaces. And under command mode, "set ts" got a "tabstop=3". Is there a final file like .vimrc that overwrite my ts?
Even I type :set ts=4, in vim, when I type tab, it only has 3 spaces in length.
Here is my suspicious options that cause this annoying result in my .vimrc
set autoindent
set shiftwidth=4
set softtabstop=4
set backspace=2
Thanks.
The shiftwidth parameter controls your indentation size; if you want four space indents, use :set shiftwidth=4 , or the abbreviation :set sw=4 . If only this is done, then indentation will be created using a mixture of spaces and tabs, because noexpandtab is the default.
Opening vimrc Using file name completion, you could type :e $M then press Tab until you see the desired variable. If you only want to see the path, type :echo $M then press Tab to see the variable, and press Enter. In gvim, the Edit menu includes "Startup Settings" which will use $MYVIMRC to edit your vimrc file.
Try this:
:verbose set tabstop?
in vim, it will tell you where the tabstop
option value is coming from.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With