-
-
Save esquifit/e8eb85e48f3d76fa56aae0ef823149ca to your computer and use it in GitHub Desktop.
Commands to append after (and insert before) any text object. http://redd.it/1z93ww
This file contains 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
nnoremap <silent> <Leader>a :set opfunc=<SID>Append<CR>g@ | |
nnoremap <silent> <Leader>i :set opfunc=<SID>Insert<CR>g@ | |
fun! s:Append(type,...) | |
call feedkeys( a:type == 'char' ? "`]a" : "`]o" , 'tn') | |
endf | |
fun! s:Insert(type,...) | |
call feedkeys( a:type == 'char' ? "`[i" : "`[O" , 'tn') | |
endf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment