To pacify GitHub's new Markdown parser.
heading :: Int -> String -> Env
heading level string = do
metadata <- ask
- return $ replicate level '#' ++ " " ++ string ++ anch (pluginName metadata) ++ "\n\n"
+ return $ "\n" ++ replicate level '#' ++ " " ++ string ++ anch (pluginName metadata) ++ "\n\n"
where
anch name = a $ Anchor [ Attribute "name" (sanitizeAnchor $ pre ++ string)
, Attribute "href" (gitHubAnchor $ pre ++ string)
+
# ferret<a name="ferret-ferret" href="#user-content-ferret-ferret"></a>
+
## Intro<a name="ferret-intro" href="#user-content-ferret-intro"></a>
> "ferret (verb)<br />(ferret something out) search tenaciously for and find something: she had the ability to ferret out the facts."
<p align="right"><a name="ferret-features" href="#user-content-ferret-features"><code>ferret-features</code></a></p>
Ferret improves Vim's multi-file search in four ways:
+
### 1. Powerful multi-file search<a name="ferret-1-powerful-multi-file-search" href="#user-content-ferret-1-powerful-multi-file-search"></a>
Ferret provides an <strong>[`:Ack`](#user-content-ack)</strong> command for searching across multiple files using The Silver Searcher (https://github.com/ggreer/the_silver_searcher), Ack (http://beyondgrep.com/), or Grep (http://www.gnu.org/software/grep/). Support for passing options through to the underlying search command exists, along with the ability to use full regular expression syntax without doing special escaping.
Finally, Ferret offers integration with dispatch.vim (https://github.com/tpope/vim-dispatch), which enables asynchronous searching despite the fact that Vim itself is single-threaded.
+
### 2. Streamlined multi-file replace<a name="ferret-2-streamlined-multi-file-replace" href="#user-content-ferret-2-streamlined-multi-file-replace"></a>
The companion to <strong>[`:Ack`](#user-content-ack)</strong> is <strong>[`:Acks`](#user-content-acks)</strong> (mnemonic: "Ack substitute", accessible via shortcut <leader>r), which allows you to run a multi-file replace across all the files placed in the <strong>`quickfix`</strong> window by a previous invocation of <strong>[`:Ack`](#user-content-ack)</strong>.
+
### 3. Quickfix listing enhancements<a name="ferret-3-quickfix-listing-enhancements" href="#user-content-ferret-3-quickfix-listing-enhancements"></a>
The <strong>`quickfix`</strong> listing itself is enhanced with settings to improve its usability, and natural mappings that allow quick removal of items from the list (for example, you can reduce clutter in the listing by removing lines that you don't intend to make changes to).
Additionally, Vim's <strong>`:cn`</strong>, <strong>`:cp`</strong>, <strong>`:cnf`</strong> and <strong>`:cpf`</strong> commands are tweaked to make it easier to immediately identify matches by centering them within the viewport.
+
### 4. Easy operations on files in the quickfix listing<a name="ferret-4-easy-operations-on-files-in-the-quickfix-listing" href="#user-content-ferret-4-easy-operations-on-files-in-the-quickfix-listing"></a>
Finally, Ferret provides a <strong>[`:Qargs`](#user-content-qargs)</strong> command that puts the files currently in the <strong>`quickfix`</strong> listing into the <strong>`:args`</strong> list, where they can be operated on in bulk via the <strong>`:argdo`</strong> command. This is what's used under the covers by <strong>[`:Acks`](#user-content-acks)</strong> to do its work.
+
## Installation<a name="ferret-installation" href="#user-content-ferret-installation"></a>
To install Ferret, use your plug-in management system of choice.
:call pathogen#helptags()
```
+
## Commands<a name="ferret-commands" href="#user-content-ferret-commands"></a>
<p align="right"><a name="ack" href="#user-content-ack"><code>:Ack</code></a></p>
+
### `:Ack {pattern} {options}`<a name="ferret-ack-pattern-options" href="#user-content-ferret-ack-pattern-options"></a>
Searches for {pattern} in all the files under the current directory (see <strong>`:pwd`</strong>), unless otherwise overridden via {options}, and displays the results in the <strong>`quickfix`</strong> listing.
As a convenience <leader>a is set-up (<strong>[`<Plug>(FerretAck)`](#user-content-plugferretack)</strong>) as a shortcut to enter <strong>`Cmdline-mode`</strong> with `:Ack` inserted on the <strong>`Cmdline`</strong>. Likewise <leader>s (<strong>[`<Plug>(FerretAckWord)`](#user-content-plugferretackword)</strong>) is a shortcut for running <strong>[`:Ack`](#user-content-ack)</strong> with the word currently under the cursor.
<p align="right"><a name="lack" href="#user-content-lack"><code>:Lack</code></a></p>
+
### `:Lack {pattern} {options}`<a name="ferret-lack-pattern-options" href="#user-content-ferret-lack-pattern-options"></a>
Just like <strong>[`:Ack`](#user-content-ack)</strong>, but instead of using the <strong>`quickfix`</strong> listing, which is global across an entire Vim instance, it uses the <strong>`location-list`</strong>, which is a per-window construct.
Note that <strong>[`:Lack`](#user-content-lack)</strong> always runs synchronously via <strong>`:cexpr`</strong>, because dispatch.vim doesn't currently support the <strong>`location-list`</strong>.
<p align="right"><a name="acks" href="#user-content-acks"><code>:Acks</code></a></p>
+
### `:Acks /{pattern}/{replacement}/`<a name="ferret-acks-patternreplacement" href="#user-content-ferret-acks-patternreplacement"></a>
Takes all of the files currently in the <strong>`quickfix`</strong> listing and performs a substitution of all instances of {pattern} (a standard Vim search <strong>`pattern`</strong>) by {replacement}.
```
<p align="right"><a name="qargs" href="#user-content-qargs"><code>:Qargs</code></a></p>
+
### `:Qargs`<a name="ferret-qargs" href="#user-content-ferret-qargs"></a>
This is a utility function that is used by the <strong>[`:Acks`](#user-content-acks)</strong> command but is also generally useful enough to warrant being exposed publicly.
It takes the files currently in the <strong>`quickfix`</strong> listing and sets them as <strong>`:args`</strong> so that they can be operated on en masse via the <strong>`:argdo`</strong> command.
+
## Mappings<a name="ferret-mappings" href="#user-content-ferret-mappings"></a>
+
### Circumstances where mappings do not get set up<a name="ferret-circumstances-where-mappings-do-not-get-set-up" href="#user-content-ferret-circumstances-where-mappings-do-not-get-set-up"></a>
Note that Ferret will not try to set up the <leader> mappings if any of the following are true:
- An alternative mapping for the same functionality has already been set up from a <strong>`.vimrc`</strong>.
- The mapping has been suppressed by setting <strong>`g:FerretMap`</strong> to 1 in your <strong>`.vimrc`</strong>.
+
### Mappings specific to the quickfix window<a name="ferret-mappings-specific-to-the-quickfix-window" href="#user-content-ferret-mappings-specific-to-the-quickfix-window"></a>
Additionally, Ferret will set up special mappings in <strong>`quickfix`</strong> listings, unless prevented from doing so by <strong>`g:FerretQFMap`</strong>:
- `dd` (<strong>`Normal-mode`</strong>): delete current line
- `d`{motion} (<strong>`Normal-mode`</strong>): delete range indicated by {motion}
+
### `<Plug>(FerretAck)`<a name="ferret-plugferretack" href="#user-content-ferret-plugferretack"></a>
Ferret maps <leader>a to <strong>[`<Plug>(FerretAck)`](#user-content-plugferretack)</strong>, which triggers the <strong>[`:Ack`](#user-content-ack)</strong> command. To use an alternative mapping instead, create a different one in your <strong>`.vimrc`</strong> instead using <strong>`:nmap`</strong>:
nmap <leader>x <Plug>(FerretAck)
```
+
### `<Plug>(FerretLack)`<a name="ferret-plugferretlack" href="#user-content-ferret-plugferretlack"></a>
Ferret maps <leader>l to <strong>[`<Plug>(FerretLack)`](#user-content-plugferretlack)</strong>, which triggers the <strong>[`:Lack`](#user-content-lack)</strong> command. To use an alternative mapping instead, create a different one in your <strong>`.vimrc`</strong> instead using <strong>`:nmap`</strong>:
nmap <leader>y <Plug>(FerretLack)
```
+
### `<Plug>(FerretAckWord)`<a name="ferret-plugferretackword" href="#user-content-ferret-plugferretackword"></a>
Ferret maps <leader>s (mnemonix: "selection) to <strong>[`<Plug>(FerretAckWord)`](#user-content-plugferretackword)</strong>, which uses <strong>[`:Ack`](#user-content-ack)</strong> to search for the word currently under the cursor. To use an alternative mapping instead, create a different one in your <strong>`.vimrc`</strong> instead using <strong>`:nmap`</strong>:
nmap <leader>z <Plug>(FerretAckWord)
```
+
### `<Plug>(FerretAcks)`<a name="ferret-plugferretacks" href="#user-content-ferret-plugferretacks"></a>
Ferret maps <leader>r (mnemonic: "replace") to <strong>[`<Plug>(FerretAcks)`](#user-content-plugferretacks)</strong>, which triggers the <strong>[`:Acks`](#user-content-acks)</strong> command and fills the prompt with the last search term from Ferret. to use an alternative mapping instead, create a different one in your <strong>`.vimrc`</strong> instead using <strong>`:nmap`</strong>:
nmap <leader>u <Plug>(FerretAcks)
```
+
## Options<a name="ferret-options" href="#user-content-ferret-options"></a>
<p align="right"><a name="gferretdispatch" href="#user-content-gferretdispatch"><code>g:FerretDispatch</code></a></p>
+
### `g:FerretDispatch` (boolean, default: 1)<a name="ferret-gferretdispatch-boolean-default-1" href="#user-content-ferret-gferretdispatch-boolean-default-1"></a>
Controls whether to use vim-dispatch (and specifically, <strong>`:Make`</strong>) to run <strong>[`:Ack`](#user-content-ack)</strong> searches asynchronously, when available. To prevent vim-dispatch from being used, set to 0:
```
<p align="right"><a name="gferrethlsearch" href="#user-content-gferrethlsearch"><code>g:FerretHlsearch</code></a></p>
+
### `g:FerretHlsearch` (boolean, default: none)<a name="ferret-gferrethlsearch-boolean-default-none" href="#user-content-ferret-gferrethlsearch-boolean-default-none"></a>
Controls whether Ferret should attempt to highlight the search pattern when running <strong>[`:Ack`](#user-content-ack)</strong> or <strong>[`:Lack`](#user-content-lack)</strong>. If left unset, Ferret will respect the current 'hlsearch' setting. To force highlighting on or off irrespective of 'hlsearch', set <strong>`g:FerretHlsearch`</strong> to 1 (on) or 0 (off):
```
<p align="right"><a name="gferretqfoptions" href="#user-content-gferretqfoptions"><code>g:FerretQFOptions</code></a></p>
+
### `g:FerretQFOptions` (boolean, default: 1)<a name="ferret-gferretqfoptions-boolean-default-1" href="#user-content-ferret-gferretqfoptions-boolean-default-1"></a>
Controls whether to set up setting overrides for <strong>`quickfix`</strong> windows. These are various settings, such as <strong>`norelativenumber`</strong>, <strong>`nolist`</strong> and <strong>`nowrap`</strong>, that are intended to make the <strong>`quickfix`</strong> window, which is typically very small relative to other windows, more usable.
```
<p align="right"><a name="gferretqfmap" href="#user-content-gferretqfmap"><code>g:FerretQFMap</code></a></p>
+
### `g:FerretQFMap` (boolean, default: 1)<a name="ferret-gferretqfmap-boolean-default-1" href="#user-content-ferret-gferretqfmap-boolean-default-1"></a>
Controls whether to set up mappings in the <strong>`quickfix`</strong> results window for deleting results. The mappings include:
```
<p align="right"><a name="gferretloaded" href="#user-content-gferretloaded"><code>g:FerretLoaded</code></a></p>
+
### `g:FerretLoaded` (any, default: none)<a name="ferret-gferretloaded-any-default-none" href="#user-content-ferret-gferretloaded-any-default-none"></a>
To prevent Ferret from being loaded, set <strong>`g:FerretLoaded`</strong> to any value in your <strong>`.vimrc`</strong>. For example:
```
<p align="right"><a name="gferretmap" href="#user-content-gferretmap"><code>g:FerretMap</code></a></p>
+
### `g:FerretMap` (boolean, default: 1)<a name="ferret-gferretmap-boolean-default-1" href="#user-content-ferret-gferretmap-boolean-default-1"></a>
Controls whether to set up the Ferret mappings, such as <strong>[`<Plug>(FerretAck)`](#user-content-plugferretack)</strong> (see <strong>[`ferret-mappings`](#user-content-ferret-mappings)</strong> for a full list). To prevent any mapping from being configured, set to 0:
```
<p align="right"><a name="gferretqfcommands" href="#user-content-gferretqfcommands"><code>g:FerretQFCommands</code></a></p>
+
### `g:FerretQFCommands` (boolean, default: 1)<a name="ferret-gferretqfcommands-boolean-default-1" href="#user-content-ferret-gferretqfcommands-boolean-default-1"></a>
Controls whether to set up custom versions of the <strong>`quickfix`</strong> commands, <strong>`:cn`</strong>, <strong>`:cnf`</strong>, <strong>`:cp`</strong> an <strong>`:cpf`</strong>. These overrides vertically center the match within the viewport on each jump. To prevent the custom versions from being configured, set to 0:
let g:FerretQFCommands=0
```
+
## Custom autocommands<a name="ferret-custom-autocommands" href="#user-content-ferret-custom-autocommands"></a>
<p align="right"><a name="ferretdidwrite" href="#user-content-ferretdidwrite"><code>FerretDidWrite</code></a> <a name="ferretwillwrite" href="#user-content-ferretwillwrite"><code>FerretWillWrite</code></a></p>
autocmd User FerretDidWrite call CustomDidWrite()
```
+
## Overrides<a name="ferret-overrides" href="#user-content-ferret-overrides"></a>
Ferret overrides the 'grepformat' and 'grepprg' settings, preferentially setting `ag`, `ack` or `grep` as the 'grepprg' (in that order) and configuring a suitable 'grepformat'.
let g:FerretQFOptions=0
```
+
## Troubleshooting<a name="ferret-troubleshooting" href="#user-content-ferret-troubleshooting"></a>
<p align="right"><a name="ferret-quotes" href="#user-content-ferret-quotes"><code>ferret-quotes</code></a></p>
+
### Ferret fails to find patterns containing spaces<a name="ferret-ferret-fails-to-find-patterns-containing-spaces" href="#user-content-ferret-ferret-fails-to-find-patterns-containing-spaces"></a>
As described in the documentation for <strong>[`:Ack`](#user-content-ack)</strong>, the search pattern is passed through as-is to the underlying search command, and no escaping is required other than preceding spaces by a single backslash.
:Ack \blog\((['"]).*?\1\) -i --ignore-dir=src/vendor src dist build
```
+
## FAQ<a name="ferret-faq" href="#user-content-ferret-faq"></a>
+
### Why do Ferret commands start with "Ack", "Lack" and so on?<a name="ferret-why-do-ferret-commands-start-with-ack-lack-and-so-on" href="#user-content-ferret-why-do-ferret-commands-start-with-ack-lack-and-so-on"></a>
Ferret was originally the thinnest of wrappers (7 lines of code in my <strong>`.vimrc`</strong>) around `ack`. The earliest traces of it can be seen in the initial commit to my dotfiles repo in May, 2009 (https://wt.pe/h).
So, even though Ferret has a new name now and actually prefers `ag` over `ack` when available, I prefer to keep the command names intact and benefit from years of accumulated muscle-memory.
+
## Related<a name="ferret-related" href="#user-content-ferret-related"></a>
Just as Ferret aims to improve the multi-file search and replace experience, Loupe does the same for within-file searching:
https://github.com/wincent/loupe
+
## Website<a name="ferret-website" href="#user-content-ferret-website"></a>
The official Ferret source code repo is at:
http://www.vim.org/scripts/script.php?script_id=5220
+
## License<a name="ferret-license" href="#user-content-ferret-license"></a>
Copyright 2015-present Greg Hurrell. All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
## Development<a name="ferret-development" href="#user-content-ferret-development"></a>
+
### Contributing patches<a name="ferret-contributing-patches" href="#user-content-ferret-contributing-patches"></a>
Patches can be sent via mail to greg@hurrell.net, or as GitHub pull requests at: https://github.com/wincent/ferret/pulls
+
### Cutting a new release<a name="ferret-cutting-a-new-release" href="#user-content-ferret-cutting-a-new-release"></a>
At the moment the release process is manual:
- Upload to http://www.vim.org/scripts/script.php?script_id=5220
+
## Authors<a name="ferret-authors" href="#user-content-ferret-authors"></a>
Ferret is written and maintained by Greg Hurrell <greg@hurrell.net>.
- Nelo-Thara Wallus
- Vaibhav Sagar
+
## History<a name="ferret-history" href="#user-content-ferret-history"></a>
+
### 1.2a (16 May 2016)<a name="ferret-12a-16-may-2016" href="#user-content-ferret-12a-16-may-2016"></a>
- Add optional support for running searches asynchronously using Vim's <strong>`+job`</strong> feature (enabled by default in sufficiently recent versions of Vim); see <strong>`g:FerretJob`</strong>, <strong>`:FerretCancelAsync`</strong> and <strong>`:FerretPullAsync`</strong>.
+
### 1.1.1 (7 March 2016)<a name="ferret-111-7-march-2016" href="#user-content-ferret-111-7-march-2016"></a>
- Fix another edge case when searching for patterns containing "#", only manifesting under dispatch.vim.
+
### 1.1 (7 March 2016)<a name="ferret-11-7-march-2016" href="#user-content-ferret-11-7-march-2016"></a>
- Fix edge case when searching for strings of the form "<foo>".
- Provide completion for `ag` and `ack` options when using <strong>[`:Ack`](#user-content-ack)</strong> and <strong>[`:Lack`](#user-content-lack)</strong>.
- Fix display of error messages under dispatch.vim.
+
### 1.0 (28 December 2015)<a name="ferret-10-28-december-2015" href="#user-content-ferret-10-28-december-2015"></a>
- Fix broken <strong>[`:Qargs`](#user-content-qargs)</strong> command (patch from Daniel Silva).
- When using `ag`, report multiple matches per line instead of just the first (patch from Daniel Silva).
- Improve content and display of error messages.
+
### 0.3 (24 July 2015)<a name="ferret-03-24-july-2015" href="#user-content-ferret-03-24-july-2015"></a>
- Added highlighting of search pattern and related <strong>`g:FerretHlsearch`</strong> option (patch from Nelo-Thara Wallus).
- Add better error reporting for failed or incorrect searches.
+
### 0.2 (16 July 2015)<a name="ferret-02-16-july-2015" href="#user-content-ferret-02-16-july-2015"></a>
- Added <strong>[`FerretDidWrite`](#user-content-ferretdidwrite)</strong> and <strong>[`FerretWillWrite`](#user-content-ferretwillwrite)</strong> autocommands (patch from Joe Lencioni).
- Add <strong>[`<Plug>(FerretAcks)`](#user-content-plugferretacks)</strong> mapping (patch from Nelo-Thara Wallus).
+
### 0.1 (8 July 2015)<a name="ferret-01-8-july-2015" href="#user-content-ferret-01-8-july-2015"></a>
- Initial release, extracted from my dotfiles (https://github.com/wincent/wincent).
+
# loupe<a name="loupe-loupe" href="#user-content-loupe-loupe"></a>
+
## Intro<a name="loupe-intro" href="#user-content-loupe-intro"></a>
> "loupe (noun)<br />a small magnifying glass used by jewelers and watchmakers."
<p align="right"><a name="loupe-features" href="#user-content-loupe-features"><code>loupe-features</code></a></p>
Loupe enhances Vim's <strong>`search-commands`</strong> in four ways:
+
### 1. Makes the currently selected match easier to see<a name="loupe-1-makes-the-currently-selected-match-easier-to-see" href="#user-content-loupe-1-makes-the-currently-selected-match-easier-to-see"></a>
When searching using <strong>`/`</strong>, <strong>`?`</strong>, <strong>`star`</strong>, <strong>`#`</strong>, <strong>`n`</strong>, <strong>`N`</strong> or similar, it can be hard to see the "current" match from among all the matches that 'hlsearch' highlights. Loupe makes the currently selected match easier to see by:
- Applying a different <strong>`:highlight`</strong> group (by default, <strong>`hl-IncSearch`</strong>) to the match under the cursor.
- Keeping the matching line centered within the window when jumping between matches with <strong>`n`</strong> and <strong>`N`</strong>.
+
### 2. Applies sane pattern syntax by default<a name="loupe-2-applies-sane-pattern-syntax-by-default" href="#user-content-loupe-2-applies-sane-pattern-syntax-by-default"></a>
Loupe makes "very magic" (<strong>`/\v`</strong>) syntax apply by default when searching. This is true even if you initiate a search via a novel means, such as from a visual selection or with a complicated <strong>`:range`</strong> prefix.
This means that you can use a pattern syntax closer to the familiar regular expression syntax from languages such as Perl, Ruby, JavaScript (indeed, most other modern languages that support regular expressions).
+
### 3. Provides a shortcut to remove search highlighting<a name="loupe-3-provides-a-shortcut-to-remove-search-highlighting" href="#user-content-loupe-3-provides-a-shortcut-to-remove-search-highlighting"></a>
Loupe maps <leader>n to quickly remove all 'hlsearch' highlighting (although you can provide an alternative mapping of your choosing or suppress the feature entirely).
+
### 4. Sensible defaults for search-related features<a name="loupe-4-sensible-defaults-for-search-related-features" href="#user-content-loupe-4-sensible-defaults-for-search-related-features"></a>
Loupe provides reasonable defaults for most search-related Vim settings to provide a good "out of the box" experience. For more details, or to see how to override Loupe's settings, see <strong>[`loupe-overrides`](#user-content-loupe-overrides)</strong>.
+
## Installation<a name="loupe-installation" href="#user-content-loupe-installation"></a>
To install Loupe, use your plug-in management system of choice.
:call pathogen#helptags()
```
+
## Mappings<a name="loupe-mappings" href="#user-content-loupe-mappings"></a>
+
### `<Plug>(LoupeClearHighlight)`<a name="loupe-plugloupeclearhighlight" href="#user-content-loupe-plugloupeclearhighlight"></a>
Loupe maps <leader>n to <strong>[`<Plug>(LoupeClearHighlight)`](#user-content-plugloupeclearhighlight)</strong>, which clears all visible highlights (like <strong>`:nohighlight`</strong> does). To use an alternative mapping instead, create a different one in your <strong>`.vimrc`</strong> instead using <strong>`:nmap`</strong>:
- An alternative mapping for <strong>[`<Plug>(LoupeClearHighlight)`](#user-content-plugloupeclearhighlight)</strong> has already been set up from a <strong>`.vimrc`</strong>.
- The mapping has been suppressed by setting <strong>`g:LoupeClearHighlightMap`</strong> to 1 in your <strong>`.vimrc`</strong>.
+
### `<Plug>(LoupeOctothorpe)`<a name="loupe-plugloupeoctothorpe" href="#user-content-loupe-plugloupeoctothorpe"></a>
Loupe maps <strong>`#`</strong> to <strong>[`<Plug>(LoupeOctothorpe)`](#user-content-plugloupeoctothorpe)</strong> in order to implement custom highlighting and line-centering for the current match.
nmap <Nop> <Plug>(LoupeOctothorpe)
```
+
### `<Plug>(LoupeStar)`<a name="loupe-plugloupestar" href="#user-content-loupe-plugloupestar"></a>
Loupe maps <strong>`star`</strong> to <strong>[`<Plug>(LoupeStar)`](#user-content-plugloupestar)</strong> in order to implement custom highlighting and line-centering for the current match.
nmap <Nop> <Plug>(LoupeStar)
```
+
### `<Plug>(LoupeN)`<a name="loupe-plugloupen" href="#user-content-loupe-plugloupen"></a>
Loupe maps <strong>`N`</strong> to <strong>[`<Plug>(LoupeN)`](#user-content-plugloupen)</strong> in order to implement custom highlighting and line-centering for the current match.
nmap <Nop> <Plug>(LoupeN)
```
+
### `<Plug>(LoupeGOctothorpe)`<a name="loupe-plugloupegoctothorpe" href="#user-content-loupe-plugloupegoctothorpe"></a>
Loupe maps <strong>`g#`</strong> to <strong>[`<Plug>(LoupeGOctothorpe)`](#user-content-plugloupegoctothorpe)</strong> in order to implement custom highlighting and line-centering for the current match.
nmap <Nop> <Plug>(LoupeGOctothorpe)
```
+
### `<Plug>(LoupeGStar)`<a name="loupe-plugloupegstar" href="#user-content-loupe-plugloupegstar"></a>
Loupe maps <strong>`gstar`</strong> to <strong>[`<Plug>(LoupeGStar)`](#user-content-plugloupegstar)</strong> in order to implement custom highlighting and line-centering for the current match.
nmap <Nop> <Plug>(LoupeGStar)
```
+
### `<Plug>(Loupen)`<a name="loupe-plugloupen" href="#user-content-loupe-plugloupen"></a>
Loupe maps <strong>`n`</strong> to <strong>[`<Plug>(Loupen)`](#user-content-plugloupen)</strong> in order to implement custom highlighting and line-centering for the current match.
nmap <Nop> <Plug>(Loupen)
```
+
## Options<a name="loupe-options" href="#user-content-loupe-options"></a>
<p align="right"><a name="gloupehighlightgroup" href="#user-content-gloupehighlightgroup"><code>g:LoupeHighlightGroup</code></a></p>
+
### `g:LoupeHighlightGroup` (string, default: IncSearch)<a name="loupe-gloupehighlightgroup-string-default-incsearch" href="#user-content-loupe-gloupehighlightgroup-string-default-incsearch"></a>
Specifies the <strong>`:highlight`</strong> group used to emphasize the match currently under the cursor for the current search pattern. Defaults to "IncSearch" (ie. <strong>`hl-IncSearch`</strong>). For example:
To prevent any special highlighting from being applied, set this option to "" (ie. the empty string).
<p align="right"><a name="gloupeloaded" href="#user-content-gloupeloaded"><code>g:LoupeLoaded</code></a></p>
+
### `g:LoupeLoaded` (any, default: none)<a name="loupe-gloupeloaded-any-default-none" href="#user-content-loupe-gloupeloaded-any-default-none"></a>
To prevent Loupe from being loaded, set <strong>`g:LoupeLoaded`</strong> to any value in your <strong>`.vimrc`</strong>. For example:
```
<p align="right"><a name="gloupeclearhighlightmap" href="#user-content-gloupeclearhighlightmap"><code>g:LoupeClearHighlightMap</code></a></p>
+
### `g:LoupeClearHighlightMap` (boolean, default: 1)<a name="loupe-gloupeclearhighlightmap-boolean-default-1" href="#user-content-loupe-gloupeclearhighlightmap-boolean-default-1"></a>
Controls whether to set up the <strong>[`<Plug>(LoupeClearHighlight)`](#user-content-plugloupeclearhighlight)</strong> mapping. To prevent any mapping from being configured, set to 0:
```
<p align="right"><a name="gloupeverymagic" href="#user-content-gloupeverymagic"><code>g:LoupeVeryMagic</code></a></p>
+
### `g:LoupeVeryMagic` (boolean, default: 1)<a name="loupe-gloupeverymagic-boolean-default-1" href="#user-content-loupe-gloupeverymagic-boolean-default-1"></a>
Controls whether "very magic" pattern syntax (<strong>`/\v`</strong>) is applied by default. To disable, set to 0:
```
<p align="right"><a name="gloupecenterresults" href="#user-content-gloupecenterresults"><code>g:LoupeCenterResults</code></a></p>
+
### `g:LoupeCenterResults` (boolean, default: 1)<a name="loupe-gloupecenterresults-boolean-default-1" href="#user-content-loupe-gloupecenterresults-boolean-default-1"></a>
Controls whether the match's line is vertically centered within the window when jumping (via <strong>`n`</strong>, <strong>`N`</strong> etc). To disable, set to 0:
let g:LoupeCenterResults=0
```
+
## Functions<a name="loupe-functions" href="#user-content-loupe-functions"></a>
<p align="right"><a name="loupehlmatch" href="#user-content-loupehlmatch"><code>loupe#hlmatch()</code></a></p>
+
### `loupe#hlmatch()`<a name="loupe-loupehlmatch" href="#user-content-loupe-loupehlmatch"></a>
Apply highlighting to the current search match.
+
## Overrides<a name="loupe-overrides" href="#user-content-loupe-overrides"></a>
Loupe sets a number of search-related Vim settings to reasonable defaults in order to provide a good "out of the box" experience. The following overrides will be set unless suppressed or overridden (see <strong>[`loupe-suppress-overrides`](#user-content-loupe-suppress-overrides)</strong>):
Turned on (overrides 'ignorecase', making the search pattern case-sensitive whenever it containers uppercase characters).
<p align="right"><a name="loupe-suppress-overrides" href="#user-content-loupe-suppress-overrides"><code>loupe-suppress-overrides</code></a></p>
+
### Preventing Loupe overrides from taking effect<a name="loupe-preventing-loupe-overrides-from-taking-effect" href="#user-content-loupe-preventing-loupe-overrides-from-taking-effect"></a>
To override any of these choices, you can place overrides in an <strong>`after-directory`</strong> (ie. `~/.vim/after/plugin/loupe.vim`). For example:
set shortmess-=s
```
+
## Related<a name="loupe-related" href="#user-content-loupe-related"></a>
Just as Loupe aims to improve the within-file search experience, Ferret does the same for multi-file searching and replacing:
- https://github.com/wincent/ferret
+
## Website<a name="loupe-website" href="#user-content-loupe-website"></a>
The official Loupe source code repo is at:
- http://www.vim.org/scripts/script.php?script_id=5215
+
## License<a name="loupe-license" href="#user-content-loupe-license"></a>
Copyright 2015-present Greg Hurrell. All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
## Development<a name="loupe-development" href="#user-content-loupe-development"></a>
+
### Contributing patches<a name="loupe-contributing-patches" href="#user-content-loupe-contributing-patches"></a>
Patches can be sent via mail to greg@hurrell.net, or as GitHub pull requests at: https://github.com/wincent/loupe/pulls
+
### Cutting a new release<a name="loupe-cutting-a-new-release" href="#user-content-loupe-cutting-a-new-release"></a>
At the moment the release process is manual:
- Upload to http://www.vim.org/scripts/script.php?script_id=5215
+
## Authors<a name="loupe-authors" href="#user-content-loupe-authors"></a>
Loupe is written and maintained by Greg Hurrell <greg@hurrell.net>.
- https://www.youtube.com/watch?v=aHm36-na4-4
+
## History<a name="loupe-history" href="#user-content-loupe-history"></a>
+
### 1.1 (15 June 2016)<a name="loupe-11-15-june-2016" href="#user-content-loupe-11-15-june-2016"></a>
- Make compatible with older versions of Vim that do not have <strong>`v:hlsearch`</strong>.
- Add support for special delimiters with <strong>`:substitute`</strong> command.
+
### 1.0 (28 December 2015)<a name="loupe-10-28-december-2015" href="#user-content-loupe-10-28-december-2015"></a>
- Renamed the <strong>`<Plug>LoupeClearHighlight`</strong> mapping to <strong>[`<Plug>(LoupeClearHighlight)`](#user-content-plugloupeclearhighlight)</strong>.
+
### 0.1 (5 July 2015)<a name="loupe-01-5-july-2015" href="#user-content-loupe-01-5-july-2015"></a>
- Initial release, extracted from my dotfiles (https://github.com/wincent/wincent).
+
# Pinnacle<a name="pinnacle-pinnacle" href="#user-content-pinnacle-pinnacle"></a>
+
## Intro<a name="pinnacle-intro" href="#user-content-pinnacle-intro"></a>
Pinnacle provides functions for manipulating <strong>`:highlight`</strong> groups.
+
## Installation<a name="pinnacle-installation" href="#user-content-pinnacle-installation"></a>
To install Pinnacle, use your plug-in management system of choice.
:call pathogen#helptags()
```
+
## Website<a name="pinnacle-website" href="#user-content-pinnacle-website"></a>
The official Pinnacle source code repo is at:
http://www.vim.org/scripts/script.php?script_id=5360
+
## License<a name="pinnacle-license" href="#user-content-pinnacle-license"></a>
Copyright (c) 2016-present Greg Hurrell
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
## Development<a name="pinnacle-development" href="#user-content-pinnacle-development"></a>
+
### Contributing patches<a name="pinnacle-contributing-patches" href="#user-content-pinnacle-contributing-patches"></a>
Patches can be sent via mail to greg@hurrell.net, or as GitHub pull requests at: https://github.com/wincent/pinnacle/pulls
+
### Cutting a new release<a name="pinnacle-cutting-a-new-release" href="#user-content-pinnacle-cutting-a-new-release"></a>
At the moment the release process is manual:
- Upload to http://www.vim.org/scripts/script.php?script_id=5360
+
## Authors<a name="pinnacle-authors" href="#user-content-pinnacle-authors"></a>
Pinnacle is written and maintained by Greg Hurrell <greg@hurrell.net>.
+
## History<a name="pinnacle-history" href="#user-content-pinnacle-history"></a>
+
### 0.1 (30 March 2016)<a name="pinnacle-01-30-march-2016" href="#user-content-pinnacle-01-30-march-2016"></a>
- Initial release.
+
# scalpel<a name="scalpel-scalpel" href="#user-content-scalpel-scalpel"></a>
+
## Intro<a name="scalpel-intro" href="#user-content-scalpel-intro"></a>
Scalpel provides a streamlined shortcut for replacing all instances of the word currently under the cursor throughout a file.
in your `~/.vimrc`.
+
## Installation<a name="scalpel-installation" href="#user-content-scalpel-installation"></a>
To install Scalpel, use your plug-in management system of choice.
:call pathogen#helptags()
```
+
## Website<a name="scalpel-website" href="#user-content-scalpel-website"></a>
The official Scalpel source code repo is at:
http://www.vim.org/scripts/script.php?script_id=5381
+
## License<a name="scalpel-license" href="#user-content-scalpel-license"></a>
Copyright (c) 2016-present Greg Hurrell
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
## Development<a name="scalpel-development" href="#user-content-scalpel-development"></a>
+
### Contributing patches<a name="scalpel-contributing-patches" href="#user-content-scalpel-contributing-patches"></a>
Patches can be sent via mail to greg@hurrell.net, or as GitHub pull requests at: https://github.com/wincent/scalpel/pulls
+
### Cutting a new release<a name="scalpel-cutting-a-new-release" href="#user-content-scalpel-cutting-a-new-release"></a>
At the moment the release process is manual:
- Upload to http://www.vim.org/scripts/script.php?script_id=5381
+
## Authors<a name="scalpel-authors" href="#user-content-scalpel-authors"></a>
Scalpel is written and maintained by Greg Hurrell <greg@hurrell.net>.
+
## History<a name="scalpel-history" href="#user-content-scalpel-history"></a>
+
### 0.2 (not yet released)<a name="scalpel-02-not-yet-released" href="#user-content-scalpel-02-not-yet-released"></a>
- Support visual mode.
+
### 0.1 (29 April 2016)<a name="scalpel-01-29-april-2016" href="#user-content-scalpel-01-29-april-2016"></a>
- Initial release.
+
# docvim<a name="docvim-docvim" href="#user-content-docvim-docvim"></a>
<p align="right"><a name="vim-docvim" href="#user-content-vim-docvim"><code>vim-docvim</code></a></p>
+
## Intro<a name="docvim-intro" href="#user-content-docvim-intro"></a>
vim-docvim provides additional syntax highlighting for Vim script files that contain embedded docvim comments.
docvim (the tool, not this plug-in) is a documentation generator that processes those embedded comments and produces documentation in Markdown and Vim "help" formats. To avoid confusion, this document refers to the Vim plug-in as "vim-docvim" and the separate generation tool as "docvim".
+
## Installation<a name="docvim-installation" href="#user-content-docvim-installation"></a>
To install vim-docvim, use your plug-in management system of choice.
:call pathogen#helptags()
```
+
## Related<a name="docvim-related" href="#user-content-docvim-related"></a>
+
### Docvim<a name="docvim-docvim" href="#user-content-docvim-docvim"></a>
The Docvim tool itself is a Haskell module, available at:
- https://gitlab.com/wincent/docvim
- https://bitbucket.org/ghurrell/docvim
+
## Website<a name="docvim-website" href="#user-content-docvim-website"></a>
The official vim-docvim source code repo is at:
http://www.vim.org/scripts/script.php?script_id=[TODO]
+
## License<a name="docvim-license" href="#user-content-docvim-license"></a>
Copyright (c) 2015-present Greg Hurrell
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
## Development<a name="docvim-development" href="#user-content-docvim-development"></a>
+
### Contributing patches<a name="docvim-contributing-patches" href="#user-content-docvim-contributing-patches"></a>
Patches can be sent via mail to greg@hurrell.net, or as GitHub pull requests at: https://github.com/wincent/vim-docvim/pulls
+
### Cutting a new release<a name="docvim-cutting-a-new-release" href="#user-content-docvim-cutting-a-new-release"></a>
At the moment the release process is manual:
- Upload to http://www.vim.org/scripts/script.php?script_id=[TODO]
+
## Authors<a name="docvim-authors" href="#user-content-docvim-authors"></a>
vim-docvim is written and maintained by Greg Hurrell <greg@hurrell.net>.
+
## History<a name="docvim-history" href="#user-content-docvim-history"></a>
+
### 0.1 (not yet released)<a name="docvim-01-not-yet-released" href="#user-content-docvim-01-not-yet-released"></a>
- Initial release.
+
# foo<a name="foo-foo" href="#user-content-foo-foo"></a>
+
## A heading<a name="foo-a-heading" href="#user-content-foo-a-heading"></a>
+
### A subheading<a name="foo-a-subheading" href="#user-content-foo-a-subheading"></a>
+
## An overlength heading when I really should have chose something shorter<a name="foo-an-overlength-heading-when-i-really-should-have-chose-something-shorter" href="#user-content-foo-an-overlength-heading-when-i-really-should-have-chose-something-shorter"></a>
Note that in order for that last one to be shown as a heading in Vim, we can't allow the usual hard-wrapping rules to apply.
+
# Example<a name="example-example" href="#user-content-example-example"></a>
In which the narrator says some things.
+
## Commands<a name="example-commands" href="#user-content-example-commands"></a>
Stuff about commands.
+
## Mappings<a name="example-mappings" href="#user-content-example-mappings"></a>
Stuff about mappings.
+
## Options<a name="example-options" href="#user-content-example-options"></a>
Stuff about options.
+
## Functions<a name="example-functions" href="#user-content-example-functions"></a>
Stuff about functions.
+
## License<a name="example-license" href="#user-content-example-license"></a>
Released under the terms of the OMFGWTFBBQLMAOPL.
+
## History<a name="example-history" href="#user-content-example-history"></a>
+
### 0.1 (not yet released)<a name="example-01-not-yet-released" href="#user-content-example-01-not-yet-released"></a>
- Initial release.
+
# Example<a name="example-example" href="#user-content-example-example"></a>
In which the narrator says some things.
+
## Commands<a name="example-commands" href="#user-content-example-commands"></a>
Stuff about commands.
+
## Mappings<a name="example-mappings" href="#user-content-example-mappings"></a>
Stuff about mappings.
+
## Options<a name="example-options" href="#user-content-example-options"></a>
Stuff about options.
+
## Functions<a name="example-functions" href="#user-content-example-functions"></a>
Stuff about functions.
+
## License<a name="example-license" href="#user-content-example-license"></a>
Released under the terms of the OMFGWTFBBQLMAOPL.
+
## History<a name="example-history" href="#user-content-example-history"></a>
+
### 0.1 (not yet released)<a name="example-01-not-yet-released" href="#user-content-example-01-not-yet-released"></a>
- Initial release.