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

Updated plugins

This commit is contained in:
amix
2015-12-08 10:20:04 -03:00
parent 768c72a3ed
commit 3b37bba6cd
239 changed files with 8132 additions and 3198 deletions

View File

@ -2,7 +2,7 @@ if !exists("g:go_gorename_bin")
let g:go_gorename_bin = "gorename"
endif
function! go#rename#Rename(...)
function! go#rename#Rename(bang, ...)
let to = ""
if a:0 == 0
let from = expand("<cword>")
@ -13,7 +13,6 @@ function! go#rename#Rename(...)
let to = a:1
endif
"return with a warning if the bin doesn't exist
let bin_path = go#path#CheckBinPath(g:go_gorename_bin)
if empty(bin_path)
@ -31,12 +30,23 @@ function! go#rename#Rename(...)
let clean = split(out, '\n')
if v:shell_error
redraw | echon "vim-go: " | echohl Statement | echon clean[0] | echohl None
let errors = go#tool#ParseErrors(split(out, '\n'))
call go#list#Populate(errors)
call go#list#Window(len(errors))
if !empty(errors) && !a:bang
call go#list#JumpToFirst()
endif
return
else
call go#list#Clean()
call go#list#Window()
redraw | echon "vim-go: " | echohl Function | echon clean[0] | echohl None
endif
" refresh the buffer so we can see the new content
" TODO(arslan): also find all other buffers and refresh them too. For this
" we need a way to get the list of changes from gorename upon an success
" change.
silent execute ":e"
endfunction