gvim 7.2怎么保存缩进宽度设置?

starcat 2009-11-01 10:02:01
我喜欢用2,但默认值不是,每次打开都要重新设定,烦了……
...全文
187 点赞 收藏 3
写回复
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
brookmill 2009-11-01
在你自己的home目录里面有个文件 ~/.vimrc
在里面加一行 set ts=2

回复
do_fork 2009-11-01
:h vimrc

                                                                *vimrc* *exrc*
A file that contains initialization commands is called a "vimrc" file.
Each line in a vimrc file is executed as an Ex command line. It is
sometimes also referred to as "exrc" file. They are the same type of
file, but "exrc" is what Vi always used, "vimrc" is a Vim specific
name. Also see |vimrc-intro|.

Recommended place for your personal initializations:
Unix $HOME/.vimrc
OS/2 $HOME/.vimrc or $VIM/.vimrc (or _vimrc)
MS-DOS and Win32 $HOME/_vimrc or $VIM/_vimrc
Amiga s:.vimrc or $VIM/.vimrc

If Vim was started with "-u filename", the file "filename" is used.
All following initializations until 4. are skipped.
"vim -u NORC" can be used to skip these initializations without
reading a file. "vim -u NONE" also skips loading plugins. |-u|
回复
vimrc文件中设置.就可以了
回复
发动态
发帖子
新手乐园
创建于2007-09-28

3.2w+

社区成员

C/C++ 新手乐园
申请成为版主
社区公告
暂无公告