mirror of
				https://github.com/amix/vimrc
				synced 2025-10-31 06:33:35 +08:00 
			
		
		
		
	Updated plugins
This commit is contained in:
		| @ -59,7 +59,7 @@ Installation | ||||
|  | ||||
|     git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree | ||||
|  | ||||
| Then reload vim, run `:helptags ~/.vim/bundle/nerdtree/doc/`, and check out `:help NERD_tree.txt`. | ||||
| Then reload Vim, run `:helptags ~/.vim/bundle/nerdtree/doc/`, and check out `:help NERDTree.txt`. | ||||
|  | ||||
|  | ||||
| #### [apt-vim](https://github.com/egalpin/apt-vim) | ||||
|  | ||||
| @ -404,13 +404,27 @@ function! s:jumpToLastChild(node) | ||||
| endfunction | ||||
|  | ||||
| " FUNCTION: s:jumpToParent(node) {{{1 | ||||
| " moves the cursor to the parent of the current node | ||||
| " Move the cursor to the parent of the specified node. For a cascade, move to | ||||
| " the parent of the cascade's highest node. At the root, do nothing. | ||||
| function! s:jumpToParent(node) | ||||
|     if !empty(a:node.parent) | ||||
|         call a:node.parent.putCursorHere(1, 0) | ||||
|     let l:parent = a:node.parent | ||||
|  | ||||
|     " If "a:node" represents a directory, back out of its cascade. | ||||
|     if a:node.path.isDirectory | ||||
|         while !empty(l:parent) && !l:parent.isRoot() | ||||
|             if index(l:parent.getCascade(), a:node) >= 0 | ||||
|                 let l:parent = l:parent.parent | ||||
|             else | ||||
|                 break | ||||
|             endif | ||||
|         endwhile | ||||
|     endif | ||||
|  | ||||
|     if !empty(l:parent) | ||||
|         call l:parent.putCursorHere(1, 0) | ||||
|         call b:NERDTree.ui.centerView() | ||||
|     else | ||||
|         call nerdtree#echo("cannot jump to parent") | ||||
|         call nerdtree#echo('could not jump to parent node') | ||||
|     endif | ||||
| endfunction | ||||
|  | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| *NERD_tree.txt*   A tree explorer plugin that owns your momma! | ||||
| *NERDTree.txt*   A tree explorer plugin that owns your momma! | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -45,9 +45,14 @@ function! s:TreeDirNode.addChild(treenode, inOrder) | ||||
| endfunction | ||||
|  | ||||
| " FUNCTION: TreeDirNode.close() {{{1 | ||||
| " Closes this directory | ||||
| " Mark this TreeDirNode as closed. | ||||
| function! s:TreeDirNode.close() | ||||
|     let self.isOpen = 0 | ||||
|  | ||||
|     " Close all directories in this directory node's cascade. This is | ||||
|     " necessary to ensure consistency when cascades are rendered. | ||||
|     for l:dirNode in self.getCascade() | ||||
|         let l:dirNode.isOpen = 0 | ||||
|     endfor | ||||
| endfunction | ||||
|  | ||||
| " FUNCTION: TreeDirNode.closeChildren() {{{1 | ||||
| @ -78,19 +83,29 @@ function! s:TreeDirNode.createChild(path, inOrder) | ||||
| endfunction | ||||
|  | ||||
| " FUNCTION: TreeDirNode.displayString() {{{1 | ||||
| unlet s:TreeDirNode.displayString | ||||
| " Assemble and return a string that can represent this TreeDirNode object in | ||||
| " the NERDTree window. | ||||
| function! s:TreeDirNode.displayString() | ||||
|     let cascade = self.getCascade() | ||||
|     let rv = "" | ||||
|     for node in cascade | ||||
|         let rv = rv . node.path.displayString() | ||||
|     let l:result = '' | ||||
|  | ||||
|     " Build a label that identifies this TreeDirNode. | ||||
|     let l:label = '' | ||||
|     let l:cascade = self.getCascade() | ||||
|     for l:dirNode in l:cascade | ||||
|         let l:label .= l:dirNode.path.displayString() | ||||
|     endfor | ||||
|  | ||||
|     let sym = cascade[-1].isOpen ? g:NERDTreeDirArrowCollapsible : g:NERDTreeDirArrowExpandable | ||||
|     " Select the appropriate open/closed status indicator symbol. | ||||
|     if l:cascade[-1].isOpen | ||||
|         let l:symbol = g:NERDTreeDirArrowCollapsible | ||||
|     else | ||||
|         let l:symbol = g:NERDTreeDirArrowExpandable | ||||
|     endif | ||||
|  | ||||
|     let flags = cascade[-1].path.flagSet.renderToString() | ||||
|     let l:flags = l:cascade[-1].path.flagSet.renderToString() | ||||
|  | ||||
|     return sym . ' ' . flags . rv | ||||
|     let l:result = l:symbol . ' ' . l:flags . l:label | ||||
|     return l:result | ||||
| endfunction | ||||
|  | ||||
| " FUNCTION: TreeDirNode.findNode(path) {{{1 | ||||
| @ -400,25 +415,39 @@ function! s:TreeDirNode.New(path, nerdtree) | ||||
|     return newTreeNode | ||||
| endfunction | ||||
|  | ||||
| " FUNCTION: TreeDirNode.open([opts]) {{{1 | ||||
| " Open the dir in the current tree or in a new tree elsewhere. | ||||
| " | ||||
| " If opening in the current tree, return the number of cached nodes. | ||||
| unlet s:TreeDirNode.open | ||||
| " FUNCTION: TreeDirNode.open([options]) {{{1 | ||||
| " Open this directory node in the current tree or elsewhere if special options | ||||
| " are provided. Return 0 if options were processed. Otherwise, return the | ||||
| " number of new cached nodes. | ||||
| function! s:TreeDirNode.open(...) | ||||
|     let opts = a:0 ? a:1 : {} | ||||
|     let l:options = a:0 ? a:1 : {} | ||||
|  | ||||
|     if has_key(opts, 'where') && !empty(opts['where']) | ||||
|         let opener = g:NERDTreeOpener.New(self.path, opts) | ||||
|         call opener.open(self) | ||||
|     else | ||||
|         let self.isOpen = 1 | ||||
|         if self.children ==# [] | ||||
|             return self._initChildren(0) | ||||
|         else | ||||
|     " If special options were specified, process them and return. | ||||
|     if has_key(l:options, 'where') && !empty(l:options['where']) | ||||
|         let l:opener = g:NERDTreeOpener.New(self.path, l:options) | ||||
|         call l:opener.open(self) | ||||
|         return 0 | ||||
|     endif | ||||
|  | ||||
|     " Open any ancestors of this node that render within the same cascade. | ||||
|     let l:parent = self.parent | ||||
|     while !empty(l:parent) && !l:parent.isRoot() | ||||
|         if index(l:parent.getCascade(), self) >= 0 | ||||
|             let l:parent.isOpen = 1 | ||||
|             let l:parent = l:parent.parent | ||||
|         else | ||||
|             break | ||||
|         endif | ||||
|     endwhile | ||||
|  | ||||
|     let self.isOpen = 1 | ||||
|  | ||||
|     let l:numChildrenCached = 0 | ||||
|     if empty(self.children) | ||||
|         let l:numChildrenCached = self._initChildren(0) | ||||
|     endif | ||||
|  | ||||
|     return l:numChildrenCached | ||||
| endfunction | ||||
|  | ||||
| " FUNCTION: TreeDirNode.openAlong([opts]) {{{1 | ||||
| @ -463,35 +492,16 @@ function! s:TreeDirNode._openInNewTab() | ||||
| endfunction | ||||
|  | ||||
| " FUNCTION: TreeDirNode.openRecursively() {{{1 | ||||
| " Opens this treenode and all of its children whose paths arent 'ignored' | ||||
| " because of the file filters. | ||||
| " | ||||
| " This method is actually a wrapper for the OpenRecursively2 method which does | ||||
| " the work. | ||||
| " Open this directory node and any descendant directory nodes whose pathnames | ||||
| " are not ignored. | ||||
| function! s:TreeDirNode.openRecursively() | ||||
|     call self._openRecursively2(1) | ||||
| endfunction | ||||
|     silent call self.open() | ||||
|  | ||||
| " FUNCTION: TreeDirNode._openRecursively2() {{{1 | ||||
| " Opens this all children of this treenode recursively if either: | ||||
| "   *they arent filtered by file filters | ||||
| "   *a:forceOpen is 1 | ||||
| " | ||||
| " Args: | ||||
| " forceOpen: 1 if this node should be opened regardless of file filters | ||||
| function! s:TreeDirNode._openRecursively2(forceOpen) | ||||
|     if self.path.ignore(self.getNerdtree()) ==# 0 || a:forceOpen | ||||
|         let self.isOpen = 1 | ||||
|         if self.children ==# [] | ||||
|             call self._initChildren(1) | ||||
|         endif | ||||
|  | ||||
|         for i in self.children | ||||
|             if i.path.isDirectory ==# 1 | ||||
|                 call i._openRecursively2(0) | ||||
|     for l:child in self.children | ||||
|         if l:child.path.isDirectory && !l:child.path.ignore(l:child.getNerdtree()) | ||||
|             call l:child.openRecursively() | ||||
|         endif | ||||
|     endfor | ||||
|     endif | ||||
| endfunction | ||||
|  | ||||
| " FUNCTION: TreeDirNode.refresh() {{{1 | ||||
|  | ||||
| @ -2857,7 +2857,9 @@ Checker options~ | ||||
| This checker is initialised using the "makeprgBuild()" function and thus it | ||||
| accepts the standard options described at |syntastic-config-makeprg|. | ||||
|  | ||||
| Note~ | ||||
| Notes~ | ||||
|  | ||||
| Automatically fixing errors (option "--fix") is not supported. | ||||
|  | ||||
| You can also use "eslint_d" (https://github.com/mantoni/eslint_d.js), version | ||||
| 2.1.0 or later, instead of "ESLint". Just point 'g:syntastic_html_eslint_exec' | ||||
|  | ||||
| @ -19,7 +19,7 @@ if has('reltime') | ||||
|     lockvar! g:_SYNTASTIC_START | ||||
| endif | ||||
|  | ||||
| let g:_SYNTASTIC_VERSION = '3.8.0-60' | ||||
| let g:_SYNTASTIC_VERSION = '3.8.0-63' | ||||
| lockvar g:_SYNTASTIC_VERSION | ||||
|  | ||||
| " Sanity checks {{{1 | ||||
|  | ||||
| @ -724,7 +724,7 @@ function! s:Git(bang, args) abort | ||||
|     let git .= ' --no-pager' | ||||
|   endif | ||||
|   let args = matchstr(a:args,'\v\C.{-}%($|\\@<!%(\\\\)*\|)@=') | ||||
|   if exists(':terminal') | ||||
|   if exists(':terminal') && has('nvim') | ||||
|     let dir = s:repo().tree() | ||||
|     if expand('%') != '' | ||||
|       -tabedit % | ||||
|  | ||||
							
								
								
									
										1
									
								
								sources_non_forked/vim-go/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								sources_non_forked/vim-go/.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -4,3 +4,4 @@ doc/tags | ||||
| # Test specific files | ||||
| FAILED | ||||
| test.log | ||||
| scripts/vim-vimhelplint | ||||
|  | ||||
| @ -9,12 +9,15 @@ IMPROVEMENTS | ||||
| * `:GoBuild` now compiles the package with the `-i` flag added. This means that subsequent calls are much more faster due caching of packages [gh-1330] | ||||
| * `:GoCoverage` echos now the progress if `g:go_echo_command_info` is enabled [gh-1333] | ||||
| * Add `g:go_doc_max_height` setting to control the maximum height of the window created by `:GoDoc` and `K` mapping [gh-1335] | ||||
| * The `af` text object is able to include the assignment variable for anonymous functions. Can be disabled with `g:go_textobj_include_variable = 0` [gh-1345] | ||||
|  | ||||
| BUG FIXES: | ||||
|  | ||||
| * Fix obtaining package's import path for the current directory. This fixes some issues we had if the user was using multiple GOPATH's [gh-1321] | ||||
| * Fix documentation for vim-go & syntastic integration for errcheck using [gh-1323] | ||||
| * Fix showing an output if a test has finished when `:GoTest` is called [gh-1327] | ||||
| * Fix warning when goimports doesn't support srcdir [gh-1344] | ||||
| * Fix brokwn code folding with go_highlight_types [gh-1338] | ||||
|  | ||||
| ## 1.13 - (June 6, 2017) | ||||
|  | ||||
|  | ||||
| @ -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 | ||||
|  | ||||
| @ -690,8 +690,8 @@ CTRL-t | ||||
|       :GoAddTags xml db | ||||
| < | ||||
|     If [option] is passed it'll either add a new tag with an option or will | ||||
|     modify existing tags. An example of adding `omitempty` to all `json` fields | ||||
|     would be: | ||||
|     modify existing tags. An example of adding `omitempty` to all `json` | ||||
|     fields would be: | ||||
| > | ||||
|       :GoAddTags json,omitempty | ||||
| < | ||||
| @ -981,6 +981,8 @@ af            "a function", select contents from a function definition to the | ||||
|                closing bracket. If |'g:go_textobj_include_function_doc'| is | ||||
|                enabled it also includes the comment doc for a function | ||||
|                declaration. This text-object also supports literal functions. | ||||
|                If |'g:go_textobj_include_variable'| is enabled it also | ||||
|                includes the variable of an function assignment | ||||
|  | ||||
|                                                *go-v_if* *go-if* | ||||
| if            "inside a function", select contents of a function, | ||||
| @ -1348,6 +1350,13 @@ Consider the comment above a function to be part of the function when using | ||||
| the `af` text object and `[[` motion. By default it's enabled. > | ||||
|  | ||||
|   let g:go_textobj_include_function_doc = 1 | ||||
| < | ||||
|                                              *'g:go_textobj_include_variable'* | ||||
|  | ||||
| Consider the variable of an function assignment to be part of the anonymous | ||||
| function when using the `af` text object. By default it's enabled. > | ||||
|  | ||||
|   let g:go_textobj_include_variable = 1 | ||||
| < | ||||
|                                                   *'g:go_metalinter_autosave'* | ||||
|  | ||||
|  | ||||
| @ -32,3 +32,14 @@ if [ -f "FAILED" ]; then | ||||
|   exit 1 | ||||
| fi | ||||
| echo 2>&1 "PASS" | ||||
|  | ||||
| # Run vimhelplint | ||||
| [ -d vim-vimhelplint ] || git clone https://github.com/machakann/vim-vimhelplint | ||||
| echo "Running vimhelplint" | ||||
| lint=$(vim -esN --cmd 'set rtp+=./vim-vimhelplint' -c 'filetype plugin on' \ | ||||
|         -c 'e ../doc/vim-go.txt' -c 'verb VimhelpLintEcho' -c q 2>&1) | ||||
| if [ -n "$lint" ]; then  | ||||
|        exit 1 | ||||
| else | ||||
|        exit 0 | ||||
| fi | ||||
|  | ||||
| @ -321,7 +321,7 @@ hi def link    goField              Identifier | ||||
|  | ||||
| " Structs & Interfaces; | ||||
| if g:go_highlight_types != 0 | ||||
|   syn match goTypeConstructor      /\<\w\+{/he=e-1 | ||||
|   syn match goTypeConstructor      /\<\w\+{\@=/he=e-1  | ||||
|   syn match goTypeDecl             /\<type\>/ nextgroup=goTypeName skipwhite skipnl | ||||
|   syn match goTypeName             /\w\+/ contained nextgroup=goDeclType skipwhite skipnl | ||||
|   syn match goDeclType             /\<\(interface\|struct\)\>/ skipwhite skipnl | ||||
|  | ||||
| @ -80,7 +80,7 @@ snippet et "expect to be truthy (js)" | ||||
| snippet ef "expect to be falsy (js)" | ||||
| 	expect(${1:target}).toBeFalsy(); | ||||
|  | ||||
| snippet ed "expect to be defined (js)" | ||||
| snippet etbd "expect to be defined (js)" | ||||
| 	expect(${1:target}).toBeDefined(); | ||||
|  | ||||
| snippet eud "expect to be defined (js)" | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 amix
					amix