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

Updated vimrc

This commit is contained in:
amix
2015-07-13 11:22:46 +01:00
parent 9a2843c2a5
commit d7752b59ae
301 changed files with 4699 additions and 7969 deletions

View File

@ -5,8 +5,9 @@ endif
function! go#rename#Rename(...)
let to = ""
if a:0 == 0
let ask = printf("vim-go: rename '%s' to: ", expand("<cword>"))
let to = input(ask)
let from = expand("<cword>")
let ask = printf("vim-go: rename '%s' to: ", from)
let to = input(ask, from)
redraw
else
let to = a:1
@ -14,12 +15,12 @@ function! go#rename#Rename(...)
"return with a warning if the bin doesn't exist
let bin_path = go#tool#BinPath(g:go_gorename_bin)
let bin_path = go#path#CheckBinPath(g:go_gorename_bin)
if empty(bin_path)
return
endif
let fname = resolve(expand('%:p:t'))
let fname = expand('%:p')
let pos = s:getpos(line('.'), col('.'))
let cmd = printf('%s -offset %s -to %s', shellescape(bin_path), shellescape(printf('%s:#%d', fname, pos)), shellescape(to))