开发者

How to cleanup tabs with vim, adjust sts and sw?

I created c++ files in vim with these tab settings

set sts=4
set sw=4

meanwhile i use

set sts=3
set sw=3

and want to change all the files. Is this possible?

开发者_开发百科

EDIT

I go with indent, a few other options come handy.


I don't know of an automated way to do this with vim, but there's no reason you can't open up each of those files individually and use :retab! to have them use your new settings.

If you want to re-indent a whole bunch of files at once, you may look into something like GNU Indent.


Not VIM-specific, but if you want to batch process all the source files in one shot, the indent command line tool is incredibly useful.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜