clwen
clwen

Reputation: 20889

Vim Indentation Using ">"

I'm using vim under Mac OS 10.7 Terminal.

My .vimrc already specify the tabstop to be 4. However, if I use shift to select multiple lines and then using ">" to indent, it will give me a indention of 8 spaces instead of 4. How can I correct that to be 4?

Part of my .vimrc:

set cindent
set autoindent
set tabstop=4

Upvotes: 1

Views: 133

Answers (2)

Useless
Useless

Reputation: 67723

set shiftwidth=4

They're different things: tabstop says how many spaces wide to use when displaying a tab character, shiftwidth is for indentation.

Upvotes: 2

sth
sth

Reputation: 229583

The shiftwidth variable controls the indentation:

set shiftwidth=4

Upvotes: 5

Related Questions