Created
August 19, 2010 05:54
-
-
Save hotoo/537155 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if &diff | |
| let g:origCursorPos=getpos('.') | |
| autocmd WinEnter * :call setpos('.', g:origCursorPos) | |
| autocmd WinLeave * :let g:origCursorPos=getpos('.') | |
| nmap <F7> [c | |
| nmap <F8> ]c | |
| else | |
| map <F7> :cp<cr> | |
| map <F8> :cn<cr> | |
| endif |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vim 7.3 已经支持 +cursorbind 功能,所以上面用来同步两边光标的代码可以去掉了。
这里仅做一个记录。