mirror of
				https://github.com/amix/vimrc
				synced 2025-10-31 14:43:35 +08:00 
			
		
		
		
	Updated plugins
This commit is contained in:
		| @ -184,7 +184,7 @@ function! s:fmt_cmd(bin_name, source, target) | ||||
|     if !exists('b:goimports_vendor_compatible') | ||||
|       let out = go#util#System(bin_path . " --help") | ||||
|       if out !~ "-srcdir" | ||||
|         call go#util#EchoWarning(printf("vim-go: goimports (%s) does not support srcdir. Update with: :GoUpdateBinaries", , bin_path)) | ||||
|         call go#util#EchoWarning(printf("vim-go: goimports (%s) does not support srcdir. Update with: :GoUpdateBinaries", bin_path)) | ||||
|       else | ||||
|         let b:goimports_vendor_compatible = 1 | ||||
|       endif | ||||
|  | ||||
| @ -6,6 +6,10 @@ if !exists("g:go_textobj_include_function_doc") | ||||
|   let g:go_textobj_include_function_doc = 1 | ||||
| endif | ||||
|  | ||||
| if !exists("g:go_textobj_include_variable") | ||||
|   let g:go_textobj_include_variable = 1 | ||||
| endif | ||||
|  | ||||
| " ( ) motions | ||||
| " { } motions | ||||
| " s for sentence | ||||
| @ -60,6 +64,16 @@ function! go#textobj#Function(mode) abort | ||||
|     " want's to include doc comments for function declarations | ||||
|     if has_key(info, 'doc') && g:go_textobj_include_function_doc | ||||
|       call cursor(info.doc.line, info.doc.col) | ||||
|     elseif info['sig']['name'] == '' && g:go_textobj_include_variable | ||||
|       " one liner anonymous functions | ||||
|       if info.lbrace.line == info.rbrace.line | ||||
|         " jump to first nonblack char, to get the correct column | ||||
|         call cursor(info.lbrace.line, 0 ) | ||||
|         normal! ^ | ||||
|         call cursor(info.func.line, col(".")) | ||||
|       else | ||||
|         call cursor(info.func.line, info.rbrace.col) | ||||
|       endif | ||||
|     else | ||||
|       call cursor(info.func.line, info.func.col) | ||||
|     endif | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 amix
					amix