Skip to content

Instantly share code, notes, and snippets.

@hotoo
Created August 19, 2010 05:54
Show Gist options
  • Select an option

  • Save hotoo/537155 to your computer and use it in GitHub Desktop.

Select an option

Save hotoo/537155 to your computer and use it in GitHub Desktop.
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
@hotoo
Copy link
Author

hotoo commented Aug 19, 2010

vim 7.3 已经支持 +cursorbind 功能,所以上面用来同步两边光标的代码可以去掉了。
这里仅做一个记录。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment