如何让 Vim 始终从我上次退出给定文件时所在的行开始?
将其放入您的 .vimrc 中:
" When editing a file, always jump to the last cursor position
au BufReadPost *
\ if ! exists("g:leave_my_cursor_position_alone") |
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif |
\ endif
那么你可以使用:let g:leave_my_cursor_position_alone=1
在运行时停用该功能。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)