Vim如何使您回到上次编辑文件时的状态?
我的工作计算机具有此功能,但我的家用计算机没有此功能!如何设置Vim记住上次编辑文件时位于文件的哪个部分?
编辑:更确切地说,我希望在打开新文件或启动时出现此行为。
我在我的.vimrc中有它,它可以工作:
" go to the position I was when last editing the file
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3484 次 |
最近记录: |