1. vim -u /path/to/vimrc 这样可指定配置文件,做 bash 的 alias 时有用,但是读取配置之后的初始化动作就跳过了 (:h initialization),会导致很多 feature 被关闭,解决办法是 set nocp (nocompatible)。
2. 打开文件时光标跳到最后编辑的位置,google 来的,看不懂 :),但是真的很方便:
" Open a file at the last edited location
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g'\"" | endif
0 Comments so far