Vim 自動回到檔案最後讀取位置, 只要於 .vimrc 做下述設定即可:
if has("autocmd") autocmd BufRead *.txt set tw=78 autocmd BufReadPost * \ if line("'\"") > 0 && line ("'\"") <= line("$") | \ exe "normal g'\"" | \ endif endif
個人筆記, 記錄關於 系統、程式、新聞 與 日常生活 等資訊
Vim 自動回到檔案最後讀取位置, 只要於 .vimrc 做下述設定即可:
if has("autocmd") autocmd BufRead *.txt set tw=78 autocmd BufReadPost * \ if line("'\"") > 0 && line ("'\"") <= line("$") | \ exe "normal g'\"" | \ endif endif