diff --git a/README.md b/README.md index 541f0d07..52efaaaa 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,28 @@ -![VIM](https://camo.githubusercontent.com/bec48ea0e886e5489a8819486bf74075fe626067/68747470733a2f2f7261772e6769746875622e636f6d2f656c6d636173742f656c6d2d76696d2f6d61737465722f73637265656e73686f74732f6c6f676f2e706e67) +![VIM](https://dnp4pehkvoo6n.cloudfront.net/43c5af597bd5c1a64eb1829f011c208f/as/Ultimate%20Vimrc.svg) # 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 configuration is the ultimate vimrc (or at least my version of it). 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 a 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 just one file and no plugins. Just 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. +The basic version is useful to install on remote servers where you don't need many plugins, and you don't do many edits. git clone git://github.com/amix/vimrc.git ~/.vim_runtime sh ~/.vim_runtime/install_basic_vimrc.sh @@ -39,7 +39,7 @@ If you have vim aliased as `vi` instead of `vim`, make sure to either alias it: ## How to update to latest version? -Simply just do a git rebase! +Just do a git rebase! cd ~/.vim_runtime git pull --rebase @@ -48,49 +48,47 @@ Simply just do a git rebase! ## Some screenshots Colors when editing a Python file: -![Screenshot 1](http://files1.wedoist.com/e952fdb343b1e617b90d256e474d0370/as/screenshot_1.png) -Opening recently opened files [mru.vim](https://github.com/vim-scripts/mru.vim): -![Screenshot 2](http://files1.wedoist.com/1967b0e48af40e513d1a464e08196990/as/screenshot_2.png) +![Screenshot 1](https://dnp4pehkvoo6n.cloudfront.net/07583008e4da885801657e8781777844/as/Python%20editing.png) + +Opening recently opened files with the [mru.vim](https://github.com/vim-scripts/mru.vim) plugin: + +![Screenshot 2](https://dnp4pehkvoo6n.cloudfront.net/1d49a88f9bd5d013c025bb1e1272a7d8/as/MRU%20plugin.png) [NERD Tree](https://github.com/scrooloose/nerdtree) plugin in a terminal window: -![Screenshot 3](http://files1.wedoist.com/b1509d7ed9e9f357e8d04797f9fad67b/as/screenshot3.png) - -This vimrc even works on Windows! -![Screenshot 4](http://files1.wedoist.com/4e85163d97b81422240c822c82022f2f/as/screenshot_4.png) +![Screenshot 3](https://dnp4pehkvoo6n.cloudfront.net/ae719203166585d64728f28398f4b1b7/as/Terminal%20usage.png) Distraction free mode using [goyo.vim](https://github.com/junegunn/goyo.vim) and [vim-zenroom2](https://github.com/amix/vim-zenroom2): -![Screenshot 5](https://d2dq6e731uoz0t.cloudfront.net/a5182977c3d6c2a6cd3f9e97398ca8ca/as/zen_mode.jpg) +![Screenshot 4](https://dnp4pehkvoo6n.cloudfront.net/f0dcc4c9739148c56cbf8285a910ac41/as/Zen%20mode.png) ## Included Plugins -I recommend reading the docs of these plugins to understand them better. Each of them provide a much better Vim experience! +I recommend reading the docs of these plugins to understand them better. Each plugin provides 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 `` +* [ack.vim](https://github.com/mileszs/ack.vim): Vim plugin for `the_silver_searcher` (ag) or ack -- 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. 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 `` +* [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 -* [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) @@ -109,37 +107,38 @@ Remove all clutter and focus only on the essential. Similar to iA Writer or Writ ## How to include your own stuff? -After you have installed the setup you can create **~/.vim_runtime/my_configs.vim** to fill in any configurations that are important for you. For instance, my **my_configs.vim** looks like this: +After you have installed the setup, you can create **~/.vim_runtime/my_configs.vim** to fill in any configurations that are important for you. For instance, my **my_configs.vim** looks like this: ~/.vim_runtime (master)> cat my_configs.vim 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 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 +The [leader](http://learnvimscriptthehardway.stevelosh.com/chapters/06.html#leader) is `,`, so whenever you see `` it means `,`. + + ### Plugin related mappings -Open [bufexplorer](https://github.com/vim-scripts/bufexplorer.zip) and see and manage the current buffers (`o`): +Open [bufexplorer](https://github.com/vim-scripts/bufexplorer.zip) to see and manage the current buffers (`o`): map o :BufExplorer -Open [MRU.vim](https://github.com/vim-scripts/mru.vim) and see the recently open files (`f`): +Open [MRU.vim](https://github.com/vim-scripts/mru.vim) to see the recently open files (`f`): map f :MRU -Open [ctrlp.vim](https://github.com/kien/ctrlp.vim) plugin (`j` or `f`): +Open [ctrlp.vim](https://github.com/kien/ctrlp.vim) plugin to quickly find a file or a buffer (`j` or `f`): let g:ctrlp_map = '' -Managing the [NERD Tree](https://github.com/scrooloose/nerdtree) plugin: +[NERD Tree](https://github.com/scrooloose/nerdtree) mappings: map nn :NERDTreeToggle map nb :NERDTreeFromBookmark @@ -149,6 +148,7 @@ Managing the [NERD Tree](https://github.com/scrooloose/nerdtree) plugin: map z :Goyo + ### Normal mode mappings Fast saving of a buffer (`w`): @@ -161,7 +161,7 @@ Map `` to `/` (search) and `+` to `?` (backwards search): map ? map :noh -Disable highlight when `` is pressed: +Disable highlights when you press ``: map :noh @@ -172,7 +172,7 @@ Smart way to move between windows (`j` etc.): map h map l -Closing of current buffer(s) (`bd` and (`ba`)): +Closing of the current buffer(s) (`bd` and (`ba`)): " Close current buffer map bd :Bclose @@ -191,22 +191,14 @@ Useful mappings for managing tabs: " Super useful when editing files in the same directory map te :tabedit =expand("%:p:h")/ -Switch CWD to the directory of the open buffer: +Switch [CWD](http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file) to the directory of the open buffer: map cd :cd %:p:h:pwd -Open vimgrep and put the cursor in the right position: +Open `ack.vim` for fast search: - map g :vimgrep // **/*. + map g :Ack -Vimgreps in the current file: - - map :vimgrep // % - -Remove the Windows ^M - when the encodings gets messed up: - - noremap m mmHmt:%s///ge'tzt'm - Quickly open a buffer for scripbble: map q :e ~/buffer @@ -216,6 +208,31 @@ Toggle paste mode on and off: map pp :setlocal paste! +### Visual mode mappings + +Visual mode pressing `*` or `#` searches for the current selection: + + vnoremap * :call VisualSelection('f') + vnoremap # :call VisualSelection('b') + +When you press gv you `Ack.vim` after the selected text: + + vnoremap gv :call VisualSelection('gv', '') + +When you press `r` you can search and replace the selected text: + + vnoremap r :call VisualSelection('replace') + +Surround the visual selection in parenthesis/brackets/etc.: + + vnoremap $1 `>a)` + vnoremap $2 `>a]` + vnoremap $3 `>a}` + vnoremap $$ `>a"` + vnoremap $q `>a'` + vnoremap $e `>a"` + + ### Insert mode mappings Quickly insert parenthesis/brackets/etc.: @@ -233,31 +250,6 @@ Insert the current date and time (useful for timestamps): iab xdate =strftime("%d/%m/%y %H:%M:%S") -### Visual mode mappings - -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: - - vnoremap gv :call VisualSelection('gv') - -When you press `r` you can search and replace the selected text: - - vnoremap r :call VisualSelection('replace') - -Surround the visual selection in parenthesis/brackets/etc.: - - vnoremap $1 `>a)` - vnoremap $2 `>a]` - vnoremap $3 `>a}` - vnoremap $$ `>a"` - vnoremap $q `>a'` - vnoremap $e `>a"` - - ### Command line mappings $q is super useful when browsing on the command line. It deletes everything until the last slash: @@ -273,27 +265,28 @@ 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 ### Spell checking -Pressing `ss` will toggle and untoggle spell checking +Pressing `ss` will toggle spell checking: map ss :setlocal spell! -Shortcuts using `` instead of special chars +Shortcuts using `` instead of special characters: map sn ]s map sp [s map sa zg map s? z= -### 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: +### Cope +Query `:help cope` if you are unsure what cope is. It's super useful! + +When you search with `Ack.vim`, display your results in cope by doing: `cc` To go to the next search result do: @@ -302,15 +295,15 @@ To go to the next search result do: To go to the previous search results do: `p` -Vimscript mappings: +Cope mappings: map cc :botright cope map co ggVGy:tabnew:set syntax=qfpgg map n :cn map p :cp + ## How to uninstall -Do following: +Just do following: * Remove `~/.vim_runtime` * Remove any lines that reference `.vim_runtime` in your `~/.vimrc` - diff --git a/install_awesome_vimrc.sh b/install_awesome_vimrc.sh index e8330afc..6b94e519 100644 --- a/install_awesome_vimrc.sh +++ b/install_awesome_vimrc.sh @@ -1,3 +1,6 @@ +#!/bin/sh +set -e + cd ~/.vim_runtime echo 'set runtimepath+=~/.vim_runtime diff --git a/install_basic_vimrc.sh b/install_basic_vimrc.sh index 3478144d..6b3142d1 100644 --- a/install_basic_vimrc.sh +++ b/install_basic_vimrc.sh @@ -1,3 +1,6 @@ +#!/bin/sh +set -e + cd ~/.vim_runtime cat ~/.vim_runtime/vimrcs/basic.vim > ~/.vimrc echo "Installed the Basic Vim configuration successfully! Enjoy :-)" diff --git a/sources_non_forked/ack.vim/README.md b/sources_non_forked/ack.vim/README.md index af8f522d..fca907fa 100644 --- a/sources_non_forked/ack.vim/README.md +++ b/sources_non_forked/ack.vim/README.md @@ -2,22 +2,22 @@ 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. +This plugin was designed as a Vim frontend for the programmer's search tool +[ack]. ack can be used as a replacement for 99% of the uses of `grep`. The +plugin allows you to search with ack from within 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 +### ack You will need ack (>= 2.0), of course. To install it follow the [manual](http://beyondgrep.com/install/). @@ -49,8 +49,6 @@ NeoBundle 'mileszs/ack.vim' [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}] @@ -60,7 +58,7 @@ 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 +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 @@ -78,9 +76,9 @@ 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 + go to preview file, keeping focus on the results t to open in new tab - T to open in new tab without moving to it + T to open in new tab, keeping focus on the results h to open in horizontal split H to open in horizontal split, keeping focus on the results v to open in vertical split @@ -140,22 +138,22 @@ the convention of Vim's built-in `:grep` and `:make` commands. ## Changelog -Please see [the Github releases page][releases]. +Please see [the GitHub releases page][releases]. ## Credits -This plugin is derived from Antoine Imbert's blog post [Ack and Vim +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. +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 +[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/ +[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/ag.vim/.gitignore b/sources_non_forked/ag.vim/.gitignore deleted file mode 100644 index e350eccf..00000000 --- a/sources_non_forked/ag.vim/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -tags -ag-vim.tgz diff --git a/sources_non_forked/ag.vim/README.md b/sources_non_forked/ag.vim/README.md deleted file mode 100644 index e02a4d3e..00000000 --- a/sources_non_forked/ag.vim/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# ag.vim # - -## Deprecated: See [this comment](https://github.com/rking/ag.vim/issues/124#issuecomment-227038003) for more info. Maybe try [ack.vim](https://github.com/mileszs/ack.vim#can-i-use-ag-the-silver-searcher-with-this) as an alternative. ## - -This plugin is a front for ag, A.K.A. -[the_silver_searcher](https://github.com/ggreer/the_silver_searcher). Ag can -be used as a replacement for 153% of the uses of `ack`. This plugin will allow -you to run ag from vim, and shows the results in a split window. - -## Installation ## - -See [the_silver_searcher's README](https://github.com/ggreer/the_silver_searcher#installing) for its installation instructions (if you haven't installed it already). - -You have to first install [ag](https://github.com/ggreer/the_silver_searcher), itself. On Mac+Homebrew, Gentoo Linux, several others, there's package named `the_silver_searcher`, but if your OS/distro don't have one, the GitHub repo installs fine: - -Vim has various ways of installing plugins, the standard way is in [the documentation](http://vimdoc.sourceforge.net/htmldoc/usr_05.html#plugin), but most people use a plugin to manage their plugins. If you don't already have a preferred plugin manager plugin, why not try one of the following? -- [vim-plug](https://github.com/junegunn/vim-plug#readme) -- [vim-pathogen](https://github.com/tpope/vim-pathogen#readme) -- [Vundle.vim](https://github.com/gmarik/Vundle.vim#readme) -- Or, if you don't use any sort of Vim plugin management: - - ```sh - cd ~/.vim/bundle && git clone https://github.com/rking/ag.vim ag && echo "set runtimepath^=~/.vim/bundle/ag" >> ~/.vimrc - ``` - - Then open vim and run `:helptags ~/.vim/bundle/ag/doc`. - -### Configuration ### - -You can specify a custom ag name and path in your .vimrc like so: - - let g:ag_prg=" --vimgrep" - -You can configure ag.vim to always start searching from your project root -instead of the cwd - - let g:ag_working_path_mode="r" - -## Usage ## - - :Ag [options] {pattern} [{directory}] - -Search recursively in {directory} (which defaults to the current directory) for the {pattern}. - -Files containing the search term will be listed in the split window, along with -the line number of the occurrence, once for each occurrence. [Enter] 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 `:Ag`, `:AgAdd`, `:LAg`, and `:LAgAdd` respectively. (See `doc/ag.txt`, or install and `:h Ag` for more information.) - -### Gotchas ### - -Some characters have special meaning, and need to be escaped your search pattern. For instance, '#'. You have to escape it like this `:Ag '\\\#define foo'` to search for `#define foo`. (From [blueyed in issue #5](https://github.com/mileszs/ack.vim/issues/5).) - -Sometimes `git grep` is even faster, though in my experience it's not noticeably so. - -### Keyboard Shortcuts ### - -In the quickfix window, you can use: - - e to open file and close the quickfix window - o to open (same as enter) - go to preview file (open but maintain focus on ag.vim results) - t to open in new tab - T to open in new tab silently - h to open in horizontal split - H to open in horizontal split silently - v to open in vertical split - gv to open in vertical split silently - q to close the quickfix window - -### Related Plugin ### -[vim-ag-anything](https://github.com/Chun-Yang/vim-ag-anything) adds an 'ga' action to search any text object. - -### Acknowledgements ### - -This Vim plugin is derived (and by derived, I mean copied, almost entirely) -from [milesz's ack.vim](https://github.com/mileszs/ack.vim), which I also -recommend installing since you might be in a situation where you have ack but -not ag, and don't want to stop to install ag. Also, ack supports `--type`, and -a few other features. diff --git a/sources_non_forked/ag.vim/Rakefile b/sources_non_forked/ag.vim/Rakefile deleted file mode 100644 index e6bb6da7..00000000 --- a/sources_non_forked/ag.vim/Rakefile +++ /dev/null @@ -1,3 +0,0 @@ -task :tgz do - sh 'cd ..; tar czvf ag/ag-vim.tgz ag/{plugin,autoload,doc}' -end diff --git a/sources_non_forked/ag.vim/autoload/ag.vim b/sources_non_forked/ag.vim/autoload/ag.vim deleted file mode 100644 index 432ef444..00000000 --- a/sources_non_forked/ag.vim/autoload/ag.vim +++ /dev/null @@ -1,234 +0,0 @@ -" NOTE: You must, of course, install ag / the_silver_searcher - -" FIXME: Delete deprecated options below on or after 2016-4 (6 months from when the deprecation warning was added) {{{ - -if exists("g:agprg") - let g:ag_prg = g:agprg - echohl WarningMsg - call input('g:agprg is deprecated and will be removed. Please use g:ag_prg') - echohl None -endif - -if exists("g:aghighlight") - let g:ag_highlight = g:aghighlight - echohl WarningMsg - call input('g:aghighlight is deprecated and will be removed. Please use g:ag_highlight') - echohl None -endif - -if exists("g:agformat") - let g:ag_format = g:agformat - echohl WarningMsg - call input('g:agformat is deprecated and will be removed. Please use g:ag_format') - echohl None -endif - -" }}} FIXME: Delete the deprecated options above on or after 15-7 (6 months from when they were changed) - -" Location of the ag utility -if !exists("g:ag_prg") - " --vimgrep (consistent output we can parse) is available from version 0.25.0+ - if split(system("ag --version"), "[ \n\r\t]")[2] =~ '\d\+.\(\(2[5-9]\)\|\([3-9][0-9]\)\)\(.\d\+\)\?' - let g:ag_prg="ag --vimgrep" - else - " --noheading seems odd here, but see https://github.com/ggreer/the_silver_searcher/issues/361 - let g:ag_prg="ag --column --nogroup --noheading" - endif -endif - -if !exists("g:ag_apply_qmappings") - let g:ag_apply_qmappings=1 -endif - -if !exists("g:ag_apply_lmappings") - let g:ag_apply_lmappings=1 -endif - -if !exists("g:ag_qhandler") - let g:ag_qhandler="botright copen" -endif - -if !exists("g:ag_lhandler") - let g:ag_lhandler="botright lopen" -endif - -if !exists("g:ag_mapping_message") - let g:ag_mapping_message=1 -endif - -if !exists("g:ag_working_path_mode") - let g:ag_working_path_mode = 'c' -endif - -function! ag#AgBuffer(cmd, args) - let l:bufs = filter(range(1, bufnr('$')), 'buflisted(v:val)') - let l:files = [] - for buf in l:bufs - let l:file = fnamemodify(bufname(buf), ':p') - if !isdirectory(l:file) - call add(l:files, l:file) - endif - endfor - call ag#Ag(a:cmd, a:args . ' ' . join(l:files, ' ')) -endfunction - -function! ag#Ag(cmd, args) - let l:ag_executable = get(split(g:ag_prg, " "), 0) - - " Ensure that `ag` is installed - if !executable(l:ag_executable) - echoe "Ag command '" . l:ag_executable . "' was not found. Is the silver searcher installed and on your $PATH?" - return - endif - - " If no pattern is provided, search for the word under the cursor - if empty(a:args) - let l:grepargs = expand("") - else - let l:grepargs = a:args . join(a:000, ' ') - end - - if empty(l:grepargs) - echo "Usage: ':Ag {pattern}' (or just :Ag to search for the word under the cursor). See ':help :Ag' for more information." - return - endif - - " Format, used to manage column jump - if a:cmd =~# '-g$' - let s:ag_format_backup=g:ag_format - let g:ag_format="%f" - elseif exists("s:ag_format_backup") - let g:ag_format=s:ag_format_backup - elseif !exists("g:ag_format") - let g:ag_format="%f:%l:%c:%m" - endif - - let l:grepprg_bak=&grepprg - let l:grepformat_bak=&grepformat - let l:t_ti_bak=&t_ti - let l:t_te_bak=&t_te - try - let &grepprg=g:ag_prg - let &grepformat=g:ag_format - set t_ti= - set t_te= - if g:ag_working_path_mode ==? 'r' " Try to find the projectroot for current buffer - let l:cwd_back = getcwd() - let l:cwd = s:guessProjectRoot() - try - exe "lcd ".l:cwd - catch - echom 'Failed to change directory to:'.l:cwd - finally - silent! execute a:cmd . " " . escape(l:grepargs, '|') - exe "lcd ".l:cwd_back - endtry - else " Someone chose an undefined value or 'c' so we revert to the default - silent! execute a:cmd . " " . escape(l:grepargs, '|') - endif - finally - let &grepprg=l:grepprg_bak - let &grepformat=l:grepformat_bak - let &t_ti=l:t_ti_bak - let &t_te=l:t_te_bak - endtry - - if a:cmd =~# '^l' - let l:match_count = len(getloclist(winnr())) - else - let l:match_count = len(getqflist()) - endif - - if a:cmd =~# '^l' && l:match_count - exe g:ag_lhandler - let l:apply_mappings = g:ag_apply_lmappings - let l:matches_window_prefix = 'l' " we're using the location list - elseif l:match_count - exe g:ag_qhandler - let l:apply_mappings = g:ag_apply_qmappings - let l:matches_window_prefix = 'c' " we're using the quickfix window - endif - - " If highlighting is on, highlight the search keyword. - if exists('g:ag_highlight') - let @/ = matchstr(a:args, "\\v(-)\@", 'n') - end - - redraw! - - if l:match_count - if l:apply_mappings - nnoremap h K - nnoremap H Kb - nnoremap o - nnoremap t T - nnoremap T TgT - nnoremap v HbJt - - exe 'nnoremap e :' . l:matches_window_prefix .'close' - exe 'nnoremap go :' . l:matches_window_prefix . 'open' - exe 'nnoremap q :' . l:matches_window_prefix . 'close' - - exe 'nnoremap gv :let b:height=winheight(0)H:' . l:matches_window_prefix . 'openJ:exe printf(":normal %d\c-w>_", b:height)' - " Interpretation: - " :let b:height=winheight(0) Get the height of the quickfix/location list window - " Open the current item in a new split - " H Slam the newly opened window against the left edge - " :copen -or- :lopen Open either the quickfix window or the location list (whichever we were using) - " J Slam the quickfix/location list window against the bottom edge - " :exe printf(":normal %d\c-w>_", b:height) Restore the quickfix/location list window's height from before we opened the match - - if g:ag_mapping_message && l:apply_mappings - echom "ag.vim keys: q=quit /e/t/h/v=enter/edit/tab/split/vsplit go/T/H/gv=preview versions of same" - endif - endif - else " Close the split window automatically: - cclose - lclose - echohl WarningMsg - echom 'No matches for "'.a:args.'"' - echohl None - endif -endfunction - -function! ag#AgFromSearch(cmd, args) - let search = getreg('/') - " translate vim regular expression to perl regular expression. - let search = substitute(search,'\(\\<\|\\>\)','\\b','g') - call ag#Ag(a:cmd, '"' . search .'" '. a:args) -endfunction - -function! ag#GetDocLocations() - let dp = '' - for p in split(&runtimepath,',') - let p = p.'doc/' - if isdirectory(p) - let dp = p.'*.txt '.dp - endif - endfor - return dp -endfunction - -function! ag#AgHelp(cmd,args) - let args = a:args.' '.ag#GetDocLocations() - call ag#Ag(a:cmd,args) -endfunction - -function! s:guessProjectRoot() - let l:splitsearchdir = split(getcwd(), "/") - - while len(l:splitsearchdir) > 2 - let l:searchdir = '/'.join(l:splitsearchdir, '/').'/' - for l:marker in ['.rootdir', '.git', '.hg', '.svn', 'bzr', '_darcs', 'build.xml'] - " found it! Return the dir - if filereadable(l:searchdir.l:marker) || isdirectory(l:searchdir.l:marker) - return l:searchdir - endif - endfor - let l:splitsearchdir = l:splitsearchdir[0:-2] " Splice the list to get rid of the tail directory - endwhile - - " Nothing found, fallback to current working dir - return getcwd() -endfunction diff --git a/sources_non_forked/ag.vim/doc/ag.txt b/sources_non_forked/ag.vim/doc/ag.txt deleted file mode 100644 index e702c291..00000000 --- a/sources_non_forked/ag.vim/doc/ag.txt +++ /dev/null @@ -1,174 +0,0 @@ -*ag.txt* Plugin that integrates ag with Vim - -============================================================================== -INTRODUCTION *ag* - -This plugin is a front for the_silver_searcher: ag. Ag can be used as a -replacement for ack. This plugin will allow you to run ag from vim, and shows -the results in a split window. - -:Ag[!] [options] {pattern} [{directory}] *:Ag* - - 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 - error is jumped to. - -:AgBuffer[!] [options] {pattern} *:AgBuffer* - - Search for {pattern} in all open buffers. Behaves just like the |:grep| - command, but will open the |Quickfix| window for you. If [!] is not given - the first error is jumped to. - - Note: this will not find changes in modified buffers, since ag can only - find what is on disk! You can save buffers automatically when searching - with the 'autowrite' option. A buffer will be ignored if it is a directory - (an explorer, like netrw). - -:AgAdd [options] {pattern} [{directory}] *:AgAdd* - - Just like |:Ag|, but instead of making a new list, the matches are - appended to the current |quickfix| list. - -:AgFromSearch [{directory}] *:AgFromSearch* - - Just like |:Ag| but the pattern is from previous search. - -:LAg [options] {pattern} [{directory}] *:LAg* - - Just like |:Ag| but instead of the |quickfix| list, matches are placed in - the current |location-list|. - -:LAgBuffer [options] {pattern} *:LAgBuffer* - - Just like |:AgBuffer| but instead of the |quickfix| list, matches are - placed in the current |location-list|. - -:LAgAdd [options] {pattern} [{directory}] *:LAgAdd* - - Just like |:AgAdd| but instead of the |quickfix| list, matches are added - to the current |location-list| - -:AgFile [options] {pattern} [{directory}] *:AgFile* - - 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. - -:AgHelp[!] [options] {pattern} *:AgHelp* - - Search vim documentation files for the {pattern}. Behaves just like the - |:Ag| command, but searches only vim documentation .txt files - -:LAgHelp [options] {pattern} *:LAgHelp* - - Just like |:AgHelp| 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. - -See http://geoff.greer.fm/2011/12/27/the-silver-searcher-better-than-ack/ for -more information. - -============================================================================== -OPTIONS *ag-options* - - *g:ag_prg* -The location of the Ag program, and any options you want passed to it before -searching. Default: "ag --vimgrep" (for parsable output). Example: > - let g:ag_prg="ag --vimgrep --smart-case" -< -Note: the `--vimgrep` option was added in Ag 0.25.0. If ag.vim detects that -you're using a lower version, the following default will be used instead: > - let g:ag_prg="ag --column --nogroup --noheading" -< -This works around inconsistent behaviors in earlier Ag versions, but it is -recommended that you upgrade if possible for a better experience. `--vimgrep` -supports multiple matches on the same line of text, for example. - -For background, see: https://github.com/rking/ag.vim/pull/88 - - *g:ag_working_path_mode* -A mapping that describes where ag will be run. Default is the current working -directory. Specifying 'r' as the argument will tell it to run from the project -rootdirectory. For now any other mapping will result to the default. -Example: - let g:ag_working_path_mode='r' - - *g:ag_highlight* -If 1, highlight the search terms after searching. Default: 0. Example: > - let g:ag_highlight=1 -< - - *g:ag_format* -Format to recognize the matches. See 'errorformat' for more info. Default: -"%f" when searching for files, "%f:%l:%c:%m" if not otherwise set. For -example, if your `g:ag_prg` is set to just "ag" (no column numbers in the -output, so when you jump to a match your cursor will be on the start of the -line): > - let g:ag_format="%f:%l:%m" -< - - *g:ag_apply_lmappings* -Whether or not to add custom mappings to location list windows opened by this -plugin. Only applies if you're using the location list. Default 1. Example: > - let g:ag_apply_lmappings=0 -< - - *g:ag_apply_qmappings* -Whether or not to add custom mappings to quickfix windows opened by this -plugin. Only applies if you're using the error list. Default 1. Example: > - let g:ag_apply_qmappings=0 -< - - *g:ag_lhandler* -A custom command used to open the location list after it's populated. -Default: "botright lopen". You might want to set this to change where the -location list is opened, or what size it is. Example: > - let g:ag_lhandler="topleft lopen" -< - - *g:ag_qhandler* -A custom command used to open the error list after it's populated. Default: -"botright copen". You might want to set this to change where the quickfix -window is opened, or what size it is. Example: > - let g:ag_qhandler="copen 20" -< - - *g:ag_mapping_message* -Whether or not to show the message explaining the extra mappings that are -added to the results list this plugin populates. This message is not shown if -the mappings are not applied (see |g:ag_apply_qmappings| and -|g:ag_apply_lmappings| for more info. Default 1. Example: > - let g:ag_mapping_message=0 -< - -============================================================================== -MAPPINGS *ag-mappings* - -The following keyboard shortcuts are available in the quickfix window: - -e open file and close the quickfix window. - -o open file (same as enter). - -go preview file (open but maintain focus on ag.vim results). - -t open in a new tab. - -T open in new tab silently. - -h open in horizontal split. - -H open in horizontal split silently. - -v open in vertical split. - -gv open in vertical split silently. - -q close the quickfix window. - - vim:tw=78:fo=tcq2:ft=help:norl: diff --git a/sources_non_forked/ag.vim/plugin/ag.vim b/sources_non_forked/ag.vim/plugin/ag.vim deleted file mode 100644 index 053f213c..00000000 --- a/sources_non_forked/ag.vim/plugin/ag.vim +++ /dev/null @@ -1,11 +0,0 @@ -" NOTE: You must, of course, install ag / the_silver_searcher -command! -bang -nargs=* -complete=file Ag call ag#Ag('grep',) -command! -bang -nargs=* -complete=file AgBuffer call ag#AgBuffer('grep',) -command! -bang -nargs=* -complete=file AgAdd call ag#Ag('grepadd', ) -command! -bang -nargs=* -complete=file AgFromSearch call ag#AgFromSearch('grep', ) -command! -bang -nargs=* -complete=file LAg call ag#Ag('lgrep', ) -command! -bang -nargs=* -complete=file LAgBuffer call ag#AgBuffer('lgrep',) -command! -bang -nargs=* -complete=file LAgAdd call ag#Ag('lgrepadd', ) -command! -bang -nargs=* -complete=file AgFile call ag#Ag('grep -g', ) -command! -bang -nargs=* -complete=help AgHelp call ag#AgHelp('grep',) -command! -bang -nargs=* -complete=help LAgHelp call ag#AgHelp('lgrep',) diff --git a/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim b/sources_non_forked/ctrlp.vim/autoload/ctrlp.vim index 65589393..b1fe859c 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 @@ -2304,7 +2305,7 @@ fu! s:lastvisual() let cview = winsaveview() let [ovreg, ovtype] = [getreg('v'), getregtype('v')] let [oureg, outype] = [getreg('"'), getregtype('"')] - sil! norm! gv"vy + sil! norm! gV"vy let selected = s:regisfilter('v') cal setreg('v', ovreg, ovtype) cal setreg('"', oureg, outype) @@ -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/autoload/ctrlp/line.vim b/sources_non_forked/ctrlp.vim/autoload/ctrlp/line.vim index 5bec47ee..17b6061b 100644 --- a/sources_non_forked/ctrlp.vim/autoload/ctrlp/line.vim +++ b/sources_non_forked/ctrlp.vim/autoload/ctrlp/line.vim @@ -31,7 +31,7 @@ endf " Public {{{1 fu! ctrlp#line#init(bufnr) let [lines, bufnr] = [[], exists('s:bufnr') ? s:bufnr : a:bufnr] - let bufs = exists('s:lnmode') && s:lnmode ? ctrlp#buffers('id') : [bufnr] + let bufs = exists('s:lnmode') && !empty(s:lnmode) ? ctrlp#buffers('id') : [bufnr] for bufnr in bufs let [lfb, bufn] = [getbufline(bufnr, 1, '$'), bufname(bufnr)] if lfb == [] && bufn != '' diff --git a/sources_non_forked/ctrlp.vim/doc/ctrlp.cnx b/sources_non_forked/ctrlp.vim/doc/ctrlp.cnx index c2d69729..1f8a2ee6 100644 --- a/sources_non_forked/ctrlp.vim/doc/ctrlp.cnx +++ b/sources_non_forked/ctrlp.vim/doc/ctrlp.cnx @@ -1,4 +1,4 @@ -*ctrlp.txt* 模糊的 文件, 缓冲区, 最近最多使用, 标签, ... 检索. v1.79 +*ctrlp.txt* 支持模糊匹配的 文件, 缓冲区, 最近最多使用, 标签, ... 检索. v1.79 *CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'* =============================================================================== # # @@ -68,7 +68,7 @@ OPTIONS *ctrlp-options* |ctrlp_arg_map|...............是否拦截 命令。 |ctrlp_follow_symlinks|.......是否跟随链接。 |ctrlp_lazy_update|...........停止输入时才更新。 - |ctrlp_default_input|.........为提示符面板提供一个种子。 + |ctrlp_default_input|.........为提示符面板提供一个初始字符串。 |ctrlp_abbrev|................输入缩写。 |ctrlp_key_loop|..............为多字节输入开启输入事件循环。 |ctrlp_prompt_mappings|.......改变提示符面板内部的按键绑定。 @@ -76,6 +76,7 @@ OPTIONS *ctrlp-options* |ctrlp_open_single_match|.....当只有一个候选时自动接受。 |ctrlp_brief_prompt|..........提示符为空的时候使用退出 CtrlP。 |ctrlp_match_current_file|....在匹配条目中包含当前文件。 + |ctrlp_types|.................內建类型的名称。 最近最多使用模式: |ctrlp_mruf_max|..............记录的最近最多使用的最大数据。 @@ -154,6 +155,7 @@ OPTIONS *ctrlp-options* 结果集的最大数目: results:{n} - 列出最多 {n} 条结果 (默认: 和最大高度同步). + 0代表没有限制。 注意: 当一个设置项没有被设置时,将会使用默认值。 @@ -254,7 +256,7 @@ OPTIONS *ctrlp-options* 考虑清楚。 *'g:ctrlp_custom_ignore'* -作为对 |'wildignore'| 的补充,用来设置你只是想在CtrlP中隐藏的文件和目录。使用正 +作为对 |'wildignore'| 和 |g:ctrlp_show_hidden| 的补充,用来设置你只是想在CtrlP中隐藏的文件和目录。使用正 则表达式来指定匹配模式: > let g:ctrlp_custom_ignore = '' < @@ -439,13 +441,19 @@ OPTIONS *ctrlp-options* *'g:ctrlp_match_current_file'* -在匹配条目中包含当前文件: +在匹配条目中包含当前文件: > let g:ctrlp_match_current_file = 1 默认情况下,当前文件不包含在列表中。 注意: 当使用 |g:ctrlp_match_func| 时不会应用这个选项。 + *'g:ctrlp_types'* +通过设置这个列表变量的值来定制核心类型: > + let g:ctrlp_types = ['mru', 'fil'] + +类型默认为: > + let g:ctrlp_types = ['fil', 'buf', 'mru']. *'g:ctrlp_abbrev'* 定义可以在提示面包内被扩展(内部的或者可见的)的输入缩写: > @@ -817,7 +825,8 @@ MRU mode options:~ :CtrlP [起始目录] 用文件搜索模式打开CtrlP。 - 如果没有给定参数,|g:ctrlp_working_path_mode| 会被用来决定起始目录。 + 如果没有给定参数,|g:ctrlp_working_path_mode| 会被用来决定起始目录。临时覆盖 + 这个参数 的方法见 |:CtrlPCurFile| 和 |:CtrlPCurWD| 。 在输入时你可以使用 自动补全[起始目录]。 @@ -825,6 +834,16 @@ MRU mode options:~ :CtrlPBuffer 用缓冲区搜索模式打开CtrlP。 + *:CtrlPCurFile* +:CtrlPCurFile + 行为类似变量 |g:ctrlp_working_path_mode| = '' 时执行 |:CtrlP| ,忽略这个变量 + 现在的值。 + + *:CtrlPCurWD* +:CtrlPCurWD + 行为类似变量 |g:ctrlp_working_path_mode| = '' 时执行 |:CtrlP| ,忽略这个变量 + 现在的值。 + *:CtrlPMRU* :CtrlPMRU 用最近最多使用模式打开CtrlP。 @@ -1259,7 +1278,8 @@ h) 使用?打开帮助文件。 缓冲标签模式选项:~ *'g:ctrlp_buftag_ctags_bin'* -如果ctags没有在环境变量中配置,使用该选项来指定它的位置: > +如果ctags没有在环境变量中配置,或者一个二进制ctags文件存在于 +/opt/local/bin 或 /usr/local/bin,使用该选项来指定它的位置: > let g:ctrlp_buftag_ctags_bin = '' < @@ -1411,6 +1431,31 @@ Git 仓库: https://github.com/ctrlpvim/ctrlp.vim =============================================================================== 更新日志 *ctrlp-changelog* + * 新选项 |g:ctrlp_custom_tag_files| 用来指定自定义的标签文件。 + * 设置 g:ctrlp_match_window 为0来不限制窗口大小 + +Before 2016/11/28~ + + + 新命令: |YankLine()| 来复制整个文件。 + + 新选项: |g:ctrlp_types| 来选择內建类型。 + + 新特性: 异步在新线程中调用 |g:ctrlp_user_command| 。 设置 + |g:user_command_async| 为1来启用。 + + 为 delphi, rust 和 golang提供buffertag支持。 + + 新选项: |g:ctrlp_brief_prompt|, + |g:match_current_file|, + |g:ctrlp_compare_lim|. + + 新功能: 自动忽略扩展。 + + 为 ant, tex, dosbatch, matlab 和 vhdl提供buffertag支持。 + + 新选项 |g:ctrlp_line_prefix| 来结合第三方插件。 + + 新选项 |g:open_single_match| 在 matches 中打开单个文件。 + + 添加启动方式 (ctrlp) 。 + + 接受 bang for CtrlPBookmarkDirAdd 来避免确认。 + + 处理像 "g:ctrlp_TYPE_MODE" 大小写混合的变量名。 + 例如: let g:ctrlp_path_sort + + 新选项: |g:ctrlp_custom_ancestors| + +在2014/08/08之前~ + + 新的支持高亮的缓冲区浏览模式 (建议 |+conceal|) + 新选项: |g:ctrlp_bufname_mod|, |g:ctrlp_bufpath_mod| 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/ctrlp.vim/plugin/ctrlp.vim b/sources_non_forked/ctrlp.vim/plugin/ctrlp.vim index f31b64a2..1e56ecaf 100644 --- a/sources_non_forked/ctrlp.vim/plugin/ctrlp.vim +++ b/sources_non_forked/ctrlp.vim/plugin/ctrlp.vim @@ -39,7 +39,9 @@ if g:ctrlp_map != '' && !hasmapto('(ctrlp)') exe 'map' g:ctrlp_map '(ctrlp)' en -cal ctrlp#mrufiles#init() +if !exists('g:ctrlp_types') || index(g:ctrlp_types, 'mru') >= 0 + cal ctrlp#mrufiles#init() +en com! -bar CtrlPTag cal ctrlp#init(ctrlp#tag#id()) com! -bar CtrlPQuickfix cal ctrlp#init(ctrlp#quickfix#id()) 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..0af9e6b3 --- /dev/null +++ b/sources_non_forked/goyo.vim/doc/goyo.txt @@ -0,0 +1,170 @@ +goyo.txt goyo Last change: April 2 2017 +GOYO - TABLE OF CONTENTS *goyo* *goyo-toc* +============================================================================== + + goyo.vim (고요) + Installation + Usage + Dimension expression + Configuration + Callbacks + Inspiration + Pros. + License + +GOYO.VIM (고요) *goyo-vim* +============================================================================== + +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/lightline.vim/.travis.yml b/sources_non_forked/lightline.vim/.travis.yml index ae4b73fb..3767d735 100644 --- a/sources_non_forked/lightline.vim/.travis.yml +++ b/sources_non_forked/lightline.vim/.travis.yml @@ -4,19 +4,26 @@ sudo: false install: - git clone --depth=1 https://github.com/thinca/vim-themis /tmp/themis - - git clone https://github.com/vim/vim $HOME/vim - - (if ! test -d $HOME/vim-7.4/bin; then cd $HOME/vim && git checkout . && git checkout v7.4 && ./configure --prefix=$HOME/vim-7.4 && make && make install; fi) - - (if ! test -d $HOME/vim-7.3/bin; then cd $HOME/vim && git checkout . && git checkout v7.3 && ./configure --prefix=$HOME/vim-7.3 && make && make install; fi) - - (if ! test -d $HOME/vim-7.2.051/bin; then cd $HOME/vim && git checkout . && git checkout v7.2.051 && ./configure --prefix=$HOME/vim-7.2.051 && make && make install; fi) + - (if ! test -d $HOME/vim-$VIM_VERSION/bin; then + git clone https://github.com/vim/vim $HOME/vim && + cd $HOME/vim && + git checkout v$VIM_VERSION && + ./configure --prefix=$HOME/vim-$VIM_VERSION && + make && + make install; + fi) cache: directories: - - $HOME/vim-7.4 - - $HOME/vim-7.3 - - $HOME/vim-7.2.051 + - $HOME/vim-$VIM_VERSION + +env: + - VIM_VERSION=8.0.0000 + - VIM_VERSION=7.4 + - VIM_VERSION=7.3 + - VIM_VERSION=7.2.051 script: + - export PATH=$HOME/vim-$VIM_VERSION/bin:$PATH + - vim --version - /tmp/themis/bin/themis --reporter spec - - PATH=$HOME/vim-7.4/bin/:$PATH /tmp/themis/bin/themis --reporter spec - - PATH=$HOME/vim-7.3/bin/:$PATH /tmp/themis/bin/themis --reporter spec - - PATH=$HOME/vim-7.2.051/bin/:$PATH /tmp/themis/bin/themis --reporter spec diff --git a/sources_non_forked/lightline.vim/README.md b/sources_non_forked/lightline.vim/README.md index 2b80f35b..e97b6b7a 100644 --- a/sources_non_forked/lightline.vim/README.md +++ b/sources_non_forked/lightline.vim/README.md @@ -65,7 +65,7 @@ This software is released under the MIT License, see LICENSE. git clone https://github.com/itchyny/lightline.vim ~/.vim/bundle/lightline.vim -### Vundle (https://github.com/gmarik/Vundle.vim) +### Vundle (https://github.com/VundleVim/Vundle.vim) 1. Add the following configuration to your `.vimrc`. Plugin 'itchyny/lightline.vim' 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/nerdtree/autoload/nerdtree.vim b/sources_non_forked/nerdtree/autoload/nerdtree.vim index e0d86efa..63fa5c13 100644 --- a/sources_non_forked/nerdtree/autoload/nerdtree.vim +++ b/sources_non_forked/nerdtree/autoload/nerdtree.vim @@ -89,10 +89,12 @@ function! nerdtree#deprecated(func, ...) endfunction " FUNCTION: nerdtree#exec(cmd) {{{2 -" same as :exec cmd but eventignore=all is set for the duration +" Same as :exec cmd but with eventignore set for the duration +" to disable the autocommands used by NERDTree (BufEnter, +" BufLeave and VimEnter) function! nerdtree#exec(cmd) let old_ei = &ei - set ei=all + set ei=BufEnter,BufLeave,VimEnter exec a:cmd let &ei = old_ei endfunction diff --git a/sources_non_forked/nerdtree/doc/NERD_tree.txt b/sources_non_forked/nerdtree/doc/NERD_tree.txt index d0af4a82..3b7b9504 100644 --- a/sources_non_forked/nerdtree/doc/NERD_tree.txt +++ b/sources_non_forked/nerdtree/doc/NERD_tree.txt @@ -806,7 +806,7 @@ then all files ending in .vim or ~ will be ignored. There are 2 magic flags that can be appended to the end of each regular expression to specify that the regex should match only files or only dirs. These flags are "[[dir]]" and "[[file]]". Example: > - let NERDTreeIgnore=['.d$[[dir]]', '.o$[[file]]'] + let NERDTreeIgnore=['\.d$[[dir]]', '\.o$[[file]]'] < This will cause all dirs ending in ".d" to be ignored and all files ending in ".o" to be ignored. diff --git a/sources_non_forked/nerdtree/lib/nerdtree/path.vim b/sources_non_forked/nerdtree/lib/nerdtree/path.vim index 26db4a31..6f48a188 100644 --- a/sources_non_forked/nerdtree/lib/nerdtree/path.vim +++ b/sources_non_forked/nerdtree/lib/nerdtree/path.vim @@ -544,7 +544,7 @@ function! s:Path.readInfoFromDisk(fullpath) throw "NERDTree.InvalidFiletypeError: Cant handle FIFO files: " . a:fullpath endif - let self.pathSegments = split(fullpath, '/') + let self.pathSegments = filter(split(fullpath, '/'), '!empty(v:val)') let self.isReadOnly = 0 if isdirectory(a:fullpath) diff --git a/sources_non_forked/syntastic/README.markdown b/sources_non_forked/syntastic/README.markdown index 4212c95a..8f0e4607 100644 --- a/sources_non_forked/syntastic/README.markdown +++ b/sources_non_forked/syntastic/README.markdown @@ -58,15 +58,15 @@ their script to find them. At the time of this writing, syntastic has checking plugins for ACPI Source Language, ActionScript, Ada, Ansible configurations, API Blueprint, -AppleScript, AsciiDoc, Assembly languages, BEMHTML, Bro, Bourne shell, C, -C++, C#, Cabal, Chef, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart, +AppleScript, AsciiDoc, Assembly languages, BEMHTML, Bro, Bourne shell, C, C++, +C#, Cabal, Chef, CMake, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart, DocBook, Dockerfile, Dust, Elixir, Erlang, eRuby, Fortran, Gentoo metadata, -GLSL, Go, Haml, Haskell, Haxe, Handlebars, HSS, HTML, Java, JavaScript, JSON, -JSX, LESS, Lex, Limbo, LISP, LLVM intermediate language, Lua, Markdown, -MATLAB, Mercury, NASM, Nix, Objective-C, Objective-C++, OCaml, Perl, Perl -POD, PHP, gettext Portable Object, OS X and iOS property lists, Pug (formerly -Jade), Puppet, Python, QML, R, Racket, RDF TriG, RDF Turtle, Relax NG, -reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Solidity, +GLSL, Go, Haml, Haskell, Haxe, Handlebars, HSS, HTML, Java, JavaScript, +JSON, JSX, Julia, LESS, Lex, Limbo, LISP, LLVM intermediate language, Lua, +Markdown, MATLAB, Mercury, NASM, Nix, Objective-C, Objective-C++, OCaml, Perl, +Perl POD, PHP, gettext Portable Object, OS X and iOS property lists, Pug +(formerly Jade), Puppet, Python, QML, R, Racket, RDF TriG, RDF Turtle, Relax +NG, reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Solidity, Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog, VHDL, Vim help, VimL, xHtml, XML, XSLT, XQuery, YACC, YAML, YANG data models, z80, Zope page templates, and Zsh. See the [manual][checkers] for details about the diff --git a/sources_non_forked/syntastic/autoload/syntastic/preprocess.vim b/sources_non_forked/syntastic/autoload/syntastic/preprocess.vim index 9d25b849..52ec865a 100644 --- a/sources_non_forked/syntastic/autoload/syntastic/preprocess.vim +++ b/sources_non_forked/syntastic/autoload/syntastic/preprocess.vim @@ -8,6 +8,37 @@ set cpo&vim " Public functions {{{1 +function! syntastic#preprocess#bandit(errors) abort " {{{2 + let out = [] + let json = s:_decode_JSON(join(a:errors, '')) + + if type(json) == type({}) && has_key(json, 'results') && type(json['results']) == type([]) + for issue in json['results'] + if type(issue) == type({}) + try + call add(out, + \ issue['filename'] . ':' . + \ issue['line_number'] . ':' . + \ { 'LOW': 'I', 'MEDIUM': 'W', 'HIGH': 'E' }[issue['issue_severity']] . ':' . + \ issue['test_id'][1:] . ':' . + \ issue['issue_text'] . + \ ' [' . issue['test_name'] . '] (confidence: ' . issue['issue_confidence'] . ')') + catch /\m^Vim\%((\a\+)\)\=:E716/ + call syntastic#log#warn('checker python/bandit: unrecognized error item ' . string(issue)) + let out = [] + break + endtry + else + call syntastic#log#warn('checker python/bandit: unrecognized error item ' . string(issue)) + endif + endfor + else + call syntastic#log#warn('checker python/bandit: unrecognized error format (crashed checker?)') + endif + + return out +endfunction " }}}2 + function! syntastic#preprocess#cabal(errors) abort " {{{2 let out = [] let star = 0 @@ -98,6 +129,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] !=# '{' @@ -406,7 +466,7 @@ echomsg string(out) endfunction " }}}2 function! syntastic#preprocess#tslint(errors) abort " {{{2 - return map(copy(a:errors), 'substitute(v:val, ''\m^\(([^)]\+)\)\s\(.\+\)$'', ''\2 \1'', "")') + return map(copy(a:errors), 'substitute(v:val, ''\v^((ERROR|WARNING): )?\zs(\([^)]+\))\s(.+)$'', ''\4 \3'', "")') endfunction " }}}2 function! syntastic#preprocess#validator(errors) abort " {{{2 diff --git a/sources_non_forked/syntastic/doc/syntastic-checkers.txt b/sources_non_forked/syntastic/doc/syntastic-checkers.txt index 48536491..38248b07 100644 --- a/sources_non_forked/syntastic/doc/syntastic-checkers.txt +++ b/sources_non_forked/syntastic/doc/syntastic-checkers.txt @@ -23,6 +23,7 @@ SYNTAX CHECKERS BY LANGUAGE *syntastic-checkers-lang* C++......................................|syntastic-checkers-cpp| Cabal....................................|syntastic-checkers-cabal| Chef.....................................|syntastic-checkers-chef| + CMake....................................|syntastic-checkers-cmake| COBOL....................................|syntastic-checkers-cobol| Coco.....................................|syntastic-checkers-co| CoffeeScript.............................|syntastic-checkers-coffee| @@ -58,6 +59,7 @@ SYNTAX CHECKERS BY LANGUAGE *syntastic-checkers-lang* Java.....................................|syntastic-checkers-java| JavaScript...............................|syntastic-checkers-javascript| JSON.....................................|syntastic-checkers-json| + Julia....................................|syntastic-checkers-julia| LESS.....................................|syntastic-checkers-less| Lex......................................|syntastic-checkers-lex| @@ -530,12 +532,14 @@ The following checkers are available for C (filetype "c"): 3. ClangCheck...............|syntastic-c-clang_check| 4. Clang-Tidy...............|syntastic-c-clang_tidy| 5. Cppcheck.................|syntastic-c-cppcheck| - 6. GCC......................|syntastic-c-gcc| - 7. make.....................|syntastic-c-make| - 8. OClint...................|syntastic-c-oclint| - 9. PC-Lint..................|syntastic-c-pc_lint| - 10. Sparse..................|syntastic-c-sparse| - 11. Splint..................|syntastic-c-splint| + 6. cppclean.................|syntastic-c-cppclean| + 7. Flawfinder...............|syntastic-c-flawfinder| + 8. GCC......................|syntastic-c-gcc| + 9. make.....................|syntastic-c-make| + 10. OClint..................|syntastic-c-oclint| + 11. PC-Lint.................|syntastic-c-pc_lint| + 12. Sparse..................|syntastic-c-sparse| + 13. Splint..................|syntastic-c-splint| ------------------------------------------------------------------------------ 1. AVR-GCC *syntastic-c-avrgcc* @@ -693,7 +697,57 @@ one option per line (cf. |syntastic-config-files|). See also: |syntastic-cpp-cppcheck|. ------------------------------------------------------------------------------ -6. GCC *syntastic-c-gcc* +6. cppclean *syntastic-c-cppclean* + +Name: cppclean +Maintainer: LCD 47 + +"cppclean" attempts to find problems in C++ source that slow development in +large code bases, for example various forms of unused code. See the project's +page at GitHub for more information: + + https://github.com/myint/cppclean + +Installation~ + +Install it with "pip": > + pip install cppclean +< +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +See also: |syntastic-cpp-cppclean|. + +------------------------------------------------------------------------------ +7. Flawfinder *syntastic-c-flawfinder* + +Name: flawfinder +Maintainer: LCD 47 + +"Flawfinder" scans C/C++ source code for possible security weaknesses. See the +project's page for more information: + + https://www.dwheeler.com/flawfinder + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +Additionally: + + *'g:syntastic_c_flawfinder_thres'* +Type: integer +Default: 3 +Error threshold. Policy violations with a severity above this value are +highlighted as errors, the others are considered warnings by syntastic. + +See also: |syntastic-cpp-flawfinder|. + +------------------------------------------------------------------------------ +8. GCC *syntastic-c-gcc* Name: gcc Maintainer: Gregor Uhlenheuer @@ -790,7 +844,7 @@ executable. See also: |syntastic-cpp-gcc|. ------------------------------------------------------------------------------ -7. make *syntastic-c-make* +9. make *syntastic-c-make* Name: make Maintainer: Gregor Uhlenheuer @@ -801,7 +855,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it accepts the standard options described at |syntastic-config-makeprg|. ------------------------------------------------------------------------------ -8. OClint *syntastic-c-oclint* +10. OClint *syntastic-c-oclint* Name: oclint Maintainer: "UnCO" Lin @@ -840,7 +894,7 @@ Config files pointed to by 'g:syntastic_oclint_config_file' are then ignored. See also: |syntastic-cpp-oclint|. ------------------------------------------------------------------------------ -9. PC-Lint *syntastic-c-pc_lint* +11. PC-Lint *syntastic-c-pc_lint* Name: pc_lint Maintainer: Steve Bragg @@ -867,7 +921,7 @@ current directory and in parent directories; first such file found is used. See also: |syntastic-cpp-pc_lint|. ------------------------------------------------------------------------------ -10. Sparse *syntastic-c-sparse* +12. Sparse *syntastic-c-sparse* Name: sparse Maintainer: Daniel Walker @@ -899,7 +953,7 @@ your vimrc: > This allows "Sparse" to read "GCC"'s private include files. ------------------------------------------------------------------------------ -11. Splint *syntastic-c-splint* +13. Splint *syntastic-c-splint* Name: splint Maintainer: LCD 47 @@ -955,11 +1009,13 @@ The following checkers are available for C++ (filetype "cpp"): 2. ClangCheck...............|syntastic-cpp-clang_check| 3. Clang-Tidy...............|syntastic-cpp-clang_tidy| 4. Cppcheck.................|syntastic-cpp-cppcheck| - 5. Cpplint..................|syntastic-cpp-cpplint| - 6. GCC......................|syntastic-cpp-gcc| - 7. OClint...................|syntastic-cpp-oclint| - 8. PC-Lint..................|syntastic-cpp-pc_lint| - 9. Vera++...................|syntastic-cpp-verapp| + 5. cppclean.................|syntastic-cpp-cppclean| + 6. Cpplint..................|syntastic-cpp-cpplint| + 7. Flawfinder...............|syntastic-cpp-flawfinder| + 8. GCC......................|syntastic-cpp-gcc| + 9. OClint...................|syntastic-cpp-oclint| + 10. PC-Lint.................|syntastic-cpp-pc_lint| + 11. Vera++..................|syntastic-cpp-verapp| ------------------------------------------------------------------------------ 1. AVR-GCC *syntastic-cpp-avrgcc* @@ -1103,7 +1159,31 @@ one option per line (cf. |syntastic-config-files|). See also: |syntastic-c-cppcheck|. ------------------------------------------------------------------------------ -5. Cpplint *syntastic-cpp-cpplint* +5. cppclean *syntastic-cpp-cppclean* + +Name: cppclean +Maintainer: LCD 47 + +"cppclean" attempts to find problems in C++ source that slow development in +large code bases, for example various forms of unused code. See the project's +page at GitHub for more information: + + https://github.com/myint/cppclean + +Installation~ + +Install it with "pip": > + pip install cppclean +< +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +See also: |syntastic-c-cppclean|. + +------------------------------------------------------------------------------ +6. Cpplint *syntastic-cpp-cpplint* Name: cpplint Maintainer: LCD 47 @@ -1139,7 +1219,33 @@ However, if your "cpplint" was installed with "pip", the script's name is let g:syntastic_cpp_cpplint_exec = "cpplint" < ------------------------------------------------------------------------------ -6. GCC *syntastic-cpp-gcc* +7. Flawfinder *syntastic-cpp-flawfinder* + +Name: flawfinder +Maintainer: LCD 47 + +"Flawfinder" scans C/C++ source code for possible security weaknesses. See the +project's page for more information: + + https://www.dwheeler.com/flawfinder + +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + +Additionally: + + *'g:syntastic_cpp_flawfinder_thres'* +Type: integer +Default: 3 +Error threshold. Policy violations with a severity above this value are +highlighted as errors, the others are considered warnings by syntastic. + +See also: |syntastic-c-flawfinder|. + +------------------------------------------------------------------------------ +8. GCC *syntastic-cpp-gcc* Name: gcc Maintainer: Gregor Uhlenheuer @@ -1236,7 +1342,7 @@ executable. See also: |syntastic-c-gcc|. ------------------------------------------------------------------------------ -7. OClint *syntastic-cpp-oclint* +9. OClint *syntastic-cpp-oclint* Name: oclint Maintainer: "UnCO" Lin @@ -1276,7 +1382,7 @@ Config files pointed to by 'g:syntastic_oclint_config_file' are then ignored. See also: |syntastic-c-oclint|. ------------------------------------------------------------------------------ -8. PC-Lint *syntastic-cpp-pc_lint* +10. PC-Lint *syntastic-cpp-pc_lint* Name: pc_lint Maintainer: Steve Bragg @@ -1303,7 +1409,7 @@ current directory and in parent directories; first such file found is used. See also: |syntastic-c-pc_lint|. ------------------------------------------------------------------------------ -9. Vera++ *syntastic-cpp-verapp* +11. Vera++ *syntastic-cpp-verapp* Name: verapp Maintainer: Lucas Verney @@ -1381,6 +1487,34 @@ You probably also need a plugin to set |filetype| for Chef files, such as https://github.com/dougireton/vim-chef +============================================================================== +SYNTAX CHECKERS FOR CMAKE *syntastic-checkers-cmake* + +The following checkers are available for CMake (filetype "cmake"): + + 1. cmakelint................|syntastic-cmake-cmakelint| + +------------------------------------------------------------------------------ +1. cmakelint *syntastic-cmake-cmakelint* + +Name: cmakelint +Maintainer: LCD 47 + +"cmakelint" is a style checker for "CMake" files (https://cmake.org/). +See the project's page at GitHub more information: + + https://github.com/richq/cmake-lint + +Installation~ + +Install it with "pip": > + pip install cmakelint +< +Checker options~ + +This checker is initialised using the "makeprgBuild()" function and thus it +accepts the standard options described at |syntastic-config-makeprg|. + ============================================================================== SYNTAX CHECKERS FOR COBOL *syntastic-checkers-cobol* @@ -1755,6 +1889,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 +1969,22 @@ the usual 'g:syntastic_d_dmd_