Created
May 9, 2014 15:17
-
-
Save stoeffel/dfd86fd956b38ef35e69 to your computer and use it in GitHub Desktop.
javascript function text-object for vim
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
function! TextObjectFunction() | |
normal! ]}% | |
execute "normal ?function\<CR>" | |
normal! vf{% | |
endfunction | |
vnoremap af :<C-U>silent! :call TextObjectFunction()<CR> | |
omap af :normal vaf<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hanged vim with following in status
:<C-U>silent! :call TextObjectFunction()<CR>
with following error in console:
2018-05-10 23:10:15.190 Vim[27120:3865526] *** -[NSMachPort handlePortMessage:]: dropping incoming DO message because the connection is invalid
Vim 8
MacVim