You are not logged in.
I'm getting to know Vim and am trying to set my tabstop settings in ~/.vimrc. I've added the lines below:
set autoindent " always set autoindenting on
set tabstop=4
set shiftwidth=4
set noexpandtab
set softtabstop=4
Yet when i start Vim and type 'set tabstop' it still reports back 8, so the settings above apparently don't work. If i 'set tabstop=4' from within Vim it works fine, just only for the current session.
Other settings in .vimrc are read okay, so i don't think the problem lies there.
system vimrc file: "/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Any ideas?
Last edited by litemotiv (2009-05-20 14:28:36)
ᶘ ᵒᴥᵒᶅ
Offline
Any chance it's a .virc / .vimrc / .gvimrc or /root/.virc etc. mismatch?
~/vi(m)rc doesn't work, but ~/.vi(m)rc does - mind the dot :-)
Offline
Any chance it's a .virc / .vimrc / .gvimrc or /root/.virc etc. mismatch?
~/vi(m)rc doesn't work, but ~/.vi(m)rc does - mind the dot :-)
No i don't think so:
[ollie@arch ~]% ls .v*
.viminfo .vimrc
I also have some other settings in the file like 'set number' and a colorscheme, that do get loaded..
ᶘ ᵒᴥᵒᶅ
Offline
You could try using setlocal with autocmd, ie
autocmd FileType text setlocal textwidth=76 tabstop=4
Offline
Does the `tabstop' have incorrect value for all file types?
Maybe it is overriden by a plugin?
Offline
Remove your configs, start from a clean slate (or the defaults) and add your settings one-by-one.
I have a pretty much vanilla .virc and it just works.
Offline
got it! bit stoopid from my side i guess, i hadn't noticed my commands were placed:
if has("autocmd")
else
<-- here -->
endif
thanks for the suggestions above, i'll mark this solved.
ᶘ ᵒᴥᵒᶅ
Offline