mirror of
				https://github.com/amix/vimrc
				synced 2025-10-31 14:43:35 +08:00 
			
		
		
		
	Updated plugins
This commit is contained in:
		| @ -9,9 +9,7 @@ if exists("b:did_ftplugin") | ||||
| endif | ||||
| let b:did_ftplugin = 1 | ||||
|  | ||||
| if !exists("g:go_auto_type_info") | ||||
|     let g:go_auto_type_info = 0 | ||||
| endif | ||||
| let b:undo_ftplugin = "setl fo< com< cms<" | ||||
|  | ||||
| setlocal formatoptions-=t | ||||
|  | ||||
| @ -22,42 +20,27 @@ setlocal noexpandtab | ||||
|  | ||||
| compiler go | ||||
|  | ||||
| if !exists("g:go_doc_keywordprg_enabled") | ||||
|     let g:go_doc_keywordprg_enabled = 1 | ||||
| endif | ||||
| if g:go_doc_keywordprg_enabled | ||||
|     " keywordprg doesn't allow to use vim commands, override it | ||||
|     nnoremap <buffer> <silent> K :GoDoc<cr>  | ||||
| endif | ||||
|  | ||||
|  | ||||
| if !exists("g:go_def_mapping_enabled") | ||||
|     let g:go_def_mapping_enabled = 1 | ||||
| endif | ||||
| if g:go_def_mapping_enabled | ||||
|    nnoremap <buffer> <silent> gd :GoDef<cr> | ||||
| endif | ||||
|  | ||||
|  | ||||
| let b:undo_ftplugin = "setl fo< com< cms<" | ||||
|  | ||||
| " Set gocode completion | ||||
| setlocal omnifunc=go#complete#Complete | ||||
|  | ||||
| " GoInfo automatic update | ||||
| if g:go_auto_type_info != 0 | ||||
|     setlocal updatetime=300 | ||||
|     au! CursorHold *.go nested call go#complete#Info() | ||||
| if get(g:, "go_doc_keywordprg_enabled", 1) | ||||
|     " keywordprg doesn't allow to use vim commands, override it | ||||
|     nnoremap <buffer> <silent> K :GoDoc<cr> | ||||
| endif | ||||
|  | ||||
|  | ||||
| " autoload settings | ||||
| if !exists('g:go_fmt_autosave') | ||||
|     let g:go_fmt_autosave = 1 | ||||
| if get(g:, "go_def_mapping_enabled", 1) | ||||
|    nnoremap <buffer> <silent> gd :GoDef<cr> | ||||
| endif | ||||
|  | ||||
| if g:go_fmt_autosave | ||||
|     autocmd BufWritePre <buffer> call go#fmt#Format(-1) | ||||
| if get(g:, "go_textobj_enabled", 1) | ||||
|     onoremap <buffer> af :<c-u>call go#textobj#Function('a')<cr> | ||||
|     xnoremap <buffer> af :<c-u>call go#textobj#Function('a')<cr> | ||||
|     onoremap <buffer> if :<c-u>call go#textobj#Function('i')<cr> | ||||
|     xnoremap <buffer> if :<c-u>call go#textobj#Function('i')<cr> | ||||
| endif | ||||
|  | ||||
| if get(g:, "go_auto_type_info", 0) | ||||
|     setlocal updatetime=800 | ||||
| endif | ||||
|  | ||||
| " vim:ts=4:sw=4:et | ||||
|  | ||||
| @ -17,6 +17,7 @@ nnoremap <silent> <Plug>(go-info) :<C-u>call go#complete#Info()<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-rename) :<C-u>call go#rename#Rename()<CR> | ||||
|  | ||||
| @ -25,10 +26,10 @@ nnoremap <silent> <Plug>(go-def-vertical) :<C-u>call go#def#JumpMode("vsplit")<C | ||||
| 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-doc) :<C-u>call go#doc#Open("leftabove new")<CR> | ||||
| nnoremap <silent> <Plug>(go-doc-tab) :<C-u>call go#doc#Open("tabnew")<CR> | ||||
| nnoremap <silent> <Plug>(go-doc-vertical) :<C-u>call go#doc#Open("vnew")<CR> | ||||
| nnoremap <silent> <Plug>(go-doc-split) :<C-u>call go#doc#Open("split")<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> | ||||
| nnoremap <silent> <Plug>(go-doc-vertical) :<C-u>call go#doc#Open("vnew", "vsplit")<CR> | ||||
| nnoremap <silent> <Plug>(go-doc-split) :<C-u>call go#doc#Open("new", "split")<CR> | ||||
| nnoremap <silent> <Plug>(go-doc-browser) :<C-u>call go#doc#OpenBrowser()<CR> | ||||
|  | ||||
|  | ||||
| @ -37,6 +38,7 @@ command! -nargs=? GoRename call go#rename#Rename(<f-args>) | ||||
|  | ||||
| " oracle | ||||
| command! -range=% GoImplements call go#oracle#Implements(<count>) | ||||
| command! -range=% GoCallees call go#oracle#Callees(<count>) | ||||
|  | ||||
| " tool | ||||
| command! -nargs=0 GoFiles echo go#tool#Files() | ||||
| @ -45,7 +47,7 @@ command! -nargs=* GoInfo call go#complete#Info() | ||||
|  | ||||
| " cmd | ||||
| command! -nargs=* -bang GoRun call go#cmd#Run(<bang>0,<f-args>) | ||||
| command! -nargs=? -bang GoBuild call go#cmd#Build(<bang>0) | ||||
| command! -nargs=* -bang GoBuild call go#cmd#Build(<bang>0,<f-args>) | ||||
| command! -nargs=* GoInstall call go#cmd#Install(<f-args>) | ||||
| command! -nargs=* GoTest call go#cmd#Test(<f-args>) | ||||
| command! -nargs=* GoCoverage call go#cmd#Coverage(<f-args>) | ||||
| @ -58,7 +60,7 @@ command! -nargs=0 -range=% GoPlay call go#play#Share(<count>, <line1>, <line2>) | ||||
| command! -nargs=* -range GoDef :call go#def#Jump(<f-args>) | ||||
|  | ||||
| " -- doc | ||||
| command! -nargs=* -range -complete=customlist,go#package#Complete GoDoc call go#doc#Open('leftabove new', <f-args>) | ||||
| command! -nargs=* -range -complete=customlist,go#package#Complete GoDoc call go#doc#Open('new', 'split', <f-args>) | ||||
| command! -nargs=* -range -complete=customlist,go#package#Complete GoDocBrowser call go#doc#OpenBrowser(<f-args>) | ||||
|  | ||||
| " -- fmt | ||||
| @ -74,12 +76,11 @@ command! -nargs=* -complete=customlist,go#package#Complete GoImportAs call go#im | ||||
| command! GoLint call go#lint#Run() | ||||
|  | ||||
| " -- errcheck | ||||
| command! GoErrCheck call go#errcheck#Run() | ||||
| command! -nargs=? -complete=customlist,go#package#Complete GoErrCheck call go#errcheck#Run(<f-args>) | ||||
|  | ||||
| " Disable all commands until they are fully integrated. | ||||
| " | ||||
| " command! -range=% GoOracleDescribe call go#oracle#Describe(<count>) | ||||
| " command! -range=% GoOracleCallees  call go#oracle#Callees(<count>) | ||||
| " command! -range=% GoOracleCallers call go#oracle#Callers(<count>) | ||||
| " command! -range=% GoOracleCallgraph call go#oracle#Callgraph(<count>) | ||||
| " command! -range=% GoOracleCallstack call go#oracle#Callstack(<count>) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 amix
					amix