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

starcat 2009-11-01 10:02:01
我喜欢用2,但默认值不是,每次打开都要重新设定,烦了……
...全文
205 3 打赏 收藏 举报
写回复
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文件中设置.就可以了
  • 打赏
  • 举报
回复
相关推荐
发帖
新手乐园

3.3w+

社区成员

C/C++ 新手乐园
社区管理员
  • 新手乐园社区
加入社区
帖子事件
创建了帖子
2009-11-01 10:02
社区公告
暂无公告