去除用gvim编辑文本时会出现的带~的备份文件

gvim version:8.0.96

1.找到~/vim/vim80/vimrc_example.vim文件,

2.进入vimrc_example.vim文件,找到如下几行内容(约在第20~23行),

if has("vms")
  set nobackup        " do not keep a backup file, use versions insteadelse
  set backup        " keep a backup file (restore to previous version)

3.将这4行的后2行注释掉,如下:

if has("vms")
  set nobackup        " do not keep a backup file, use versions instead
"else
  "set backup        " keep a backup file (restore to previous version)

4.然后保存vimrc_example.vim此文件,以后再用gvim编辑文本就不会出现带~的备份文件了。

posted on 2018-02-06 07:52  时空-幻梦  阅读(199)  评论(0编辑  收藏  举报

导航