if exists("g:go_loaded_commands") finish endif let g:go_loaded_commands = 1 " Some handy plug mappings nnoremap (go-run) :call go#cmd#Run(expand('%')) nnoremap (go-build) :call go#cmd#Build('') nnoremap (go-install) :call go#cmd#Install() nnoremap (go-test) :call go#cmd#Test('') nnoremap (go-coverage) :call go#cmd#Coverage('') nnoremap (go-vet) :call go#cmd#Vet() nnoremap (go-files) :call go#tool#Files() nnoremap (go-deps) :call go#tool#Deps() nnoremap (go-info) :call go#complete#Info() nnoremap (go-import) :call go#import#SwitchImport(1, '', expand('')) nnoremap (go-implements) :call go#oracle#Implements(-1) nnoremap (go-rename) :call go#rename#Rename() nnoremap (go-def) :call go#def#Jump() nnoremap (go-def-vertical) :call go#def#JumpMode("vsplit") nnoremap (go-def-split) :call go#def#JumpMode("split") nnoremap (go-def-tab) :call go#def#JumpMode("tab") nnoremap (go-doc) :call go#doc#Open("leftabove new") nnoremap (go-doc-tab) :call go#doc#Open("tabnew") nnoremap (go-doc-vertical) :call go#doc#Open("vnew") nnoremap (go-doc-split) :call go#doc#Open("split") nnoremap (go-doc-browser) :call go#doc#OpenBrowser() " gorename command! -nargs=? GoRename call go#rename#Rename() " oracle command! -range=% GoImplements call go#oracle#Implements() " tool command! -nargs=0 GoFiles echo go#tool#Files() command! -nargs=0 GoDeps echo go#tool#Deps() command! -nargs=* GoInfo call go#complete#Info() " cmd command! -nargs=* -bang GoRun call go#cmd#Run(0,) command! -nargs=? -bang GoBuild call go#cmd#Build(0) command! -nargs=* GoInstall call go#cmd#Install() command! -nargs=* GoTest call go#cmd#Test() command! -nargs=* GoCoverage call go#cmd#Coverage() command! -nargs=0 GoVet call go#cmd#Vet() " -- play command! -nargs=0 -range=% GoPlay call go#play#Share(, , ) " -- def command! -nargs=* -range GoDef :call go#def#Jump() " -- doc command! -nargs=* -range -complete=customlist,go#package#Complete GoDoc call go#doc#Open('leftabove new', ) command! -nargs=* -range -complete=customlist,go#package#Complete GoDocBrowser call go#doc#OpenBrowser() " -- fmt command! -nargs=0 GoFmt call go#fmt#Format(-1) command! -nargs=0 GoImports call go#fmt#Format(1) " -- import command! -nargs=? -complete=customlist,go#package#Complete GoDrop call go#import#SwitchImport(0, '', ) command! -nargs=1 -complete=customlist,go#package#Complete GoImport call go#import#SwitchImport(1, '', ) command! -nargs=* -complete=customlist,go#package#Complete GoImportAs call go#import#SwitchImport(1, ) " -- lint command! GoLint call go#lint#Run() " -- errcheck command! GoErrCheck call go#errcheck#Run() " Disable all commands until they are fully integrated. " " command! -range=% GoOracleDescribe call go#oracle#Describe() " command! -range=% GoOracleCallees call go#oracle#Callees() " command! -range=% GoOracleCallers call go#oracle#Callers() " command! -range=% GoOracleCallgraph call go#oracle#Callgraph() " command! -range=% GoOracleCallstack call go#oracle#Callstack() " command! -range=% GoOracleFreevars call go#oracle#Freevars() " command! -range=% GoOraclePeers call go#oracle#Peers() " command! -range=% GoOracleReferrers call go#oracle#Referrers() " vim:ts=4:sw=4:et "