mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated vimrc
This commit is contained in:
@ -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))
|
||||
|
||||
|
Reference in New Issue
Block a user