gvim 的备份设置不起作用

gvim 的备份设置不起作用

我在 win10 中安装了 gvim D:\Vim。并在 中添加了以下设置配置D:\Vim\_vimrc

set noundofile
set nobackup nowritebackup

然后:wq。但是,这个保存的nobackup配置仍然不起作用。当我关闭 vim 打开的文件时,仍然有一个filename~备份文件。我的配置有什么问题?

编辑:

输出:scriptnames

  1: D:\Vim\_vimrc
  2: D:\Vim\vim82\syntax\syntax.vim
  3: D:\Vim\vim82\syntax\synload.vim
  4: D:\Vim\vim82\syntax\syncolor.vim
  5: D:\Vim\vim82\filetype.vim
  6: D:\Vim\vim82\menu.vim
  7: D:\Vim\vim82\autoload\paste.vim
  8: D:\Vim\vim82\syntax\python.vim
  9: D:\Vim\vim82\vimrc_example.vim
 10: D:\Vim\vim82\defaults.vim
 11: D:\Vim\vim82\ftplugin.vim
 12: D:\Vim\vim82\indent.vim
 13: D:\Vim\vim82\syntax\nosyntax.vim
 14: D:\Vim\vim82\mswin.vim
 15: D:\Vim\vim82\plugin\getscriptPlugin.vim
 16: D:\Vim\vim82\plugin\gzip.vim
 17: D:\Vim\vim82\plugin\logiPat.vim
 18: D:\Vim\vim82\plugin\manpager.vim
 19: D:\Vim\vim82\plugin\matchparen.vim
 20: D:\Vim\vim82\plugin\netrwPlugin.vim
 21: D:\Vim\vim82\plugin\rrhelper.vim
 22: D:\Vim\vim82\plugin\spellfile.vim
 23: D:\Vim\vim82\plugin\tarPlugin.vim
 24: D:\Vim\vim82\plugin\tohtml.vim
 25: D:\Vim\vim82\plugin\vimballPlugin.vim
 26: D:\Vim\vim82\plugin\zipPlugin.vim
 27: D:\Vim\vim82\pack\dist\opt\matchit\plugin\matchit.vim
 28: D:\Vim\vim82\ftplugin\python.vim
 29: D:\Vim\vim82\indent\python.vim

输出:version

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled May  2 2021 19:00:02)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-2824
Compiled by mool@tororo
Huge version with GUI.  Features included (+) or not (-):
+acl                +comments           +file_in_path       +lispindent         +perl/dyn           +startuptime        +user_commands
+arabic             +conceal            +find_in_path       +listcmds           +persistent_undo    +statusline         +vartabs
+autocmd            +cryptv             +float              +localmap           +popupwin           -sun_workshop       +vertsplit
+autochdir          +cscope             +folding            +lua/dyn            -postscript         +syntax             +virtualedit
+autoservername     +cursorbind         -footer             +menu               +printer            +tag_binary         +visual
+balloon_eval       +cursorshape        +gettext/dyn        +mksession          +profile            -tag_old_static     +visualextra
-balloon_eval_term  +dialog_con_gui     -hangul_input       +modify_fname       +python/dyn         -tag_any_white      +viminfo
+browse             +diff               +iconv/dyn          +mouse              +python3/dyn        +tcl/dyn            +vreplace
++builtin_terms     +digraphs           +insert_expand      +mouseshape         +quickfix           -termguicolors      -vtp
+byte_offset        +directx            +ipv6               +multi_byte_ime/dyn +reltime            +terminal           +wildignore
+channel            -dnd                +job                +multi_lang         +rightleft          -termresponse       +wildmenu
+cindent            -ebcdic             +jumplist           +mzscheme/dyn       +ruby/dyn           +textobjects        +windows
+clientserver       +emacs_tags         +keymap             +netbeans_intg      +scrollbind         +textprop           +writebackup
+clipboard          +eval               +lambda             +num64              +signs              -tgetent            -xfontset
+cmdline_compl      +ex_extra           +langmap            +ole                +smartindent        +timers             -xim
+cmdline_hist       +extra_search       +libcall            +packages           +sound              +title              +xpm_w32
+cmdline_info       -farsi              +linebreak          +path_extra         +spell              +toolbar            -xterm_save
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$HOME\vimfiles\vimrc"
 3rd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
  system gvimrc file: "$VIM\gvimrc"
    user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
       defaults file: "$VIMRUNTIME\defaults.vim"
    system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /GF /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32  -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHA
NNEL -DFEAT_IPV6   -DFEAT_XPM_W32   -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /source-charset:utf-8 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG /arch:IA32 /Zl /M
T /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_MSWIN -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -
DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86t.dll\" -DDYNAMIC_TCL_VER=\"8.6\" -DFEAT
_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHO
N3 -DDYNAMIC_PYTHON3_DLL=\"python36.dll\" -DFEAT_MZSCHEME -I "E:\Racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracket3m_
a36fs8.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_a36fs8.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\
"perl524.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby240.dll\" -DRUBY_VERSION=24 -DFEAT_HUGE /Fd.\ObjGXOULYHTRZi386/ /Zi
Linking: link  /nologo /opt:ref /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib netapi32.lib uuid.li
b /machine:i386 gdi32.lib version.lib   winspool.lib comctl32.lib advapi32.lib shell32.lib netapi32.lib  /machine:i386  libcmt.lib oleaut32.lib user32
.lib  /nodefaultlib:lua53.lib  /STACK:8388608  /nodefaultlib:python27.lib /nodefaultlib:python36.lib   "E:\ActiveTcl\lib\tclstub86.lib" winmm.lib WSoc
k32.lib Ws2_32.lib xpm\x86\lib-vc14\libXpm.lib /PDB:gvim.pdb -debug

输出:echo $VIM

D:\Vim

相关内容