Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions autoload/go/oracle.vim
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,6 @@ function! go#oracle#Callers(selected)
call s:qflistSecond(out)
endfunction

" Show the callgraph of the current program.
function! go#oracle#Callgraph(selected)
let out = s:RunOracle('callgraph', a:selected)
call s:qflistSecond(out)
endfunction

" Show path from callgraph root to selected function
function! go#oracle#Callstack(selected)
let out = s:RunOracle('callstack', a:selected)
Expand All @@ -189,27 +183,6 @@ endfunction
" Show all refs to entity denoted by selected identifier
function! go#oracle#Referrers(selected)
let out = s:RunOracle('referrers', a:selected)

" append line contents from Go source file for some messages:
" '...: referenced here'
" '...: reference to NAME'
let lines = split(out, "\n")
let extlines = []
for line in lines
if line =~# '\v: referenced here$|: reference to [^ :]*$'
let parts = split(line, ':')
" Note: we count -3 from end, to support additional comma in
" Windows-style C:\... paths
let filename = join(parts[0:-3], ':')
let linenum = parts[-2]
let extline = line . ': ' . readfile(filename, '', linenum)[linenum-1]
call add(extlines, extline)
else
call add(extlines, line)
endif
endfor
let out = join(extlines, "\n")

call s:qflistSecond(out)
endfunction

Expand Down
13 changes: 1 addition & 12 deletions doc/vim-go.txt
Original file line number Diff line number Diff line change
Expand Up @@ -315,18 +315,11 @@ COMMANDS *go-commands*
identifier), etc. Almost any piece of syntax may be described, and the
oracle will try to print all the useful information it can.

*:GoCallgraph*
:GoCallgraph

Shows the 'callgraph' for the entire program. For more info about the
indentation checkout the Oracle User Manual:
golang.org/s/oracle-user-manual

*:GoCallstack*
:GoCallstack

Shows 'callstack' relation for the selected function. An arbitrary path
from the root of the callgrap to the selected function is showed in a
from the root of the callgraph to the selected function is showed in a
quickfix list. This may be useful to understand how the function is
reached in a given program.

Expand Down Expand Up @@ -492,10 +485,6 @@ Show possible callers of selected function
Describe selected syntax: definition, methods, etc


*(go-callgraph)*

Show the callgraph of the current program.

*(go-callstack)*

Show path from callgraph root to selected function
Expand Down
2 changes: 0 additions & 2 deletions ftplugin/go/commands.vim
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ nnoremap <silent> <Plug>(go-implements) :<C-u>call go#oracle#Implements(-1)<CR>
nnoremap <silent> <Plug>(go-callees) :<C-u>call go#oracle#Callees(-1)<CR>
nnoremap <silent> <Plug>(go-callers) :<C-u>call go#oracle#Callers(-1)<CR>
nnoremap <silent> <Plug>(go-describe) :<C-u>call go#oracle#Describe(-1)<CR>
nnoremap <silent> <Plug>(go-callgraph) :<C-u>call go#oracle#Callgraph(-1)<CR>
nnoremap <silent> <Plug>(go-callstack) :<C-u>call go#oracle#Callstack(-1)<CR>
nnoremap <silent> <Plug>(go-freevars) :<C-u>call go#oracle#Freevars(-1)<CR>
nnoremap <silent> <Plug>(go-channelpeers) :<C-u>call go#oracle#ChannelPeers(-1)<CR>
Expand Down Expand Up @@ -50,7 +49,6 @@ command! -range=% GoImplements call go#oracle#Implements(<count>)
command! -range=% GoCallees call go#oracle#Callees(<count>)
command! -range=% GoDescribe call go#oracle#Describe(<count>)
command! -range=% GoCallers call go#oracle#Callers(<count>)
command! -range=% GoCallgraph call go#oracle#Callgraph(<count>)
command! -range=% GoCallstack call go#oracle#Callstack(<count>)
command! -range=% GoFreevars call go#oracle#Freevars(<count>)
command! -range=% GoChannelPeers call go#oracle#ChannelPeers(<count>)
Expand Down