Created
March 1, 2014 21:40
-
-
Save haya14busa/9297839 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
| " Yank with keeping cursor position in visual mode {{{ | |
| function! s:wrap_y(command) | |
| exec "normal! gv" . a:command | |
| exec "normal! gv\<ESC>" | |
| endfunction | |
| xnoremap <silent> y <ESC>:call <SID>wrap_y('y')<CR> | |
| xnoremap <silent> Y <ESC>:call <SID>wrap_y('Y')<CR> | |
| "}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment