1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 09:35:01 +08:00

Updated plugins

This commit is contained in:
amix
2017-03-14 16:16:07 +01:00
parent 7b7a056680
commit 395c077dcb
15 changed files with 170 additions and 67 deletions

View File

@ -76,6 +76,28 @@ function! go#cmd#Build(bang, ...) abort
endfunction
" BuildTags sets or shows the current build tags used for tools
function! go#cmd#BuildTags(bang, ...) abort
if a:0
if a:0 == 1 && a:1 == '""'
unlet g:go_build_tags
call go#util#EchoSuccess("build tags are cleared")
else
let g:go_build_tags = a:1
call go#util#EchoSuccess("build tags are changed to: ". a:1)
endif
return
endif
if !exists('g:go_build_tags')
call go#util#EchoSuccess("build tags are not set")
else
call go#util#EchoSuccess("current build tags: ". g:go_build_tags)
endif
endfunction
" Run runs the current file (and their dependencies if any) in a new terminal.
function! go#cmd#RunTerm(bang, mode, files) abort
if empty(a:files)

View File

@ -46,8 +46,8 @@ function! s:guru_cmd(args) range abort
endif
" check for any tags
if exists('g:go_guru_tags')
let tags = get(g:, 'go_guru_tags')
if exists('g:go_build_tags')
let tags = get(g:, 'go_build_tags')
call extend(cmd, ["-tags", tags])
let result.tags = tags
endif
@ -619,24 +619,4 @@ function! go#guru#Scope(...) abort
endif
endfunction
function! go#guru#Tags(...) abort
if a:0
if a:0 == 1 && a:1 == '""'
unlet g:go_guru_tags
call go#util#EchoSuccess("guru tags is cleared")
else
let g:go_guru_tags = a:1
call go#util#EchoSuccess("guru tags changed to: ". a:1)
endif
return
endif
if !exists('g:go_guru_tags')
call go#util#EchoSuccess("guru tags is not set")
else
call go#util#EchoSuccess("current guru tags: ". g:go_guru_tags)
endif
endfunction
" vim: sw=2 ts=2 et

View File

@ -41,6 +41,12 @@ function! go#rename#Rename(bang, ...) abort
let cmd = [bin_path, "-offset", offset, "-to", to_identifier]
" check for any tags
if exists('g:go_build_tags')
let tags = get(g:, 'go_build_tags')
call extend(cmd, ["-tags", tags])
endif
if go#util#has_job()
call go#util#EchoProgress(printf("renaming to '%s' ...", to_identifier))
call s:rename_job({