mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -29,9 +29,13 @@ if get(g:, "go_doc_keywordprg_enabled", 1)
|
||||
endif
|
||||
|
||||
if get(g:, "go_def_mapping_enabled", 1)
|
||||
nnoremap <buffer> <silent> gd :GoDef<cr>
|
||||
nnoremap <buffer> <silent> <C-]> :GoDef<cr>
|
||||
nnoremap <buffer> <silent> <C-t> :<C-U>call go#def#StackPop(v:count1)<cr>
|
||||
" these are default Vim mappings, we're overriding them to make them
|
||||
" useful again for Go source code
|
||||
nnoremap <buffer> <silent> gd :GoDef<cr>
|
||||
nnoremap <buffer> <silent> <C-]> :GoDef<cr>
|
||||
nnoremap <buffer> <silent> <C-w><C-]> :<C-u>call go#def#Jump("split")<CR>
|
||||
nnoremap <buffer> <silent> <C-w>] :<C-u>call go#def#Jump("split")<CR>
|
||||
nnoremap <buffer> <silent> <C-t> :<C-U>call go#def#StackPop(v:count1)<cr>
|
||||
endif
|
||||
|
||||
if get(g:, "go_textobj_enabled", 1)
|
||||
|
@ -1,24 +1,27 @@
|
||||
" gorename
|
||||
" -- gorename
|
||||
command! -nargs=? GoRename call go#rename#Rename(<bang>0,<f-args>)
|
||||
|
||||
" oracle
|
||||
command! -nargs=* -complete=customlist,go#package#Complete GoOracleScope call go#oracle#Scope(<f-args>)
|
||||
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=% GoCallstack call go#oracle#Callstack(<count>)
|
||||
command! -range=% GoFreevars call go#oracle#Freevars(<count>)
|
||||
command! -range=% GoChannelPeers call go#oracle#ChannelPeers(<count>)
|
||||
command! -range=% GoReferrers call go#oracle#Referrers(<count>)
|
||||
command! -nargs=? GoOracleTags call go#oracle#Tags(<f-args>)
|
||||
" -- guru
|
||||
command! -nargs=* -complete=customlist,go#package#Complete GoGuruScope call go#guru#Scope(<f-args>)
|
||||
command! -range=% GoImplements call go#guru#Implements(<count>)
|
||||
command! -range=% GoCallees call go#guru#Callees(<count>)
|
||||
command! -range=% GoDescribe call go#guru#Describe(<count>)
|
||||
command! -range=% GoCallers call go#guru#Callers(<count>)
|
||||
command! -range=% GoCallstack call go#guru#Callstack(<count>)
|
||||
command! -range=% GoFreevars call go#guru#Freevars(<count>)
|
||||
command! -range=% GoChannelPeers call go#guru#ChannelPeers(<count>)
|
||||
command! -range=% GoReferrers call go#guru#Referrers(<count>)
|
||||
command! -nargs=? GoGuruTags call go#guru#Tags(<f-args>)
|
||||
|
||||
" tool
|
||||
" TODO(arslan): enable this once the function is implemented
|
||||
" command! -range=% GoSameIds call go#guru#SameIds(<count>)
|
||||
|
||||
" -- tool
|
||||
command! -nargs=0 GoFiles echo go#tool#Files()
|
||||
command! -nargs=0 GoDeps echo go#tool#Deps()
|
||||
command! -nargs=* GoInfo call go#complete#Info(0)
|
||||
|
||||
" cmd
|
||||
" -- cmd
|
||||
command! -nargs=* -bang GoBuild call go#cmd#Build(<bang>0,<f-args>)
|
||||
command! -nargs=* -bang GoGenerate call go#cmd#Generate(<bang>0,<f-args>)
|
||||
command! -nargs=* -bang -complete=file GoRun call go#cmd#Run(<bang>0,<f-args>)
|
||||
@ -29,15 +32,18 @@ command! -nargs=* -bang GoTestCompile call go#cmd#Test(<bang>0, 1, <f-args>)
|
||||
|
||||
" -- cover
|
||||
command! -nargs=* -bang GoCoverage call go#coverage#Buffer(<bang>0, <f-args>)
|
||||
command! -nargs=* -bang GoCoverageClear call go#coverage#Clear()
|
||||
command! -nargs=* -bang GoCoverageToggle call go#coverage#BufferToggle(<bang>0, <f-args>)
|
||||
command! -nargs=* -bang GoCoverageBrowser call go#coverage#Browser(<bang>0, <f-args>)
|
||||
|
||||
" -- play
|
||||
command! -nargs=0 -range=% GoPlay call go#play#Share(<count>, <line1>, <line2>)
|
||||
|
||||
" -- def
|
||||
command! -nargs=* -range GoDef :call go#def#Jump(<f-args>)
|
||||
command! -nargs=* -range GoDef :call go#def#Jump('')
|
||||
command! -nargs=? GoDefPop :call go#def#StackPop(<f-args>)
|
||||
command! -nargs=? GoDefJump :call go#def#StackJump(<f-args>)
|
||||
command! -nargs=? GoDefStack :call go#def#Stack(<f-args>)
|
||||
command! -nargs=? GoDefStackClear :call go#def#StackClear(<f-args>)
|
||||
|
||||
" -- doc
|
||||
command! -nargs=* -range -complete=customlist,go#package#Complete GoDoc call go#doc#Open('new', 'split', <f-args>)
|
||||
@ -67,4 +73,7 @@ if globpath(&rtp, 'plugin/ctrlp.vim') != ""
|
||||
command! -nargs=? -complete=dir GoDeclsDir call ctrlp#init(ctrlp#decls#cmd(1, <q-args>))
|
||||
endif
|
||||
|
||||
" -- impl
|
||||
command! -nargs=* -buffer -complete=customlist,go#impl#Complete GoImpl call go#impl#Impl(<f-args>)
|
||||
|
||||
" vim:ts=4:sw=4:et
|
||||
|
@ -25,6 +25,8 @@ nnoremap <silent> <Plug>(go-test-func) :<C-u>call go#cmd#TestFunc(!g:go_jump_to_
|
||||
nnoremap <silent> <Plug>(go-test-compile) :<C-u>call go#cmd#Test(!g:go_jump_to_error, 1)<CR>
|
||||
|
||||
nnoremap <silent> <Plug>(go-coverage) :<C-u>call go#coverage#Buffer(!g:go_jump_to_error)<CR>
|
||||
nnoremap <silent> <Plug>(go-coverage-clear) :<C-u>call go#coverage#Clear()<CR>
|
||||
nnoremap <silent> <Plug>(go-coverage-toggle) :<C-u>call go#coverage#BufferToggle(!g:go_jump_to_error)<CR>
|
||||
nnoremap <silent> <Plug>(go-coverage-browser) :<C-u>call go#coverage#Browser(!g:go_jump_to_error)<CR>
|
||||
|
||||
nnoremap <silent> <Plug>(go-files) :<C-u>call go#tool#Files()<CR>
|
||||
@ -32,21 +34,28 @@ nnoremap <silent> <Plug>(go-deps) :<C-u>call go#tool#Deps()<CR>
|
||||
nnoremap <silent> <Plug>(go-info) :<C-u>call go#complete#Info(0)<CR>
|
||||
nnoremap <silent> <Plug>(go-import) :<C-u>call go#import#SwitchImport(1, '', expand('<cword>'), '')<CR>
|
||||
|
||||
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-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>
|
||||
nnoremap <silent> <Plug>(go-referrers) :<C-u>call go#oracle#Referrers(-1)<CR>
|
||||
nnoremap <silent> <Plug>(go-implements) :<C-u>call go#guru#Implements(-1)<CR>
|
||||
nnoremap <silent> <Plug>(go-callees) :<C-u>call go#guru#Callees(-1)<CR>
|
||||
nnoremap <silent> <Plug>(go-callers) :<C-u>call go#guru#Callers(-1)<CR>
|
||||
nnoremap <silent> <Plug>(go-describe) :<C-u>call go#guru#Describe(-1)<CR>
|
||||
nnoremap <silent> <Plug>(go-callstack) :<C-u>call go#guru#Callstack(-1)<CR>
|
||||
xnoremap <silent> <Plug>(go-freevars) :<C-u>call go#guru#Freevars(0)<CR>
|
||||
nnoremap <silent> <Plug>(go-channelpeers) :<C-u>call go#guru#ChannelPeers(-1)<CR>
|
||||
nnoremap <silent> <Plug>(go-referrers) :<C-u>call go#guru#Referrers(-1)<CR>
|
||||
|
||||
" TODO(arslan): enable this once the function is implemented
|
||||
" nnoremap <silent> <Plug>(go-sameids) :<C-u>call go#guru#SameIds(-1)<CR>
|
||||
|
||||
nnoremap <silent> <Plug>(go-rename) :<C-u>call go#rename#Rename(!g:go_jump_to_error)<CR>
|
||||
|
||||
nnoremap <silent> <Plug>(go-def) :<C-u>call go#def#Jump()<CR>
|
||||
nnoremap <silent> <Plug>(go-def-vertical) :<C-u>call go#def#JumpMode("vsplit")<CR>
|
||||
nnoremap <silent> <Plug>(go-def-split) :<C-u>call go#def#JumpMode("split")<CR>
|
||||
nnoremap <silent> <Plug>(go-def-tab) :<C-u>call go#def#JumpMode("tab")<CR>
|
||||
nnoremap <silent> <Plug>(go-def) :<C-u>call go#def#Jump('')<CR>
|
||||
nnoremap <silent> <Plug>(go-def-vertical) :<C-u>call go#def#Jump("vsplit")<CR>
|
||||
nnoremap <silent> <Plug>(go-def-split) :<C-u>call go#def#Jump("split")<CR>
|
||||
nnoremap <silent> <Plug>(go-def-tab) :<C-u>call go#def#Jump("tab")<CR>
|
||||
|
||||
nnoremap <silent> <Plug>(go-def-pop) :<C-u>call go#def#StackPop()<CR>
|
||||
nnoremap <silent> <Plug>(go-def-stack) :<C-u>call go#def#Stack()<CR>
|
||||
nnoremap <silent> <Plug>(go-def-stack-clear) :<C-u>call go#def#StackClear()<CR>
|
||||
|
||||
nnoremap <silent> <Plug>(go-doc) :<C-u>call go#doc#Open("new", "split")<CR>
|
||||
nnoremap <silent> <Plug>(go-doc-tab) :<C-u>call go#doc#Open("tabnew", "tabe")<CR>
|
||||
|
6
sources_non_forked/vim-go/ftplugin/gohtmltmpl.vim
Normal file
6
sources_non_forked/vim-go/ftplugin/gohtmltmpl.vim
Normal file
@ -0,0 +1,6 @@
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal commentstring=<!--\ %s\ -->
|
Reference in New Issue
Block a user