mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
15
sources_non_forked/vim-go/autoload/go/textobj.vim
Normal file
15
sources_non_forked/vim-go/autoload/go/textobj.vim
Normal file
@ -0,0 +1,15 @@
|
||||
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
|
Reference in New Issue
Block a user