1
0
Fork 0
mirror of synced 2024-11-01 00:08:57 -04:00
ultimate-vim/sources_non_forked/vim-go/autoload/go/textobj.vim

16 lines
328 B
VimL
Raw Normal View History

2015-01-18 07:58:28 -05:00
if !exists("g:go_textobj_enabled")
let g:go_textobj_enabled = 1
endif
function! go#textobj#Function(mode)
if search('^\s*func .*{$', 'Wce', line('.')) <= 0
\ && search('^\s*func .*{$', 'bWce') <= 0
return
endif
if a:mode == 'a'
normal! Va{V
else " a:mode == 'i'
normal! Vi{V
endif
endfunction