TomCho
TomCho

Reputation: 3517

definition for tabs in vimrc doesn't work as expected

I recently added a the following lines to my vimrc:

set noexpandtab
set copyindent
set preserveindent
set softtabstop=8
set shiftwidth=8
set tabstop=8

from what I read it was supposed to make tabs be understood as tabs (and not be replaced by spaces) and make them all 8 spaces long. However, my tabs are still 4 spaces long and they're being replaced by actual spaces, although backspacing does delete all 4 spaces.

The interesting part is that when I input them manually after the file is open everything works as expected. What am I missing here?

Probably doesn't matter but my vim version is 7.4.

Upvotes: 0

Views: 367

Answers (1)

TomCho
TomCho

Reputation: 3517

Following @Ben 's comment, I tried the command :verbose set expandtab? and apparently the definitions of vimrc were being overwritten in this case by the file /usr/share/vim/vim74/ftplugin/python.vim. So just commenting the indenting option lines in that file did the trick.

Upvotes: 1

Related Questions