let (ast9, options) = extract extractOptions ast8
let (ast10, option) = extract extractOption ast9
let project = Project $ concat [ plugin
- , [ast6]
+ , [ast10]
, commands
, command
, mappings
import Docvim.AST
import qualified Data.DList as DList
--- | Returns True if a node marks the end of a region/block.
+-- | Returns True if a node marks the end of a region/block/section.
endSection :: Node -> Bool
endSection = \case
CommandAnnotation _ -> True
```
let g:FerretQFMap=0
```
-
-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.
-
-A full list of overridden settings can be found in <strong>`ferret-overrides`</strong>.
-
-To prevent the custom settings from being applied, set <strong>`g:FerretQFOptions`</strong> to 0:
-
-```
-let g:FerretQFOptions=0
-```
-
-Controls whether to set up mappings in the <strong>`quickfix`</strong> results window for deleting results. The mappings include:
-
-- `d` (<strong>`visual-mode`</strong>): delete visual selection
-- `dd` (<strong>`Normal-mode`</strong>): delete current line
-- `d`{motion} (<strong>`Normal-mode`</strong>): delete range indicated by {motion}
-
-To prevent these mappings from being set up, set to 0:
-
-```
-let g:FerretQFMap=0
-```
:Acks /foo/bar/
```
-Controls whether to set up the Ferret mappings, such as <strong>`<Plug>(FerretAck)`</strong> (see <strong>[`ferret-mappings`](#user-content-ferret-mappings)</strong> for a full list). To prevent any mapping from being configured, set to 0:
+This is a utility function that is used by the <strong>`:Acks`</strong> command but is also generally useful enough to warrant being exposed publicly.
-```
-let g:FerretMap=0
-```
+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
+
+### Circumstances where mappings do not get set up
+
+Note that Ferret will not try to set up the <leader> mappings if any of the following are true:
+
+- A mapping for already exists.
+- 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
+
+Additionally, Ferret will set up special mappings in <strong>`quickfix`</strong> listings, unless prevented from doing so by <strong>`g:FerretQFMap`</strong>:
+
+- `d` (<strong>`visual-mode`</strong>): delete visual selection
+- `dd` (<strong>`Normal-mode`</strong>): delete current line
+- `d`{motion} (<strong>`Normal-mode`</strong>): delete range indicated by {motion}
Ferret maps <leader>a to <strong>`<Plug>(FerretAck)`</strong>, which triggers the <strong>`: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>u <Plug>(FerretAcks)
```
-This is a utility function that is used by the <strong>`:Acks`</strong> command but is also generally useful enough to warrant being exposed publicly.
+Controls whether to set up the Ferret mappings, such as <strong>`<Plug>(FerretAck)`</strong> (see <strong>[`ferret-mappings`](#user-content-ferret-mappings)</strong> for a full list). To prevent any mapping from being configured, set to 0:
-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.
+```
+let g:FerretMap=0
+```
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
```
-## Mappings
-
-### Circumstances where mappings do not get set up
-
-Note that Ferret will not try to set up the <leader> mappings if any of the following are true:
-
-- A mapping for already exists.
-- 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
-
-Additionally, Ferret will set up special mappings in <strong>`quickfix`</strong> listings, unless prevented from doing so by <strong>`g:FerretQFMap`</strong>:
-
-- `d` (<strong>`visual-mode`</strong>): delete visual selection
-- `dd` (<strong>`Normal-mode`</strong>): delete current line
-- `d`{motion} (<strong>`Normal-mode`</strong>): delete range indicated by {motion}
-
## Custom autocommands
<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>
```
let g:FerretDispatch=0
```
-
-Controls whether to use vim-dispatch (and specifically, <strong>`:Make`</strong>) to run <strong>`:Ack`</strong> searches asynchronously, when available. To prevent vim-dispatch from being used, set to 0:
-
-```
-let g:FerretDispatch=0
-```
In which the narrator says some things.
-## Options
-
-Stuff about options.
-
-## Mappings
-
-Stuff about mappings.
-
## Commands
Stuff about commands.
In which the narrator says some things.
-## Options
-
-Stuff about options.
-
-## Mappings
-
-Stuff about mappings.
-
## Commands
Stuff about commands.
Project
[ Project
[ Unit
- [ DocBlock
- [ OptionAnnotation "g:FerretQFOptions" "boolean" (Just "1")
- , Paragraph
- [ Plaintext "Controls"
- , Whitespace
- , Plaintext "whether"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "set"
- , Whitespace
- , Plaintext "up"
- , Whitespace
- , Plaintext "setting"
- , Whitespace
- , Plaintext "overrides"
- , Whitespace
- , Plaintext "for"
- , Whitespace
- , Link "quickfix"
- , Whitespace
- , Plaintext "windows."
- , Whitespace
- , Plaintext "These"
- , Whitespace
- , Plaintext "are"
- , Whitespace
- , Plaintext "various"
- , Whitespace
- , Plaintext "settings,"
- , Whitespace
- , Plaintext "such"
- , Whitespace
- , Plaintext "as"
- , Whitespace
- , Link "norelativenumber"
- , Plaintext ","
- , Whitespace
- , Link "nolist"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Link "nowrap"
- , Plaintext ","
- , Whitespace
- , Plaintext "that"
- , Whitespace
- , Plaintext "are"
- , Whitespace
- , Plaintext "intended"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "make"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Link "quickfix"
- , Whitespace
- , Plaintext "window,"
- , Whitespace
- , Plaintext "which"
- , Whitespace
- , Plaintext "is"
- , Whitespace
- , Plaintext "typically"
- , Whitespace
- , Plaintext "very"
- , Whitespace
- , Plaintext "small"
- , Whitespace
- , Plaintext "relative"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "other"
- , Whitespace
- , Plaintext "windows,"
- , Whitespace
- , Plaintext "more"
- , Whitespace
- , Plaintext "usable."
- ]
- , Paragraph
- [ Plaintext "A"
- , Whitespace
- , Plaintext "full"
- , Whitespace
- , Plaintext "list"
- , Whitespace
- , Plaintext "of"
- , Whitespace
- , Plaintext "overridden"
- , Whitespace
- , Plaintext "settings"
- , Whitespace
- , Plaintext "can"
- , Whitespace
- , Plaintext "be"
- , Whitespace
- , Plaintext "found"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Link "ferret-overrides"
- , Plaintext "."
- ]
- , Paragraph
- [ Plaintext "To"
- , Whitespace
- , Plaintext "prevent"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "custom"
- , Whitespace
- , Plaintext "settings"
- , Whitespace
- , Plaintext "from"
- , Whitespace
- , Plaintext "being"
- , Whitespace
- , Plaintext "applied,"
- , Whitespace
- , Plaintext "set"
- , Whitespace
- , Link "g:FerretQFOptions"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "0:"
- ]
- , Fenced [ "let g:FerretQFOptions=0" ]
- ]
+ [ DocBlock []
, LetStatement
{ letLexpr = "s:options"
, letValue = "get(g:, 'FerretQFOptions', 1)"
, GenericStatement "augroup END"
, GenericStatement "endif"
, GenericStatement "endif"
- , DocBlock
- [ OptionAnnotation "g:FerretQFMap" "boolean" (Just "1")
- , Paragraph
- [ Plaintext "Controls"
- , Whitespace
- , Plaintext "whether"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "set"
- , Whitespace
- , Plaintext "up"
- , Whitespace
- , Plaintext "mappings"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Link "quickfix"
- , Whitespace
- , Plaintext "results"
- , Whitespace
- , Plaintext "window"
- , Whitespace
- , Plaintext "for"
- , Whitespace
- , Plaintext "deleting"
- , Whitespace
- , Plaintext "results."
- , Whitespace
- , Plaintext "The"
- , Whitespace
- , Plaintext "mappings"
- , Whitespace
- , Plaintext "include:"
- ]
- , List
- [ ListItem
- [ Code "d"
- , Whitespace
- , Plaintext "("
- , Link "visual-mode"
- , Plaintext "):"
- , Whitespace
- , Plaintext "delete"
- , Whitespace
- , Plaintext "visual"
- , Whitespace
- , Plaintext "selection"
- ]
- , ListItem
- [ Code "dd"
- , Whitespace
- , Plaintext "("
- , Link "Normal-mode"
- , Plaintext "):"
- , Whitespace
- , Plaintext "delete"
- , Whitespace
- , Plaintext "current"
- , Whitespace
- , Plaintext "line"
- ]
- , ListItem
- [ Code "d"
- , Plaintext "{motion}"
- , Whitespace
- , Plaintext "("
- , Link "Normal-mode"
- , Plaintext "):"
- , Whitespace
- , Plaintext "delete"
- , Whitespace
- , Plaintext "range"
- , Whitespace
- , Plaintext "indicated"
- , Whitespace
- , Plaintext "by"
- , Whitespace
- , Plaintext "{motion}"
- ]
- ]
- , Paragraph
- [ Plaintext "To"
- , Whitespace
- , Plaintext "prevent"
- , Whitespace
- , Plaintext "these"
- , Whitespace
- , Plaintext "mappings"
- , Whitespace
- , Plaintext "from"
- , Whitespace
- , Plaintext "being"
- , Whitespace
- , Plaintext "set"
- , Whitespace
- , Plaintext "up,"
- , Whitespace
- , Plaintext "set"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "0:"
- ]
- , Fenced [ "let g:FerretQFMap=0" ]
- ]
+ , DocBlock []
, LetStatement
{ letLexpr = "s:map" , letValue = "get(g:, 'FerretQFMap', 1)" }
, GenericStatement "if s:map"
, Fenced [ ":call pathogen#helptags()" ]
, Project
[ Unit
- [ DocBlock
- [ MappingsAnnotation
- , SubheadingAnnotation
- "Circumstances where mappings do not get set up"
- , Paragraph
- [ Plaintext "Note"
- , Whitespace
- , Plaintext "that"
- , Whitespace
- , Plaintext "Ferret"
- , Whitespace
- , Plaintext "will"
- , Whitespace
- , Plaintext "not"
- , Whitespace
- , Plaintext "try"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "set"
- , Whitespace
- , Plaintext "up"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "<leader>"
- , Whitespace
- , Plaintext "mappings"
- , Whitespace
- , Plaintext "if"
- , Whitespace
- , Plaintext "any"
- , Whitespace
- , Plaintext "of"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "following"
- , Whitespace
- , Plaintext "are"
- , Whitespace
- , Plaintext "true:"
- ]
- , List
- [ ListItem
- [ Plaintext "A"
- , Whitespace
- , Plaintext "mapping"
- , Whitespace
- , Plaintext "for"
- , Whitespace
- , Plaintext "already"
- , Whitespace
- , Plaintext "exists."
- ]
- , ListItem
- [ Plaintext "An"
- , Whitespace
- , Plaintext "alternative"
- , Whitespace
- , Plaintext "mapping"
- , Whitespace
- , Plaintext "for"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "same"
- , Whitespace
- , Plaintext "functionality"
- , Whitespace
- , Plaintext "has"
- , Whitespace
- , Plaintext "already"
- , Whitespace
- , Plaintext "been"
- , Whitespace
- , Plaintext "set"
- , Whitespace
- , Plaintext "up"
- , Whitespace
- , Plaintext "from"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Link ".vimrc"
- , Plaintext "."
- ]
- , ListItem
- [ Plaintext "The"
- , Whitespace
- , Plaintext "mapping"
- , Whitespace
- , Plaintext "has"
- , Whitespace
- , Plaintext "been"
- , Whitespace
- , Plaintext "suppressed"
- , Whitespace
- , Plaintext "by"
- , Whitespace
- , Plaintext "setting"
- , Whitespace
- , Link "g:FerretMap"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "1"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "your"
- , Whitespace
- , Link ".vimrc"
- , Plaintext "."
- ]
- ]
- , SubheadingAnnotation "Mappings specific to the quickfix window"
- , Paragraph
- [ Plaintext "Additionally,"
- , Whitespace
- , Plaintext "Ferret"
- , Whitespace
- , Plaintext "will"
- , Whitespace
- , Plaintext "set"
- , Whitespace
- , Plaintext "up"
- , Whitespace
- , Plaintext "special"
- , Whitespace
- , Plaintext "mappings"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Link "quickfix"
- , Whitespace
- , Plaintext "listings,"
- , Whitespace
- , Plaintext "unless"
- , Whitespace
- , Plaintext "prevented"
- , Whitespace
- , Plaintext "from"
- , Whitespace
- , Plaintext "doing"
- , Whitespace
- , Plaintext "so"
- , Whitespace
- , Plaintext "by"
- , Whitespace
- , Link "g:FerretQFMap"
- , Plaintext ":"
- ]
- , List
- [ ListItem
- [ Code "d"
- , Whitespace
- , Plaintext "("
- , Link "visual-mode"
- , Plaintext "):"
- , Whitespace
- , Plaintext "delete"
- , Whitespace
- , Plaintext "visual"
- , Whitespace
- , Plaintext "selection"
- ]
- , ListItem
- [ Code "dd"
- , Whitespace
- , Plaintext "("
- , Link "Normal-mode"
- , Plaintext "):"
- , Whitespace
- , Plaintext "delete"
- , Whitespace
- , Plaintext "current"
- , Whitespace
- , Plaintext "line"
- ]
- , ListItem
- [ Code "d"
- , Plaintext "{motion}"
- , Whitespace
- , Plaintext "("
- , Link "Normal-mode"
- , Plaintext "):"
- , Whitespace
- , Plaintext "delete"
- , Whitespace
- , Plaintext "range"
- , Whitespace
- , Plaintext "indicated"
- , Whitespace
- , Plaintext "by"
- , Whitespace
- , Plaintext "{motion}"
- ]
- ]
- ]
+ [ DocBlock []
, GenericStatement "\"\""
, GenericStatement
"if exists('g:FerretLoaded') || &compatible || v:version < 700"
, DocBlock []
, GenericStatement
"command! -nargs=1 Acks call ferret#private#acks(<q-args>)"
- , DocBlock
- [ OptionAnnotation "g:FerretMap" "boolean" (Just "1")
- , Paragraph
- [ Plaintext "Controls"
- , Whitespace
- , Plaintext "whether"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "set"
- , Whitespace
- , Plaintext "up"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "Ferret"
- , Whitespace
- , Plaintext "mappings,"
- , Whitespace
- , Plaintext "such"
- , Whitespace
- , Plaintext "as"
- , Whitespace
- , Link "<Plug>(FerretAck)"
- , Whitespace
- , Plaintext "(see"
- , Whitespace
- , Link "ferret-mappings"
- , Whitespace
- , Plaintext "for"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Plaintext "full"
- , Whitespace
- , Plaintext "list)."
- , Whitespace
- , Plaintext "To"
- , Whitespace
- , Plaintext "prevent"
- , Whitespace
- , Plaintext "any"
- , Whitespace
- , Plaintext "mapping"
- , Whitespace
- , Plaintext "from"
- , Whitespace
- , Plaintext "being"
- , Whitespace
- , Plaintext "configured,"
- , Whitespace
- , Plaintext "set"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "0:"
- ]
- , Fenced [ "let g:FerretMap=0" ]
- ]
+ , DocBlock []
, LetStatement
{ letLexpr = "s:map" , letValue = "get(g:, 'FerretMap', 1)" }
, GenericStatement "if s:map"
, GenericStatement
"if !hasmapto('<Plug>(FerretAck)') && maparg('<leader>a', 'n') ==# ''"
- , DocBlock
- [ MappingAnnotation "<Plug>(FerretAck)"
- , Paragraph
- [ Plaintext "Ferret"
- , Whitespace
- , Plaintext "maps"
- , Whitespace
- , Plaintext "<leader>a"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Link "<Plug>(FerretAck)"
- , Plaintext ","
- , Whitespace
- , Plaintext "which"
- , Whitespace
- , Plaintext "triggers"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Link ":Ack"
- , Whitespace
- , Plaintext "command."
- , Whitespace
- , Plaintext "To"
- , Whitespace
- , Plaintext "use"
- , Whitespace
- , Plaintext "an"
- , Whitespace
- , Plaintext "alternative"
- , Whitespace
- , Plaintext "mapping"
- , Whitespace
- , Plaintext "instead,"
- , Whitespace
- , Plaintext "create"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Plaintext "different"
- , Whitespace
- , Plaintext "one"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "your"
- , Whitespace
- , Link ".vimrc"
- , Whitespace
- , Plaintext "instead"
- , Whitespace
- , Plaintext "using"
- , Whitespace
- , Link ":nmap"
- , Plaintext ":"
- ]
- , Fenced
- [ "\" Instead of <leader>a, use <leader>x."
- , "nmap <leader>x <Plug>(FerretAck)"
- ]
- ]
+ , DocBlock []
, GenericStatement "nmap <unique> <leader>a <Plug>(FerretAck)"
, GenericStatement "endif"
, GenericStatement "nnoremap <Plug>(FerretAck) :Ack<space>"
, GenericStatement
"if !hasmapto('<Plug>FerretLack') && maparg('<leader>l', 'n') ==# ''"
- , DocBlock
- [ MappingAnnotation "<Plug>(FerretLack)"
- , Paragraph
- [ Plaintext "Ferret"
- , Whitespace
- , Plaintext "maps"
- , Whitespace
- , Plaintext "<leader>l"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Link "<Plug>(FerretLack)"
- , Plaintext ","
- , Whitespace
- , Plaintext "which"
- , Whitespace
- , Plaintext "triggers"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Link ":Lack"
- , Whitespace
- , Plaintext "command."
- , Whitespace
- , Plaintext "To"
- , Whitespace
- , Plaintext "use"
- , Whitespace
- , Plaintext "an"
- , Whitespace
- , Plaintext "alternative"
- , Whitespace
- , Plaintext "mapping"
- , Whitespace
- , Plaintext "instead,"
- , Whitespace
- , Plaintext "create"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Plaintext "different"
- , Whitespace
- , Plaintext "one"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "your"
- , Whitespace
- , Link ".vimrc"
- , Whitespace
- , Plaintext "instead"
- , Whitespace
- , Plaintext "using"
- , Whitespace
- , Link ":nmap"
- , Plaintext ":"
- ]
- , Fenced
- [ "\" Instead of <leader>l, use <leader>y."
- , "nmap <leader>y <Plug>(FerretLack)"
- ]
- ]
+ , DocBlock []
, GenericStatement "nmap <unique> <leader>l <Plug>(FerretLack)"
, GenericStatement "endif"
, GenericStatement "nnoremap <Plug>(FerretLack) :Lack<space>"
, GenericStatement
"if !hasmapto('<Plug>(FerretAckWord)') && maparg('<leader>s', 'n') ==# ''"
- , DocBlock
- [ MappingAnnotation "<Plug>(FerretAckWord)"
- , Paragraph
- [ Plaintext "Ferret"
- , Whitespace
- , Plaintext "maps"
- , Whitespace
- , Plaintext "<leader>s"
- , Whitespace
- , Plaintext "(mnemonix:"
- , Whitespace
- , Plaintext "\"selection)"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Link "<Plug>(FerretAckWord)"
- , Plaintext ","
- , Whitespace
- , Plaintext "which"
- , Whitespace
- , Plaintext "uses"
- , Whitespace
- , Link ":Ack"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "search"
- , Whitespace
- , Plaintext "for"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "word"
- , Whitespace
- , Plaintext "currently"
- , Whitespace
- , Plaintext "under"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "cursor."
- , Whitespace
- , Plaintext "To"
- , Whitespace
- , Plaintext "use"
- , Whitespace
- , Plaintext "an"
- , Whitespace
- , Plaintext "alternative"
- , Whitespace
- , Plaintext "mapping"
- , Whitespace
- , Plaintext "instead,"
- , Whitespace
- , Plaintext "create"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Plaintext "different"
- , Whitespace
- , Plaintext "one"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "your"
- , Whitespace
- , Link ".vimrc"
- , Whitespace
- , Plaintext "instead"
- , Whitespace
- , Plaintext "using"
- , Whitespace
- , Link ":nmap"
- , Plaintext ":"
- ]
- , Fenced
- [ "\" Instead of <leader>s, use <leader>z."
- , "nmap <leader>z <Plug>(FerretAckWord)"
- ]
- ]
+ , DocBlock []
, GenericStatement "nmap <unique> <leader>s <Plug>(FerretAckWord)"
, GenericStatement "endif"
, GenericStatement
"nnoremap <Plug>(FerretAckWord) :Ack <C-r><C-w><CR>"
, GenericStatement
"if !hasmapto('<Plug>(FerretAcks)') && maparg('<leader>r', 'n') ==# ''"
- , DocBlock
- [ MappingAnnotation "*<Plug>(FerretAcks)*"
- , Paragraph
- [ Plaintext "Ferret"
- , Whitespace
- , Plaintext "maps"
- , Whitespace
- , Plaintext "<leader>r"
- , Whitespace
- , Plaintext "(mnemonic:"
- , Whitespace
- , Plaintext "\"replace\")"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Link "<Plug>(FerretAcks)"
- , Plaintext ","
- , Whitespace
- , Plaintext "which"
- , Whitespace
- , Plaintext "triggers"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Link ":Acks"
- , Whitespace
- , Plaintext "command"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Plaintext "fills"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "prompt"
- , Whitespace
- , Plaintext "with"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "last"
- , Whitespace
- , Plaintext "search"
- , Whitespace
- , Plaintext "term"
- , Whitespace
- , Plaintext "from"
- , Whitespace
- , Plaintext "Ferret."
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "use"
- , Whitespace
- , Plaintext "an"
- , Whitespace
- , Plaintext "alternative"
- , Whitespace
- , Plaintext "mapping"
- , Whitespace
- , Plaintext "instead,"
- , Whitespace
- , Plaintext "create"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Plaintext "different"
- , Whitespace
- , Plaintext "one"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "your"
- , Whitespace
- , Link ".vimrc"
- , Whitespace
- , Plaintext "instead"
- , Whitespace
- , Plaintext "using"
- , Whitespace
- , Link ":nmap"
- , Plaintext ":"
- ]
- , Fenced
- [ "\" Instead of <leader>r, use <leader>u."
- , "nmap <leader>u <Plug>(FerretAcks)"
- ]
- ]
+ , DocBlock []
, GenericStatement "nmap <unique> <leader>r <Plug>(FerretAcks)"
, GenericStatement "endif"
, GenericStatement
, DocBlock []
, GenericStatement
"command! -bar Qargs execute 'args' ferret#private#qargs()"
- , DocBlock
- [ OptionAnnotation "g:FerretQFCommands" "boolean" (Just "1")
- , Paragraph
- [ Plaintext "Controls"
- , Whitespace
- , Plaintext "whether"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "set"
- , Whitespace
- , Plaintext "up"
- , Whitespace
- , Plaintext "custom"
- , Whitespace
- , Plaintext "versions"
- , Whitespace
- , Plaintext "of"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Link "quickfix"
- , Whitespace
- , Plaintext "commands,"
- , Whitespace
- , Link ":cn"
- , Plaintext ","
- , Whitespace
- , Link ":cnf"
- , Plaintext ","
- , Whitespace
- , Link ":cp"
- , Whitespace
- , Plaintext "an"
- , Whitespace
- , Link ":cpf"
- , Plaintext "."
- , Whitespace
- , Plaintext "These"
- , Whitespace
- , Plaintext "overrides"
- , Whitespace
- , Plaintext "vertically"
- , Whitespace
- , Plaintext "center"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "match"
- , Whitespace
- , Plaintext "within"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "viewport"
- , Whitespace
- , Plaintext "on"
- , Whitespace
- , Plaintext "each"
- , Whitespace
- , Plaintext "jump."
- , Whitespace
- , Plaintext "To"
- , Whitespace
- , Plaintext "prevent"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "custom"
- , Whitespace
- , Plaintext "versions"
- , Whitespace
- , Plaintext "from"
- , Whitespace
- , Plaintext "being"
- , Whitespace
- , Plaintext "configured,"
- , Whitespace
- , Plaintext "set"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "0:"
- ]
- , Fenced [ "let g:FerretQFCommands=0" ]
- ]
+ , DocBlock []
, LetStatement
{ letLexpr = "s:commands"
, letValue = "get(g:, 'FerretQFCommands', 1)"
, functionArguments = ArgumentList []
, functionAttributes = []
, functionBody =
- [ DocBlock
- [ OptionAnnotation "g:FerretDispatch" "boolean" (Just "1")
- , Paragraph
- [ Plaintext "Controls"
- , Whitespace
- , Plaintext "whether"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "use"
- , Whitespace
- , Plaintext "vim-dispatch"
- , Whitespace
- , Plaintext "(and"
- , Whitespace
- , Plaintext "specifically,"
- , Whitespace
- , Link ":Make"
- , Plaintext ")"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "run"
- , Whitespace
- , Link ":Ack"
- , Whitespace
- , Plaintext "searches"
- , Whitespace
- , Plaintext "asynchronously,"
- , Whitespace
- , Plaintext "when"
- , Whitespace
- , Plaintext "available."
- , Whitespace
- , Plaintext "To"
- , Whitespace
- , Plaintext "prevent"
- , Whitespace
- , Plaintext "vim-dispatch"
- , Whitespace
- , Plaintext "from"
- , Whitespace
- , Plaintext "being"
- , Whitespace
- , Plaintext "used,"
- , Whitespace
- , Plaintext "set"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "0:"
- ]
- , Fenced [ "let g:FerretDispatch=0" ]
- ]
+ [ DocBlock []
, LetStatement
{ letLexpr = "l:dispatch"
, letValue = "get(g:, 'FerretDispatch', 1)"
[ DocBlock
[ Paragraph
[ Plaintext "General" , Whitespace , Plaintext "stuff." ]
- , MappingsAnnotation
- , Paragraph
- [ Plaintext "Here"
- , Whitespace
- , Plaintext "is"
- , Whitespace
- , Plaintext "some"
- , Whitespace
- , Plaintext "general"
- , Whitespace
- , Plaintext "commentary"
- , Whitespace
- , Plaintext "about"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "mappings"
- , Whitespace
- , Plaintext "provided"
- , Whitespace
- , Plaintext "by"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "plug-in."
- ]
]
]
]
[ DocBlock
[ Paragraph
[ Plaintext "General" , Whitespace , Plaintext "stuff." ]
- , OptionsAnnotation
- , Paragraph
- [ Plaintext "Here"
- , Whitespace
- , Plaintext "is"
- , Whitespace
- , Plaintext "some"
- , Whitespace
- , Plaintext "general"
- , Whitespace
- , Plaintext "commentary"
- , Whitespace
- , Plaintext "about"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "options"
- , Whitespace
- , Plaintext "provided"
- , Whitespace
- , Plaintext "by"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "plug-in."
- ]
]
]
]
>
let g:FerretQFMap=0
<
-Controls whether to set up setting overrides for |quickfix| windows. These
-are various settings, such as |norelativenumber|, |nolist| and |nowrap|,
-that are intended to make the |quickfix| window, which is typically very
-small relative to other windows, more usable.
-
-A full list of overridden settings can be found in |ferret-overrides|.
-
-To prevent the custom settings from being applied, set |g:FerretQFOptions|
-to 0:
->
- let g:FerretQFOptions=0
-<
-Controls whether to set up mappings in the |quickfix| results window for
-deleting results. The mappings include:
-
-- `d` (|visual-mode|): delete visual selection
-- `dd` (|Normal-mode|): delete current line
-- `d`{motion} (|Normal-mode|): delete range indicated by {motion}
-
-To prevent these mappings from being set up, set to 0:
->
- let g:FerretQFMap=0
-<
>
:call pathogen#helptags()
<
-MAPPINGS *ferret-mappings*
-
-Circumstances where mappings do not get set up ~
-
-Note that Ferret will not try to set up the <leader> mappings if any of the
-following are true:
-
-- A mapping for already exists.
-- An alternative mapping for the same functionality has already been set up
- from a |.vimrc|.
-- The mapping has been suppressed by setting |g:FerretMap| to 1 in your
- |.vimrc|.
-
-Mappings specific to the quickfix window ~
-
-Additionally, Ferret will set up special mappings in |quickfix| listings,
-unless prevented from doing so by |g:FerretQFMap|:
-
-- `d` (|visual-mode|): delete visual selection
-- `dd` (|Normal-mode|): delete current line
-- `d`{motion} (|Normal-mode|): delete range indicated by {motion}
-
-Controls whether to set up the Ferret mappings, such as |<Plug>(FerretAck)|
-(see |ferret-mappings| for a full list). To prevent any mapping from being
-configured, set to 0:
->
- let g:FerretMap=0
-<
-Ferret maps <leader>a to |<Plug>(FerretAck)|, which triggers the |:Ack|
-command. To use an alternative mapping instead, create a different one in
-your |.vimrc| instead using |:nmap|:
->
- " Instead of <leader>a, use <leader>x.
- nmap <leader>x <Plug>(FerretAck)
-<
-Ferret maps <leader>l to |<Plug>(FerretLack)|, which triggers the |:Lack|
-command. To use an alternative mapping instead, create a different one in
-your |.vimrc| instead using |:nmap|:
->
- " Instead of <leader>l, use <leader>y.
- nmap <leader>y <Plug>(FerretLack)
-<
-Ferret maps <leader>s (mnemonix: "selection) to |<Plug>(FerretAckWord)|,
-which uses |:Ack| to search for the word currently under the cursor. To use
-an alternative mapping instead, create a different one in your |.vimrc|
-instead using |:nmap|:
->
- " Instead of <leader>s, use <leader>z.
- nmap <leader>z <Plug>(FerretAckWord)
-<
-Ferret maps <leader>r (mnemonic: "replace") to |<Plug>(FerretAcks)|, which
-triggers the |:Acks| command and fills the prompt with the last search term
-from Ferret. to use an alternative mapping instead, create a different one
-in your |.vimrc| instead using |:nmap|:
->
- " Instead of <leader>r, use <leader>u.
- nmap <leader>u <Plug>(FerretAcks)
-<
-Controls whether to set up custom versions of the |quickfix| commands,
-|:cn|, |:cnf|, |:cp| an |:cpf|. 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
-<
Searches for {pattern} in all the files under the current directory (see
|:pwd|), unless otherwise overridden via {options}, and displays the results
in the |quickfix| listing.
>
let g:FerretDispatch=0
<
-Controls whether to use vim-dispatch (and specifically, |:Make|) to run
-|:Ack| searches asynchronously, when available. To prevent vim-dispatch from
-being used, set to 0:
->
- let g:FerretDispatch=0
-<