\" to indent, it will give" />
开发者

Vim Indentation Using ">"

开发者 https://www.devze.com 2023-04-08 23:40 出处:网络
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 mu开发者_运维百科ltiple lines and then using \">\" to indent, it will give

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 mu开发者_运维百科ltiple 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


The shiftwidth variable controls the indentation:

set shiftwidth=4


set shiftwidth=4

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

0

精彩评论

暂无评论...
验证码 换一张
取 消