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

starcat 2009-11-01 10:02:01
我喜欢用2,但默认值不是,每次打开都要重新设定,烦了……
...全文
238 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
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文件中设置.就可以了

33,321

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 新手乐园
社区管理员
  • 新手乐园社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧