我想让Vim在一段时间(15秒)后自动退出插入模式.这就是我所拥有的
我的. vimrc:
我的. vimrc:
" set 'updatetime' to 15 seconds when in insert mode au InsertEnter * let updaterestore = &updatetime | set updatetime=15000 au InsertLeave * let &updatetime = updaterestore " automatically leave insert mode after 'updatetime' milliseconds of inaction au CursorHoldI * stopinsert
我在MacVim中使用此代码段,但它不起作用.当我进入插入模式,我什么都不做,
Vim在15秒后离开插入模式.但是,如果我按Enter键或退格键,或者我进入插入模式
使用o / O,然后Vim立即离开插入模式,此时,即使我使用i进入插入模式
Vim立即回到普通模式.
我在Mac OS X 10.8.5上使用Homebrew安装了MacVim
任何想法为什么这不起作用?
编辑:这是我的MacVim版本,包含所有标志:
VIM - Vi IMproved 7.4 (2013 Aug 10,compiled Sep 29 2013 02:17:27) MacOS X (unix) version Included patches: 1-22 Compiled by Homebrew Huge version with MacVim GUI. Features included (+) or not (-): +acl +file_in_path +mouse_sgr +tag_binary +arabic +find_in_path -mouse_sysmouse +tag_old_static +autocmd +float +mouse_urxvt -tag_any_white +balloon_eval +folding +mouse_xterm +tcl +browse -footer +multi_byte +terminfo ++builtin_terms +fork() +multi_lang +termresponse +byte_offset +fullscreen -mzscheme +textobjects +cindent -gettext +netbeans_intg +title +clientserver -hangul_input +odbeditor +toolbar +clipboard +iconv +path_extra +transparency +cmdline_compl +insert_expand +perl +user_commands +cmdline_hist +jumplist +persistent_undo +vertsplit +cmdline_info +keymap +postscript +virtualedit +comments +langmap +printer +visual +conceal +libcall +profile +visualextra +cryptv +linebreak +python +viminfo +cscope +lispindent -python3 +vreplace +cursorbind +listcmds +quickfix +wildignore +cursorshape +localmap +reltime +wildmenu +dialog_con_gui -lua +rightleft +windows +diff +menu +ruby +writebackup +digraphs +mksession +scrollbind -X11 +dnd +modify_fname +signs -xfontset -ebcdic +mouse +smartindent +xim +emacs_tags +mouseshape -sniff -xsmp +eval +mouse_dec +startuptime -xterm_clipboard +ex_extra -mouse_gpm +statusline -xterm_save +extra_search -mouse_jsbterm -sun_workshop -xpm +farsi +mouse_netterm +Syntax system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" system gvimrc file: "$VIM/gvimrc" user gvimrc file: "$HOME/.gvimrc" 2nd user gvimrc file: "~/.vim/gvimrc" system menu file: "$VIMRUNTIME/menu.vim" fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim" Compilation: cc -c -I. -Iproto -DHAVE_CONfig_H -DFEAT_GUI_MACVIM -Wall -Wno-unkNown-pragmas -pipe -DMACOS_X_UNIX -no-cpp-precomp -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/System/Library/Frameworks/Tcl.framework/Headers -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_DARWIN_C_SOURCE=1 Linking: cc -L. -L. -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lncurses -liconv -framework Cocoa -fstack-protector -L/usr/local/lib -L/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -framework Python -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -framework Ruby
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。