From 1886475fd2c3c5814e242d3324b358804bcafa1b Mon Sep 17 00:00:00 2001 From: Martin Lavoie Date: Mon, 27 Mar 2017 15:27:30 -0400 Subject: [PATCH 01/14] Make plugins_config use relative path --- vimrcs/plugins_config.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vimrcs/plugins_config.vim b/vimrcs/plugins_config.vim index 53d0539e..e67e5a07 100644 --- a/vimrcs/plugins_config.vim +++ b/vimrcs/plugins_config.vim @@ -8,8 +8,9 @@ """""""""""""""""""""""""""""" " => Load pathogen paths """""""""""""""""""""""""""""" -call pathogen#infect('~/.vim_runtime/sources_forked/{}') -call pathogen#infect('~/.vim_runtime/sources_non_forked/{}') +let s:vim_runtime = expand(':p:h')."/.." +call pathogen#infect(s:vim_runtime.'/sources_forked/{}') +call pathogen#infect(s:vim_runtime.'/sources_non_forked/{}') call pathogen#helptags() """""""""""""""""""""""""""""" From 0ce60b6ed7cfb1533e55822e7e016f9ff59b5c02 Mon Sep 17 00:00:00 2001 From: Amir Salihefendic Date: Sat, 1 Apr 2017 12:52:19 +0200 Subject: [PATCH 02/14] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 541f0d07..0fb0b7c4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # The Ultimate vimrc -Over the last 8 years I have used and tweaked Vim. This is my Ultimate vimrc. +Over the last 10 years I have used and tweaked Vim. This is the ultimate vimrc (or at least my version of it). There are two versions: @@ -73,8 +73,8 @@ I recommend reading the docs of these plugins to understand them better. Each of * [NERD Tree](https://github.com/scrooloose/nerdtree): A tree explorer plugin for vim * [ack.vim](https://github.com/mileszs/ack.vim): Vim plugin for the Perl module / CLI script 'ack' * [ag.vim](https://github.com/rking/ag.vim): A much faster Ack -* [ctrlp.vim](https://github.com/ctrlpvim/ctrlp.vim): Fuzzy file, buffer, mru and tag finder. In my config it's mapped to ``, because `` is used by YankRing -* [mru.vim](https://github.com/vim-scripts/mru.vim): Plugin to manage Most Recently Used (MRU) files. Includes my own fork which adds syntax highlighting to MRU. This plugin can be opened with `` +* [ctrlp.vim](https://github.com/ctrlpvim/ctrlp.vim): Fuzzy file, buffer, mru and tag finder. It's mapped to ``, because `` is used by YankRing +* [mru.vim](https://github.com/vim-scripts/mru.vim): Plugin to manage Most Recently Used (MRU) files. This plugin can be opened with `` * [open_file_under_cursor.vim](https://github.com/amix/open_file_under_cursor.vim): Open file under cursor when pressing `gf` * [vim-indent-object](https://github.com/michaeljsmith/vim-indent-object): Defines a new text object representing lines of code at the same indent level. Useful for python/vim scripts * [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors): Sublime Text style multiple selections for Vim, CTRL+N is remapped to CTRL+S (due to YankRing) @@ -90,7 +90,7 @@ Remove all clutter and focus only on the essential. Similar to iA Writer or Writ ## Included color schemes -* [peaksea](https://github.com/vim-scripts/peaksea): My favorite! +* [peaksea](https://github.com/vim-scripts/peaksea): The default * [vim-colors-solarized](https://github.com/altercation/vim-colors-solarized) * [vim-irblack](https://github.com/wgibbs/vim-irblack) * [mayansmoke](https://github.com/vim-scripts/mayansmoke) @@ -314,3 +314,4 @@ Do following: * Remove `~/.vim_runtime` * Remove any lines that reference `.vim_runtime` in your `~/.vimrc` + From 068316713be18cb9c8104c4b2fd9658f49ac96c9 Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 1 Apr 2017 13:19:29 +0200 Subject: [PATCH 03/14] Updated to the readme file --- README.md | 59 +++++++++++++++++++++++-------------------------------- 1 file changed, 25 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 0fb0b7c4..76f53e91 100644 --- a/README.md +++ b/README.md @@ -6,21 +6,21 @@ Over the last 10 years I have used and tweaked Vim. This is the ultimate vimrc ( There are two versions: -* **Basic**: If you want something small just copy [basic.vim](https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim) into your ~/.vimrc and you will have a great basic setup -* **Awesome**: This includes a ton of useful plugins, color schemes and configurations +* **The Basic**: If you want something small just copy [basic.vim](https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim) into your ~/.vimrc and you will have a good basic setup +* **The Awesome**: Includes a ton of useful plugins, color schemes and configurations -I would of course recommend using the awesome version.c +I would of course recommend using the awesome version. ## How to install the Awesome version? -The awesome version includes a lot of great plugins, configurations and color schemes that make Vim a lot better. To install it simply do following: +The awesome version includes a lot of great plugins, configurations and color schemes that make Vim a lot better. To install it simply do following from your terminal: git clone https://github.com/amix/vimrc.git ~/.vim_runtime sh ~/.vim_runtime/install_awesome_vimrc.sh -I also recommend using [Source Code Pro font from Adobe](https://typekit.com/fonts/source-code-pro) (it's free and awesome font for writing and programming). The Awesome vimrc is already setup to try to use it +I also recommend using [the Hack font](http://sourcefoundry.org/hack/) (it's free and awesome font designed for source code). The Awesome vimrc is already setup to try to use it. ## How to install the Basic version? -The basic version is basically just one file and no plugins. You can check out [basic.vim](https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim). +The basic version is basically just one file and no plugins. Simply copy [basic.vim](https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim) and paste it into your vimrc. This is useful to install on remote servers where you don't need many plugins and you don't do many edits. @@ -67,25 +67,24 @@ Distraction free mode using [goyo.vim](https://github.com/junegunn/goyo.vim) and I recommend reading the docs of these plugins to understand them better. Each of them provide a much better Vim experience! -* [pathogen.vim](https://github.com/tpope/vim-pathogen): Manages the runtime path of the plugins -* [snipMate.vim](https://github.com/garbas/vim-snipmate): snipMate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim -* [bufexplorer.zip](https://github.com/vim-scripts/bufexplorer.zip): Buffer Explorer / Browser. This plugin can be opened with `` +* [ag.vim](https://github.com/rking/ag.vim): Vim plugin for `the_silver_searcher` (ag) -- a wicked fast grep +* [bufexplorer.zip](https://github.com/vim-scripts/bufexplorer.zip): Quickly and easily switch between buffers. This plugin can be opened with `` +* [ctrlp.vim](https://github.com/ctrlpvim/ctrlp.vim): Fuzzy file, buffer, mru and tag finder. It's mapped to `` +* [goyo.vim](https://github.com/junegunn/goyo.vim) and [vim-zenroom2](https://github.com/amix/vim-zenroom2): +* [lightline.vim](https://github.com/itchyny/lightline.vim): A light and configurable statusline/tabline for Vim * [NERD Tree](https://github.com/scrooloose/nerdtree): A tree explorer plugin for vim -* [ack.vim](https://github.com/mileszs/ack.vim): Vim plugin for the Perl module / CLI script 'ack' -* [ag.vim](https://github.com/rking/ag.vim): A much faster Ack -* [ctrlp.vim](https://github.com/ctrlpvim/ctrlp.vim): Fuzzy file, buffer, mru and tag finder. It's mapped to ``, because `` is used by YankRing * [mru.vim](https://github.com/vim-scripts/mru.vim): Plugin to manage Most Recently Used (MRU) files. This plugin can be opened with `` * [open_file_under_cursor.vim](https://github.com/amix/open_file_under_cursor.vim): Open file under cursor when pressing `gf` +* [pathogen.vim](https://github.com/tpope/vim-pathogen): Manage your vim runtimepath +* [snipmate.vim](https://github.com/garbas/vim-snipmate): snipmate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim +* [syntastic](https://github.com/scrooloose/syntastic): Syntax checking hacks for vim +* [vim-commentary](https://github.com/tpope/vim-commentary): Comment stuff out. Use `gcc` to comment out a line (takes a count), `gc` to comment out the target of a motion. `gcu` uncomments a set of adjacent commented lines. +* [vim-expand-region](https://github.com/terryma/vim-expand-region): Allows you to visually select increasingly larger regions of text using the same key combination +* [vim-fugitive](https://github.com/tpope/vim-fugitive): A Git wrapper so awesome, it should be illegal * [vim-indent-object](https://github.com/michaeljsmith/vim-indent-object): Defines a new text object representing lines of code at the same indent level. Useful for python/vim scripts * [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors): Sublime Text style multiple selections for Vim, CTRL+N is remapped to CTRL+S (due to YankRing) -* [vim-expand-region](https://github.com/terryma/vim-expand-region): Allows you to visually select increasingly larger regions of text using the same key combination. -* [vim-fugitive](https://github.com/tpope/vim-fugitive): A Git wrapper so awesome, it should be illegal -* [goyo.vim](https://github.com/junegunn/goyo.vim) and [vim-zenroom2](https://github.com/amix/vim-zenroom2): -Remove all clutter and focus only on the essential. Similar to iA Writer or Write Room [Read more here](http://amix.dk/blog/post/19744) -* [vim-commentary](https://github.com/tpope/vim-commentary): Comment stuff out. Use `gcc` to comment out a line (takes a count), `gc` to comment out the target of a motion. `gcu` uncomments a set of adjacent commented lines. -* [syntastic](https://github.com/scrooloose/syntastic): Syntax checking hacks for vim * [vim-yankstack](https://github.com/maxbrunsfeld/vim-yankstack): Maintains a history of previous yanks, changes and deletes -* [lightline.vim](https://github.com/itchyny/lightline.vim): A light and configurable statusline/tabline for Vim +Remove all clutter and focus only on the essential. Similar to iA Writer or Write Room [Read more here](http://amix.dk/blog/post/19744) ## Included color schemes @@ -115,13 +114,11 @@ After you have installed the setup you can create **~/.vim_runtime/my_configs.vi map ct :cd ~/Desktop/Todoist/todoist map cw :cd ~/Desktop/Wedoist/wedoist -You can also install your own plugins, for instance, via pathogen we can install [vim-rails](https://github.com/tpope/vim-rails): +You can also install your own plugins, for instance, via pathogen you can install [vim-rails](https://github.com/tpope/vim-rails): cd ~/.vim_runtime git clone git://github.com/tpope/vim-rails.git sources_non_forked/vim-rails -Now you have vim-rails installed ;-) - ## Key Mappings @@ -195,13 +192,9 @@ Switch CWD to the directory of the open buffer: map cd :cd %:p:h:pwd -Open vimgrep and put the cursor in the right position: +Open `ag.vim` and put the cursor in the right position: - map g :vimgrep // **/*. - -Vimgreps in the current file: - - map :vimgrep // % + map g :Ag Remove the Windows ^M - when the encodings gets messed up: @@ -240,9 +233,9 @@ Visual mode pressing `*` or `#` searches for the current selection: vnoremap * :call VisualSelection('f') vnoremap # :call VisualSelection('b') -When you press gv you vimgrep after the selected text: +When you press gv you `ag.vim` after the selected text: - vnoremap gv :call VisualSelection('gv') + vnoremap gv :call VisualSelection('gv', '') When you press `r` you can search and replace the selected text: @@ -273,7 +266,7 @@ Bash like keys for the command line: cnoremap cnoremap -Write the file as sudo (only on Unix). Super useful when you open a file and you don't have permissions to save your changes. [Vim tip](http://vim.wikia.com/wiki/Su-write): +Write the file as sudo (works only on Unix). Super useful when you open a file and you don't have permissions to save your changes. [Vim tip](http://vim.wikia.com/wiki/Su-write): :W @@ -293,7 +286,7 @@ Shortcuts using `` instead of special chars ### Cope Do :help cope if you are unsure what cope is. It's super useful! -When you search with vimgrep, display your results in cope by doing: +When you search with `ag.vim`, display your results in cope by doing: `cc` To go to the next search result do: @@ -313,5 +306,3 @@ Vimscript mappings: Do following: * Remove `~/.vim_runtime` * Remove any lines that reference `.vim_runtime` in your `~/.vimrc` - - From 50ae0a55f681bf46eeb3ec0da9cbf92f49bcc3dc Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 1 Apr 2017 13:19:43 +0200 Subject: [PATCH 04/14] Removed ack.vim --- sources_non_forked/ack.vim/.gitignore | 1 - sources_non_forked/ack.vim/LICENSE | 89 ----- sources_non_forked/ack.vim/README.md | 161 --------- sources_non_forked/ack.vim/autoload/ack.vim | 246 -------------- sources_non_forked/ack.vim/doc/ack.txt | 315 ------------------ .../ack.vim/doc/ack_quick_help.txt | 15 - sources_non_forked/ack.vim/ftplugin/qf.vim | 9 - sources_non_forked/ack.vim/plugin/ack.vim | 83 ----- update_plugins.py | 1 - 9 files changed, 920 deletions(-) delete mode 100644 sources_non_forked/ack.vim/.gitignore delete mode 100644 sources_non_forked/ack.vim/LICENSE delete mode 100644 sources_non_forked/ack.vim/README.md delete mode 100644 sources_non_forked/ack.vim/autoload/ack.vim delete mode 100644 sources_non_forked/ack.vim/doc/ack.txt delete mode 100644 sources_non_forked/ack.vim/doc/ack_quick_help.txt delete mode 100644 sources_non_forked/ack.vim/ftplugin/qf.vim delete mode 100644 sources_non_forked/ack.vim/plugin/ack.vim diff --git a/sources_non_forked/ack.vim/.gitignore b/sources_non_forked/ack.vim/.gitignore deleted file mode 100644 index 6e92f57d..00000000 --- a/sources_non_forked/ack.vim/.gitignore +++ /dev/null @@ -1 +0,0 @@ -tags diff --git a/sources_non_forked/ack.vim/LICENSE b/sources_non_forked/ack.vim/LICENSE deleted file mode 100644 index 056ea36c..00000000 --- a/sources_non_forked/ack.vim/LICENSE +++ /dev/null @@ -1,89 +0,0 @@ -ack.vim is distributed under the same license terms as Vim itself, which you -can find in full with `:help license` within Vim, or copied in full herein. - -Copyright (c) 2007-2015 Antoine Imbert - and contributors. - -Maintainers may be contacted via GitHub Issues at: - - https://github.com/mileszs/ack.vim/issues - - -VIM LICENSE - -I) There are no restrictions on distributing unmodified copies of Vim except - that they must include this license text. You can also distribute - unmodified parts of Vim, likewise unrestricted except that they must - include this license text. You are also allowed to include executables - that you made from the unmodified Vim sources, plus your own usage - examples and Vim scripts. - -II) It is allowed to distribute a modified (or extended) version of Vim, - including executables and/or source code, when the following four - conditions are met: - 1) This license text must be included unmodified. - 2) The modified Vim must be distributed in one of the following five ways: - a) If you make changes to Vim yourself, you must clearly describe in - the distribution how to contact you. When the maintainer asks you - (in any way) for a copy of the modified Vim you distributed, you - must make your changes, including source code, available to the - maintainer without fee. The maintainer reserves the right to - include your changes in the official version of Vim. What the - maintainer will do with your changes and under what license they - will be distributed is negotiable. If there has been no negotiation - then this license, or a later version, also applies to your changes. - The current maintainer is Bram Moolenaar . If this - changes it will be announced in appropriate places (most likely - vim.sf.net, www.vim.org and/or comp.editors). When it is completely - impossible to contact the maintainer, the obligation to send him - your changes ceases. Once the maintainer has confirmed that he has - received your changes they will not have to be sent again. - b) If you have received a modified Vim that was distributed as - mentioned under a) you are allowed to further distribute it - unmodified, as mentioned at I). If you make additional changes the - text under a) applies to those changes. - c) Provide all the changes, including source code, with every copy of - the modified Vim you distribute. This may be done in the form of a - context diff. You can choose what license to use for new code you - add. The changes and their license must not restrict others from - making their own changes to the official version of Vim. - d) When you have a modified Vim which includes changes as mentioned - under c), you can distribute it without the source code for the - changes if the following three conditions are met: - - The license that applies to the changes permits you to distribute - the changes to the Vim maintainer without fee or restriction, and - permits the Vim maintainer to include the changes in the official - version of Vim without fee or restriction. - - You keep the changes for at least three years after last - distributing the corresponding modified Vim. When the maintainer - or someone who you distributed the modified Vim to asks you (in - any way) for the changes within this period, you must make them - available to him. - - You clearly describe in the distribution how to contact you. This - contact information must remain valid for at least three years - after last distributing the corresponding modified Vim, or as long - as possible. - e) When the GNU General Public License (GPL) applies to the changes, - you can distribute the modified Vim under the GNU GPL version 2 or - any later version. - 3) A message must be added, at least in the output of the ":version" - command and in the intro screen, such that the user of the modified Vim - is able to see that it was modified. When distributing as mentioned - under 2)e) adding the message is only required for as far as this does - not conflict with the license used for the changes. - 4) The contact information as required under 2)a) and 2)d) must not be - removed or changed, except that the person himself can make - corrections. - -III) If you distribute a modified version of Vim, you are encouraged to use - the Vim license for your changes and make them available to the - maintainer, including the source code. The preferred way to do this is - by e-mail or by uploading the files to a server and e-mailing the URL. - If the number of changes is small (e.g., a modified Makefile) e-mailing a - context diff will do. The e-mail address to be used is - - -IV) It is not allowed to remove this license from the distribution of the Vim - sources, parts of it or from a modified version. You may use this - license for previous Vim releases instead of the license that they came - with, at your option. diff --git a/sources_non_forked/ack.vim/README.md b/sources_non_forked/ack.vim/README.md deleted file mode 100644 index af8f522d..00000000 --- a/sources_non_forked/ack.vim/README.md +++ /dev/null @@ -1,161 +0,0 @@ -# ack.vim - -Run your favorite search tool from Vim, with an enhanced results list. - -This plugin was designed as a Vim frontend for the Perl module [App::Ack]. Ack -can be used as a replacement for 99% of the uses of _grep_. The plugin allows -you to run ack from Vim, and shows the results in a split window. - -But here's a little secret for the Vim-seasoned: it's just a light wrapper for -Vim's [grepprg] and the [quickfix] window for match results. This makes it easy -to integrate with your own Vim configuration and use existing knowledge of core -features. It also means the plugin is flexible to use with other search tools. - -[App::Ack]: http://search.cpan.org/~petdance/ack/ack -[grepprg]: http://vimdoc.sourceforge.net/htmldoc/options.html#'grepprg' -[quickfix]: http://vimdoc.sourceforge.net/htmldoc/quickfix.html#quickfix - -## Installation - -### Ack - -You will need ack (>= 2.0), of course. To install it follow the -[manual](http://beyondgrep.com/install/). - -### The Plugin - -It is recommended to use one of the popular plugin managers for Vim. There are -many and you probably already have a preferred one, but a few examples for your -copy-and-paste convenience: - -#### Pathogen - - $ git clone https://github.com/mileszs/ack.vim.git ~/.vim/bundle/ack.vim - -#### Vundle - -```vim -Plugin 'mileszs/ack.vim' -``` - -#### NeoBundle - -```vim -NeoBundle 'mileszs/ack.vim' -``` - -#### Manual (not recommended) - -[Download][releases] the plugin and extract it in `~/.vim/` (or -`%PROGRAMFILES%/Vim/vimfiles` on Windows). - -[zipball]: https://github.com/mileszs/ack.vim/archive/master.zip - -## Usage - - :Ack [options] {pattern} [{directories}] - -Search recursively in `{directories}` (which defaults to the current directory) -for the `{pattern}`. - -Files containing the search term will be listed in the quickfix window, along -with the line number of the occurrence, once for each occurrence. `` on -a line in this window will open the file, and place the cursor on the matching -line. - -Just like where you use `:grep`, `:grepadd`, `:lgrep`, and :`lgrepadd`, you can -use `:Ack`, `:AckAdd`, `:LAck`, and `:LAckAdd` respectively. (See `:help Ack` -after installing, or [`doc/ack.txt`][doc] in the repo, for more information.) - -For more ack help see [ack documentation](http://beyondgrep.com/documentation/). - -[doc]: https://github.com/mileszs/ack.vim/blob/master/doc/ack.txt - -### Keyboard Shortcuts - -The quickfix results window is augmented with these convenience mappings: - - ? a quick summary of these keys, repeat to close - o to open (same as Enter) - O to open and close the quickfix window - go to preview file, open but maintain focus on ack.vim results - t to open in new tab - T to open in new tab without moving to it - h to open in horizontal split - H to open in horizontal split, keeping focus on the results - v to open in vertical split - gv to open in vertical split, keeping focus on the results - q to close the quickfix window - -### Gotchas - -Some characters have special meaning, and need to be escaped in your search -pattern. For instance, `#`. You need to escape it with `:Ack '\\\#define -foo'` to search for '#define foo'. See [issue #5]. - -[issue #5]: https://github.com/mileszs/ack.vim/issues/5 - -## Possibly FAQ - -#### Can I use `ag` ([The Silver Searcher]) with this? - -Absolutely, and probably other tools if their output is similar or you can -write a pattern match for it--just set `g:ackprg`. If you like, you can fall -back to Ack in case you use your vimrc on a system without Ag available: - -```vim -if executable('ag') - let g:ackprg = 'ag --vimgrep' -endif -``` - -Since Ack is quite portable you might check a copy of it into your dotfiles -repository in `~/bin` so you'll nearly always have it available. - -#### What's the difference from ag.vim? - -Well... not a lot really. - -Present maintainer, yours truly, [kind of wishes they never forked][sadface], -contributes to both, and wouldn't mind seeing them merged again. ag.vim got a -nice code clean-up (which ack.vim is now hopefully getting), and ack.vim picked -up a few features that haven't made their way to ag.vim, like `:AckWindow`, -optional background search execution with [vim-dispatch], and auto-previewing. - -#### I don't want to jump to the first result automatically. #### - -Use `:Ack!`, with bang. If you want this behavior most of the time, you might -like an abbreviation or mapping in your personal config, something like these: - -```vim -cnoreabbrev Ack Ack! -nnoremap a :Ack! -``` - -Most of the `:[L]Ack*` commands support this. Note that this behavior follows -the convention of Vim's built-in `:grep` and `:make` commands. - -[The Silver Searcher]: https://github.com/ggreer/the_silver_searcher -[sadface]: https://github.com/mileszs/ack.vim/commit/d97090fb502d40229e6976dfec0e06636ba227d5#commitcomment-5771145 - -## Changelog - -Please see [the Github releases page][releases]. - -## Credits - -This plugin is derived from Antoine Imbert's blog post [Ack and Vim -Integration][] (in particular, the function in the update to the post). [Miles -Sterrett][mileszs] packaged it up as a plugin and documented it in Vim's help -format, and since then [many contributors][contributors] have submitted -enhancements and fixes. - -And of course, where would we be without [Ack]. And, you know, Vim. - -[Ack and Vim Integration]: http://blog.ant0ine.com/typepad/2007/03/ack-and-vim-integration.html -[mileszs]: https://github.com/mileszs -[contributors]: https://github.com/mileszs/ack.vim/graphs/contributors -[Ack]: http://beyondgrep.com/ - -[vim-dispatch]: https://github.com/tpope/vim-dispatch -[releases]: https://github.com/mileszs/ack.vim/releases diff --git a/sources_non_forked/ack.vim/autoload/ack.vim b/sources_non_forked/ack.vim/autoload/ack.vim deleted file mode 100644 index dbf84572..00000000 --- a/sources_non_forked/ack.vim/autoload/ack.vim +++ /dev/null @@ -1,246 +0,0 @@ -if exists('g:autoloaded_ack') || &cp - finish -endif - -if exists('g:ack_use_dispatch') - if g:ack_use_dispatch && !exists(':Dispatch') - call s:Warn('Dispatch not loaded! Falling back to g:ack_use_dispatch = 0.') - let g:ack_use_dispatch = 0 - endif -else - let g:ack_use_dispatch = 0 -endif - -"----------------------------------------------------------------------------- -" Public API -"----------------------------------------------------------------------------- - -function! ack#Ack(cmd, args) "{{{ - call s:Init(a:cmd) - redraw - - " Local values that we'll temporarily set as options when searching - let l:grepprg = g:ackprg - let l:grepformat = '%f:%l:%c:%m,%f:%l:%m' " Include column number - - " Strip some options that are meaningless for path search and set match - " format accordingly. - if s:SearchingFilepaths() - let l:grepprg = substitute(l:grepprg, '-H\|--column', '', 'g') - let l:grepformat = '%f' - endif - - " Check user policy for blank searches - if empty(a:args) - if !g:ack_use_cword_for_empty_search - echo "No regular expression found." - return - endif - endif - - " If no pattern is provided, search for the word under the cursor - let l:grepargs = empty(a:args) ? expand("") : a:args . join(a:000, ' ') - - "Bypass search if cursor is on blank string - if l:grepargs == "" - echo "No regular expression found." - return - endif - - " NOTE: we escape special chars, but not everything using shellescape to - " allow for passing arguments etc - let l:escaped_args = escape(l:grepargs, '|#%') - - echo "Searching ..." - - if g:ack_use_dispatch - call s:SearchWithDispatch(l:grepprg, l:escaped_args, l:grepformat) - else - call s:SearchWithGrep(a:cmd, l:grepprg, l:escaped_args, l:grepformat) - endif - - " Dispatch has no callback mechanism currently, we just have to display the - " list window early and wait for it to populate :-/ - call ack#ShowResults() - call s:Highlight(l:grepargs) -endfunction "}}} - -function! ack#AckFromSearch(cmd, args) "{{{ - let search = getreg('/') - " translate vim regular expression to perl regular expression. - let search = substitute(search, '\(\\<\|\\>\)', '\\b', 'g') - call ack#Ack(a:cmd, '"' . search . '" ' . a:args) -endfunction "}}} - -function! ack#AckHelp(cmd, args) "{{{ - let args = a:args . ' ' . s:GetDocLocations() - call ack#Ack(a:cmd, args) -endfunction "}}} - -function! ack#AckWindow(cmd, args) "{{{ - let files = tabpagebuflist() - - " remove duplicated filenames (files appearing in more than one window) - let files = filter(copy(sort(files)), 'index(files,v:val,v:key+1)==-1') - call map(files, "bufname(v:val)") - - " remove unnamed buffers as quickfix (empty strings before shellescape) - call filter(files, 'v:val != ""') - - " expand to full path (avoid problems with cd/lcd in au QuickFixCmdPre) - let files = map(files, "shellescape(fnamemodify(v:val, ':p'))") - let args = a:args . ' ' . join(files) - - call ack#Ack(a:cmd, args) -endfunction "}}} - -function! ack#ShowResults() "{{{ - let l:handler = s:UsingLocList() ? g:ack_lhandler : g:ack_qhandler - execute l:handler - call s:ApplyMappings() - redraw! -endfunction "}}} - -"----------------------------------------------------------------------------- -" Private API -"----------------------------------------------------------------------------- - -function! s:ApplyMappings() "{{{ - if !s:UsingListMappings() || &filetype != 'qf' - return - endif - - let l:wintype = s:UsingLocList() ? 'l' : 'c' - let l:closemap = ':' . l:wintype . 'close' - let g:ack_mappings.q = l:closemap - - nnoremap ? :call QuickHelp() - - if g:ack_autoclose - " We just map the 'go' and 'gv' mappings to close on autoclose, wtf? - for key_map in items(g:ack_mappings) - execute printf("nnoremap %s %s", get(key_map, 0), get(key_map, 1) . l:closemap) - endfor - - execute "nnoremap " . l:closemap - else - for key_map in items(g:ack_mappings) - execute printf("nnoremap %s %s", get(key_map, 0), get(key_map, 1)) - endfor - endif - - if exists("g:ackpreview") " if auto preview in on, remap j and k keys - nnoremap j j - nnoremap k k - nmap j - nmap k - endif -endfunction "}}} - -function! s:GetDocLocations() "{{{ - let dp = '' - for p in split(&rtp, ',') - let p = p . '/doc/' - if isdirectory(p) - let dp = p . '*.txt ' . dp - endif - endfor - - return dp -endfunction "}}} - -function! s:Highlight(args) "{{{ - if !g:ackhighlight - return - endif - - let @/ = matchstr(a:args, "\\v(-)\@", "n") -endfunction "}}} - -" Initialize state for an :Ack* or :LAck* search -function! s:Init(cmd) "{{{ - let s:searching_filepaths = (a:cmd =~# '-g$') ? 1 : 0 - let s:using_loclist = (a:cmd =~# '^l') ? 1 : 0 - - if g:ack_use_dispatch && s:using_loclist - call s:Warn('Dispatch does not support location lists! Proceeding with quickfix...') - let s:using_loclist = 0 - endif -endfunction "}}} - -function! s:QuickHelp() "{{{ - execute 'edit' globpath(&rtp, 'doc/ack_quick_help.txt') - - silent normal gg - setlocal buftype=nofile bufhidden=hide nobuflisted - setlocal nomodifiable noswapfile - setlocal filetype=help - setlocal nonumber norelativenumber nowrap - setlocal foldmethod=diff foldlevel=20 - - nnoremap ? :q!:call ack#ShowResults() -endfunction "}}} - -function! s:SearchWithDispatch(grepprg, grepargs, grepformat) "{{{ - let l:makeprg_bak = &l:makeprg - let l:errorformat_bak = &l:errorformat - - " We don't execute a :grep command for Dispatch, so add -g here instead - if s:SearchingFilepaths() - let l:grepprg = a:grepprg . ' -g' - else - let l:grepprg = a:grepprg - endif - - try - let &l:makeprg = l:grepprg . ' ' . a:grepargs - let &l:errorformat = a:grepformat - - Make - finally - let &l:makeprg = l:makeprg_bak - let &l:errorformat = l:errorformat_bak - endtry -endfunction "}}} - -function! s:SearchWithGrep(grepcmd, grepprg, grepargs, grepformat) "{{{ - let l:grepprg_bak = &l:grepprg - let l:grepformat_bak = &grepformat - - try - let &l:grepprg = a:grepprg - let &grepformat = a:grepformat - - silent execute a:grepcmd a:grepargs - finally - let &l:grepprg = l:grepprg_bak - let &grepformat = l:grepformat_bak - endtry -endfunction "}}} - -" Are we finding matching files, not lines? (the -g option -- :AckFile) -function! s:SearchingFilepaths() "{{{ - return get(s:, 'searching_filepaths', 0) -endfunction "}}} - -" Predicate for whether mappings are enabled for list type of current search. -function! s:UsingListMappings() "{{{ - if s:UsingLocList() - return g:ack_apply_lmappings - else - return g:ack_apply_qmappings - endif -endfunction "}}} - -" Were we invoked with a :LAck command? -function! s:UsingLocList() "{{{ - return get(s:, 'using_loclist', 0) -endfunction "}}} - -function! s:Warn(msg) "{{{ - echohl WarningMsg | echomsg 'Ack: ' . a:msg | echohl None -endf "}}} - -let g:autoloaded_ack = 1 -" vim:set et sw=2 ts=2 tw=78 fdm=marker diff --git a/sources_non_forked/ack.vim/doc/ack.txt b/sources_non_forked/ack.vim/doc/ack.txt deleted file mode 100644 index 22e884bc..00000000 --- a/sources_non_forked/ack.vim/doc/ack.txt +++ /dev/null @@ -1,315 +0,0 @@ -*ack.txt* Plugin that integrates ack with Vim - -============================================================================== -Author: Antoine Imbert *ack-author* -License: Same terms as Vim itself (see |license|) - -This plugin is only available if 'compatible' is not set. - -{Vi does not have any of this} - -============================================================================== -INTRODUCTION *ack* - -This plugin is a front for the Perl module App::Ack. Ack can be used as a -replacement for grep. This plugin will allow you to run ack from vim, and -shows the results in a split window. - -:Ack[!] [options] {pattern} [{directory}] *:Ack* - - Search recursively in {directory} (which defaults to the current - directory) for the {pattern}. Behaves just like the |:grep| command, but - will open the |Quickfix| window for you. If [!] is not given the first - occurrence is jumped to. - -:AckAdd [options] {pattern} [{directory}] *:AckAdd* - - Just like |:Ack|, but instead of making a new list, the matches are - appended to the current |quickfix| list. - -:AckFromSearch [{directory}] *:AckFromSearch* - - Just like |:Ack| but the pattern is from previous search. - -:LAck [options] {pattern} [{directory}] *:LAck* - - Just like |:Ack| but instead of the |quickfix| list, matches are placed in - the current |location-list|. - -:LAckAdd [options] {pattern} [{directory}] *:LAckAdd* - - Just like |:AckAdd| but instead of the |quickfix| list, matches are added - to the current |location-list| - -:AckFile [options] {pattern} [{directory}] *:AckFile* - - Search recursively in {directory} (which defaults to the current - directory) for filenames matching the {pattern}. Behaves just like the - |:grep| command, but will open the |Quickfix| window for you. - -:AckHelp[!] [options] {pattern} *:AckHelp* - - Search vim documentation files for the {pattern}. Behaves just like the - |:Ack| command, but searches only vim documentation .txt files - -:LAckHelp [options] {pattern} *:LAckHelp* - - Just like |:AckHelp| but instead of the |quickfix| list, matches are placed - in the current |location-list|. - -:AckWindow[!] [options] {pattern} *:AckWindow* - - Search all buffers visible in the screen (current tab page only) files for - the {pattern}. - -:LAckWindow [options] {pattern} *:LAckWindow* - - Just like |:AckWindow| but instead of the |quickfix| list, matches are - placed in the current |location-list|. - -Files containing the search term will be listed in the split window, along -with the line number of the occurrence, once for each occurrence. on -a line in this window will open the file, and place the cursor on the matching -line. - -Note that if you are using Dispatch.vim with |g:ack_use_dispatch|, location -lists are not supported, because Dispatch does not support them at this time. -`:LAck` versions of commands above will give a warning and proceed to use the -quickfix list instead. - -See http://beyondgrep.com/ for more information on searching with ack. - - -============================================================================== -CONFIGURATION *ack-configuration* - - *g:ackprg* -g:ackprg -Default for ubuntu: "ack-grep" -Default for other systems: "ack" - -Use this option to specify the search command and its default arguments. - -Example: -> - let g:ackprg = "ag --vimgrep" -< - *g:ack_default_options* -g:ack_default_options -Default: " -s -H --nocolor --nogroup --column" - -Use this option to specify the default arguments given to `ack`. This is only -used if |g:ackprg| has not been customized from the default--if you are using -a custom search program instead of Ack, set your preferred options in -|g:ackprg|. - -NOTE: This option may be deprecated in the future. ~ - -Example: -> - let g:ack_default_options = - \ " -s -H --nocolor --nogroup --column --smart-case --follow" -< - *g:ack_apply_qmappings* -g:ack_apply_qmappings -Default: 1 - -This option enables mappings on the |quickfix| window. - - *g:ack_apply_lmappings* -g:ack_apply_lmappings -Default: 1 - -This option enables mappings on |location-list| windows. - - *g:ack_mappings* -g:ack_mappings -Default: { - \ "t": "T", - \ "T": "TgTj", - \ "o": "", - \ "O": ":ccl", - \ "go": "j", - \ "h": "K", - \ "H": "Kb", - \ "v": "HbJt", - \ "gv": "HbJ" } - -This option list all maps create on quickfix/Location list window. - -Example, if you want to open the result in the middle of the screen: -> - let g:ack_mappings = { "o": "zz" } -< - *g:ack_qhandler* -g:ack_qhandler -Default: "botright copen" - -Command to open the quickview window. - -If you want to open a quickview window with 30 lines you can do: -> - let g:ack_qhandler = "botright copen 30" -< - *g:ack_lhandler* -g:ack_lhandler -Default: "botright lopen" - -Command to open the Location list window. - -If you want to open a Location list window with 30 lines you can do: -> - let g:ack_lhandler = "botright lopen 30" -< - *g:ackhighlight* -g:ackhighlight -Default: 0 - -Use this option to highlight the searched term. - -Example: -> - let g:ackhighlight = 1 -< - *g:ack_autoclose* -g:ack_autoclose -Default: 0 - -Use this option to specify whether to close the quickfix window after -using any of the shortcuts. - -Example: -> - let g:ack_autoclose = 1 -< - *g:ack_autofold_results* -g:ack_autofold_results -Default: 0 - -Use this option to fold the results in quickfix by file name. Only the current -fold will be open by default and while you press 'j' and 'k' to move between the -results if you hit other fold the last one will be closed and the current will -be open. - -Example: -> - let g:ack_autofold_results = 1 -< - *g:ackpreview* -g:ackpreview -Default: 0 - -Use this option to automagically open the file with 'j' or 'k'. - -Example: -> - let g:ackpreview = 1 -< - *g:ack_use_dispatch* -g:ack_use_dispatch -Default: 0 - -Use this option to use vim-dispatch to run searches in the background, with a -variety of execution backends for different systems. - -Due to limitations in Dispatch at this time, location lists are unsupported -and result windows will appear before results are ready. Still, these may be -acceptable tradeoffs for very large projects where searches are slow. - -Example: -> - let g:ack_use_dispatch = 1 -< - *g:ack_use_cword_for_empty_search* -g:ack_use_cword_for_empty_search -Default: 1 - -Use this option to enable blank searches to run against the word under the -cursor. When this option is not set, blank searches will only output an error -message. - -Example: -> - let g:ack_use_cword_for_empty_search = 0 -< -============================================================================== -MAPPINGS *ack-mappings* - -The following keyboard shortcuts are available in the |quickfix| and -|location-list| windows: - -? display a quick summary of these mappings. - -o open file (same as Enter). - -O open file and close the quickfix window. - -go preview file (open but maintain focus on ack.vim results). - -t open in a new tab. - -T open in new tab without moving to it. - -h open in horizontal split. - -H open in horizontal split, keeping focus on the results. - -v open in vertical split. - -gv open in vertical split, keeping focus on the results. - -q close the quickfix window. - -To adjust these, see |g:ack_mappings|. - -============================================================================== -Ignoring files *ack-ignore* - -If you're using this plugin with ag, The Silver Searcher, bear in mind that: - - - It ignores file patterns from your .gitignore and .hgignore. - - - If there are other files in your source repository you don't wish to - search, you can add their patterns to an .agignore file. - -============================================================================== -ISSUES AND FAQ *ack-issues-and-faq* - -I don't want to jump to the first result automatically.~ - - Use `:Ack!`, with bang. If you want this behavior most of the time, you - might like an abbreviation or mapping in your personal config, something - like these: -> - cnoreabbrev Ack Ack! - nnoremap a :Ack! -< - Most of the `:[L]Ack*` commands support this. Note that this behavior - follows the convention of Vim's built-in |:grep| and |:make| commands. - -I use NERDTree and opening ack.vim results in a vertical split displacing it.~ - - You are probably using NERDTree with its default alignment at the left - side of the window. Set these custom mappings in your vimrc to work around - this: -> - let g:ack_mappings = { - \ 'v': 'LpJp', - \ 'gv': 'LpJ' } -< - This solution will be improved in the future. - -Results show a mix of relative and absolute paths, making them hard to read.~ - - This is a quirk of Vim that can happen with plain |:vimgrep| too. You can - try this in your vimrc to work around it: -> - autocmd BufAdd * exe "cd" fnameescape(getcwd()) -< - but for some users this may be disruptive to their Vim workflow. For more - details, see: - - http://vi.stackexchange.com/a/4816/7174 - https://github.com/mileszs/ack.vim/issues/143 - -vim:set et sw=4 ts=4 tw=78: diff --git a/sources_non_forked/ack.vim/doc/ack_quick_help.txt b/sources_non_forked/ack.vim/doc/ack_quick_help.txt deleted file mode 100644 index 94306a0e..00000000 --- a/sources_non_forked/ack.vim/doc/ack_quick_help.txt +++ /dev/null @@ -1,15 +0,0 @@ -==== ack.vim quick help =============== - - *?:* a quick summary of these keys, repeat to close - *o:* to open (same as Enter) - *O:* to open and close the quickfix window - *go:* to preview file, open but maintain focus on ack.vim results - *t:* to open in new tab - *T:* to open in new tab without moving to it - *h:* to open in horizontal split - *H:* to open in horizontal split, keeping focus on the results - *v:* to open in vertical split - *gv:* to open in vertical split, keeping focus on the results - *q:* to close the quickfix window - -======================================== diff --git a/sources_non_forked/ack.vim/ftplugin/qf.vim b/sources_non_forked/ack.vim/ftplugin/qf.vim deleted file mode 100644 index 27564fa7..00000000 --- a/sources_non_forked/ack.vim/ftplugin/qf.vim +++ /dev/null @@ -1,9 +0,0 @@ -if exists("g:ack_autofold_results") && g:ack_autofold_results - setlocal foldlevel=0 - setlocal foldmethod=expr - setlocal foldexpr=matchstr(getline(v:lnum),'^[^\|]\\+')==#matchstr(getline(v:lnum+1),'^[^\|]\\+')?1:'<1' - setlocal foldenable - setlocal foldclose=all - setlocal foldopen=all - nnoremap j jzz -endif diff --git a/sources_non_forked/ack.vim/plugin/ack.vim b/sources_non_forked/ack.vim/plugin/ack.vim deleted file mode 100644 index 202ae2ea..00000000 --- a/sources_non_forked/ack.vim/plugin/ack.vim +++ /dev/null @@ -1,83 +0,0 @@ -if exists('g:loaded_ack') || &cp - finish -endif - -if !exists("g:ack_default_options") - let g:ack_default_options = " -s -H --nopager --nocolor --nogroup --column" -endif - -" Location of the ack utility -if !exists("g:ackprg") - if executable('ack-grep') - let g:ackprg = "ack-grep" - elseif executable('ack') - let g:ackprg = "ack" - else - finish - endif - let g:ackprg .= g:ack_default_options -endif - -if !exists("g:ack_apply_qmappings") - let g:ack_apply_qmappings = !exists("g:ack_qhandler") -endif - -if !exists("g:ack_apply_lmappings") - let g:ack_apply_lmappings = !exists("g:ack_lhandler") -endif - -let s:ack_mappings = { - \ "t": "T", - \ "T": "TgTj", - \ "o": "", - \ "O": "pc", - \ "go": "p", - \ "h": "K", - \ "H": "Kb", - \ "v": "HbJt", - \ "gv": "HbJ" } - -if exists("g:ack_mappings") - let g:ack_mappings = extend(s:ack_mappings, g:ack_mappings) -else - let g:ack_mappings = s:ack_mappings -endif - -if !exists("g:ack_qhandler") - let g:ack_qhandler = "botright copen" -endif - -if !exists("g:ack_lhandler") - let g:ack_lhandler = "botright lopen" -endif - -if !exists("g:ackhighlight") - let g:ackhighlight = 0 -endif - -if !exists("g:ack_autoclose") - let g:ack_autoclose = 0 -endif - -if !exists("g:ack_autofold_results") - let g:ack_autofold_results = 0 -endif - -if !exists("g:ack_use_cword_for_empty_search") - let g:ack_use_cword_for_empty_search = 1 -endif - -command! -bang -nargs=* -complete=file Ack call ack#Ack('grep', ) -command! -bang -nargs=* -complete=file AckAdd call ack#Ack('grepadd', ) -command! -bang -nargs=* -complete=file AckFromSearch call ack#AckFromSearch('grep', ) -command! -bang -nargs=* -complete=file LAck call ack#Ack('lgrep', ) -command! -bang -nargs=* -complete=file LAckAdd call ack#Ack('lgrepadd', ) -command! -bang -nargs=* -complete=file AckFile call ack#Ack('grep -g', ) -command! -bang -nargs=* -complete=help AckHelp call ack#AckHelp('grep', ) -command! -bang -nargs=* -complete=help LAckHelp call ack#AckHelp('lgrep', ) -command! -bang -nargs=* AckWindow call ack#AckWindow('grep', ) -command! -bang -nargs=* LAckWindow call ack#AckWindow('lgrep', ) - -let g:loaded_ack = 1 - -" vim:set et sw=2 ts=2 tw=78 fdm=marker diff --git a/update_plugins.py b/update_plugins.py index 07116c96..9b364de9 100644 --- a/update_plugins.py +++ b/update_plugins.py @@ -16,7 +16,6 @@ from os import path #--- Globals ---------------------------------------------- PLUGINS = """ -ack.vim https://github.com/mileszs/ack.vim ag.vim https://github.com/rking/ag.vim bufexplorer https://github.com/corntrace/bufexplorer ctrlp.vim https://github.com/ctrlpvim/ctrlp.vim From 75beb5f4ba85c08f1179c1eeb97fcc01b5abf3c2 Mon Sep 17 00:00:00 2001 From: amix Date: Sat, 1 Apr 2017 13:22:06 +0200 Subject: [PATCH 05/14] Updated vim plugins --- .../ctrlp.vim/autoload/ctrlp.vim | 3 +- sources_non_forked/ctrlp.vim/doc/ctrlp.txt | 2 +- sources_non_forked/goyo.vim/doc/goyo.txt | 170 ++++++++++++++++++ .../nerdtree/.github/ISSUE_TEMPLATE.md | 37 ++++ sources_non_forked/nerdtree/README.markdown | 4 +- .../autoload/syntastic/preprocess.vim | 29 +++ .../syntastic/doc/syntastic-checkers.txt | 112 ++++++------ .../syntastic/plugin/syntastic.vim | 2 +- .../syntastic/syntax_checkers/d/dscanner.vim | 48 +++++ .../syntax_checkers/dockerfile/hadolint.vim | 41 +++++ .../syntax_checkers/solidity/solium.vim | 43 +++++ sources_non_forked/vim-gitgutter/README.mkd | 52 ++++++ .../vim-gitgutter/autoload/gitgutter.vim | 14 +- .../autoload/gitgutter/async.vim | 8 +- .../vim-gitgutter/autoload/gitgutter/diff.vim | 4 +- .../vim-gitgutter/autoload/gitgutter/hunk.vim | 38 ++-- .../vim-gitgutter/autoload/gitgutter/sign.vim | 28 +-- .../autoload/gitgutter/utility.vim | 37 ++-- .../vim-gitgutter/doc/gitgutter.txt | 1 + sources_non_forked/vim-go/CHANGELOG.md | 8 +- sources_non_forked/vim-go/autoload/go/cmd.vim | 6 +- sources_non_forked/vim-go/autoload/go/fmt.vim | 8 +- .../vim-go/autoload/go/path.vim | 125 +++++++------ sources_non_forked/vim-go/doc/vim-go.txt | 9 +- sources_non_forked/vim-go/plugin/go.vim | 12 +- .../vim-go/syntax/gotexttmpl.vim | 4 +- .../vim-indent-object/doc/indent-object.txt | 16 +- .../vim-snippets/UltiSnips/cs.snippets | 8 +- .../vim-snippets/UltiSnips/vue.snippets | 1 + .../vim-snippets/snippets/c.snippets | 28 +-- .../vim-snippets/snippets/cpp.snippets | 14 +- .../vim-snippets/snippets/erlang.snippets | 30 ++-- 32 files changed, 704 insertions(+), 238 deletions(-) create mode 100644 sources_non_forked/goyo.vim/doc/goyo.txt create mode 100644 sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE.md create mode 100644 sources_non_forked/syntastic/syntax_checkers/d/dscanner.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/dockerfile/hadolint.vim create mode 100644 sources_non_forked/syntastic/syntax_checkers/solidity/solium.vim create mode 100644 sources_non_forked/vim-snippets/UltiSnips/vue.snippets diff --git a/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim b/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim index 65589393..7b2d660a 100644 --- a/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim +++ b/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim @@ -1763,6 +1763,7 @@ fu! ctrlp#setpathmode(pmode, ...) let spath = a:0 ? a:1 : s:crfpath let markers = ['.git', '.hg', '.svn', '.bzr', '_darcs'] if type(s:rmarkers) == 3 && !empty(s:rmarkers) + if s:findroot(spath, s:rmarkers, 0, 0) != [] | retu 1 | en cal filter(markers, 'index(s:rmarkers, v:val) < 0') let markers = s:rmarkers + markers en @@ -2384,7 +2385,7 @@ endf fu! s:matchbuf(item, pat) let bufnr = s:bufnrfilpath(a:item)[0] let parts = s:bufparts(bufnr) - let item = bufnr.parts[0].parts[2].s:lash().parts[3] + let item = s:byfname ? parts[2] : bufnr.parts[0].parts[2].s:lash().parts[3] retu match(item, a:pat) endf diff --git a/sources_non_forked/ctrlp.vim/doc/ctrlp.txt b/sources_non_forked/ctrlp.vim/doc/ctrlp.txt index f703ba4f..455e368c 100644 --- a/sources_non_forked/ctrlp.vim/doc/ctrlp.txt +++ b/sources_non_forked/ctrlp.vim/doc/ctrlp.txt @@ -848,7 +848,7 @@ Example: > When this is set to 1, the on empty prompt exit CtrlP. *ctrlp-default-value* -Otherwize, you can use below to change default value. +Otherwise, you can use below to change default value. Example: > let g:ctrlp_path_nolim = 1 diff --git a/sources_non_forked/goyo.vim/doc/goyo.txt b/sources_non_forked/goyo.vim/doc/goyo.txt new file mode 100644 index 00000000..cdc129f8 --- /dev/null +++ b/sources_non_forked/goyo.vim/doc/goyo.txt @@ -0,0 +1,170 @@ +goyo.txt goyo Last change: April 1 2017 +GOYO - TABLE OF CONTENTS *goyo* *goyo-toc* +============================================================================== + + goyo.vim (고요) + Installation + Usage + Dimension expression + Configuration + Callbacks + Inspiration + Pros. + License + +GOYO.VIM (고요) *goyo* +============================================================================== + +Distraction-free writing in Vim. + +https://raw.github.com/junegunn/i/master/goyo.png + +(Color scheme: {seoul256}{1}) + +Best served with {limelight.vim}{2}. + + {1} https://github.com/junegunn/seoul256.vim + {2} https://github.com/junegunn/limelight.vim + + +INSTALLATION *goyo-installation* +============================================================================== + +Use your favorite plugin manager. + + *:PlugInstall* + + - {vim-plug}{3} + 1. Add `Plug 'junegunn/goyo.vim'` to .vimrc + 2. Run `:PlugInstall` + + {3} https://github.com/junegunn/vim-plug + + +USAGE *goyo-usage* +============================================================================== + + *:Goyo* + + - `:Goyo` + - Toggle Goyo + - `:Goyo [dimension]` + - Turn on or resize Goyo + - `:Goyo!` + - Turn Goyo off + +The window can be resized with the usual count]`, `<`, `+`, `-` +keys. + + +< Dimension expression >______________________________________________________~ + *goyo-dimension-expression* + +The expected format of a dimension expression is +`[WIDTH][XOFFSET][x[HEIGHT][YOFFSET]]`. `XOFFSET` and `YOFFSET` should be +prefixed by `+` or `-`. Each component can be given in percentage. +> + " Width + Goyo 120 + + " Height + Goyo x30 + + " Both + Goyo 120x30 + + " In percentage + Goyo 120x50% + + " With offsets + Goyo 50%+25%x50%-25% +< + +CONFIGURATION *goyo-configuration* +============================================================================== + + *g:goyo_width* *g:goyo_height* *g:goyo_linenr* + + - `g:goyo_width` (default: 80) + - `g:goyo_height` (default: 85%) + - `g:goyo_linenr` (default: 0) + + +< Callbacks >_________________________________________________________________~ + *goyo-callbacks* + +By default, {vim-airline}{4}, {vim-powerline}{5}, {powerline}{6}, +{lightline.vim}{7}, {vim-signify}{8}, and {vim-gitgutter}{9} are temporarily +disabled while in Goyo mode. + +If you have other plugins that you want to disable/enable, or if you want to +change the default settings of Goyo window, you can set up custom routines to +be triggered on `GoyoEnter` and `GoyoLeave` events. +> + function! s:goyo_enter() + silent !tmux set status off + silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z + set noshowmode + set noshowcmd + set scrolloff=999 + Limelight + " ... + endfunction + + function! s:goyo_leave() + silent !tmux set status on + silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z + set showmode + set showcmd + set scrolloff=5 + Limelight! + " ... + endfunction + + autocmd! User GoyoEnter nested call goyo_enter() + autocmd! User GoyoLeave nested call goyo_leave() +< +More examples can be found here: {Customization}{10} + + {4} https://github.com/bling/vim-airline + {5} https://github.com/Lokaltog/vim-powerline + {6} https://github.com/Lokaltog/powerline + {7} https://github.com/itchyny/lightline.vim + {8} https://github.com/mhinz/vim-signify + {9} https://github.com/airblade/vim-gitgutter + {10} https://github.com/junegunn/goyo.vim/wiki/Customization + + +INSPIRATION *goyo-inspiration* +============================================================================== + + - {LiteDFM}{11} + - {VimRoom}{12} + + {11} https://github.com/bilalq/lite-dfm + {12} http://projects.mikewest.org/vimroom/ + + +PROS. *goyo-pros* +============================================================================== + + 1. Works well with splits. Doesn't mess up with the current window arrangement + 2. Works well with popular statusline plugins + 3. Prevents accessing the empty windows around the central buffer + 4. Can be closed with any of `:q[uit]`, `:clo[se]`, `:tabc[lose]`, or `:Goyo` + 5. Can dynamically change the width of the window + 6. Adjusts its colors when color scheme is changed + 7. Realigns the window when the terminal (or window) is resized or when the size + of the font is changed + 8. Correctly hides colorcolumns and Emojis in statusline + 9. Highly customizable with callbacks + + +LICENSE *goyo-license* +============================================================================== + +MIT + + +============================================================================== +vim:tw=78:sw=2:ts=2:ft=help:norl:nowrap: diff --git a/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE.md b/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..69aa7d9b --- /dev/null +++ b/sources_non_forked/nerdtree/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,37 @@ +_To assist in resolving your issue, provide as much information as possible, in place of the ellipses (`…`) below._ + +--- +**Environment:** _Describe your Vim/NERDTree setup._ + +>* Operating System: … +>* Vim version `:version`: … +>* NERDTree version `git rev-parse --short HEAD`: … +>* NERDTree settings applied in your vimrc, if any: +> +> ``` +> … +> ``` + +**Process:** _List the steps that will recreate the issue._ + +>1. … + +**Current Result:** _Describe what you you currently experience from this process._ + +>… + +**Expected Result:** _Describe what you would expect to have resulted from this process._ + +>… + +--- +**Optional** + +**Screenshot(s):** + +>… + +**Possible Fix:** _(Have you poked around in the code?)_ + +>… + diff --git a/sources_non_forked/nerdtree/README.markdown b/sources_non_forked/nerdtree/README.markdown index 4f5133a2..19b841bc 100644 --- a/sources_non_forked/nerdtree/README.markdown +++ b/sources_non_forked/nerdtree/README.markdown @@ -55,14 +55,14 @@ The following features and functionality are provided by the NERD tree: Installation ------------ -####[pathogen.vim](https://github.com/tpope/vim-pathogen) +#### [pathogen.vim](https://github.com/tpope/vim-pathogen) 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`. -####[apt-vim](https://github.com/egalpin/apt-vim) +#### [apt-vim](https://github.com/egalpin/apt-vim) apt-vim install -y https://github.com/scrooloose/nerdtree.git diff --git a/sources_non_forked/syntastic/autoload/syntastic/preprocess.vim b/sources_non_forked/syntastic/autoload/syntastic/preprocess.vim index 9d25b849..451d308c 100644 --- a/sources_non_forked/syntastic/autoload/syntastic/preprocess.vim +++ b/sources_non_forked/syntastic/autoload/syntastic/preprocess.vim @@ -98,6 +98,35 @@ function! syntastic#preprocess#dockerfile_lint(errors) abort " {{{2 return out endfunction " }}}2 +function! syntastic#preprocess#dscanner(errors) abort " {{{2 + let idx = 0 + while idx < len(a:errors) && a:errors[idx][0] !=# '{' + let idx += 1 + endwhile + let errs = s:_decode_JSON(join(a:errors[idx :], '')) + + let out = [] + if type(errs) == type({}) && has_key(errs, 'issues') && type(errs['issues']) == type([]) + for issue in errs['issues'] + try + call add(out, + \ issue['fileName'] . ':' . + \ issue['line'] . ':' . + \ issue['column'] . ':' . + \ issue['message'] . ' [' . issue['key'] . ']') + catch /\m^Vim\%((\a\+)\)\=:E716/ + call syntastic#log#warn('checker d/dscanner: unrecognized error item ' . string(issue)) + let out = [] + break + endtry + endfor + else + call syntastic#log#warn('checker d/dscanner: unrecognized error format (crashed checker?)') + endif + + return out +endfunction " }}}2 + function! syntastic#preprocess#flow(errors) abort " {{{2 let idx = 0 while idx < len(a:errors) && a:errors[idx][0] !=# '{' diff --git a/sources_non_forked/syntastic/doc/syntastic-checkers.txt b/sources_non_forked/syntastic/doc/syntastic-checkers.txt index 48536491..7c902f9a 100644 --- a/sources_non_forked/syntastic/doc/syntastic-checkers.txt +++ b/sources_non_forked/syntastic/doc/syntastic-checkers.txt @@ -1755,6 +1755,7 @@ SYNTAX CHECKERS FOR D *syntastic-checkers-d* The following checkers are available for D (filetype "d"): 1. DMD......................|syntastic-d-dmd| + 2. D-Scanner................|syntastic-d-dscanner| ------------------------------------------------------------------------------ 1. DMD *syntastic-d-dmd* @@ -1834,6 +1835,22 @@ the usual 'g:syntastic_d_dmd_