mirror of
https://github.com/amix/vimrc
synced 2025-08-09 23:45:00 +08:00
Updated vim plugins
This commit is contained in:
@ -1,5 +1,9 @@
|
||||
" guru.vim -- Vim integration for the Go guru.
|
||||
|
||||
" don't spam the user when Vim is started in Vi compatibility mode
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" guru_cmd returns a dict that contains the command to execute guru. args
|
||||
" is dict with following options:
|
||||
" mode : guru mode, such as 'implements'
|
||||
@ -483,7 +487,7 @@ function! s:same_ids_highlight(exit_val, output, mode) abort
|
||||
" is redisplayed: e.g. :edit, :GoRename, etc.
|
||||
augroup vim-go-sameids
|
||||
autocmd!
|
||||
autocmd BufWinEnter <buffer> nested call go#guru#SameIds()
|
||||
autocmd BufWinEnter <buffer> nested call go#guru#SameIds(0)
|
||||
augroup end
|
||||
endif
|
||||
endfunction
|
||||
@ -515,11 +519,11 @@ endfunction
|
||||
|
||||
function! go#guru#ToggleSameIds() abort
|
||||
if go#guru#ClearSameIds() != 0
|
||||
call go#guru#SameIds()
|
||||
call go#guru#SameIds(1)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! go#guru#AutoToogleSameIds() abort
|
||||
function! go#guru#AutoToggleSameIds() abort
|
||||
if go#config#AutoSameids()
|
||||
call go#util#EchoProgress("sameids auto highlighting disabled")
|
||||
call go#guru#ClearSameIds()
|
||||
@ -586,4 +590,8 @@ function! go#guru#Scope(...) abort
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" restore Vi compatibility settings
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: sw=2 ts=2 et
|
||||
|
Reference in New Issue
Block a user