vim記住上次編輯和瀏覽位置


在用戶自己的目錄下的.vimrc中添加,

 1 "remember last update or view postion"
 2  " Only do this part when compiled with support for autocommands 
 3  if has("autocmd")
 4  " In text files, always limit the width of text to 78 characters 
 5  autocmd BufRead *.txt set tw=78
 6  " When editing a file, always jump to the last cursor position 
 7  autocmd BufReadPost *
 8  \ if line("'\"") > 0 && line ("'\"") <= line("$") |
 9  \ exe "normal g'\"" |
10  \ endif 
11  endif

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM