, Text.Docvim.Visitor.Footer
, Text.Docvim.Visitor.Function
, Text.Docvim.Visitor.Functions
+ , Text.Docvim.Visitor.Header
, Text.Docvim.Visitor.Heading
, Text.Docvim.Visitor.Mapping
, Text.Docvim.Visitor.Mappings
, Text.Docvim.Visitor.Footer
, Text.Docvim.Visitor.Function
, Text.Docvim.Visitor.Functions
+ , Text.Docvim.Visitor.Header
, Text.Docvim.Visitor.Heading
, Text.Docvim.Visitor.Mapping
, Text.Docvim.Visitor.Mappings
| CommandsAnnotation
| CommandAnnotation Name (Maybe Parameters)
| FooterAnnotation
+ | HeaderAnnotation
+ | ImageAnnotation Source (Maybe Alignment)
| MappingsAnnotation
| MappingAnnotation Name
| OptionsAnnotation
instance Plated Node
+type Alignment = String
type Default = String
type Description = String
type Name = String
+type Source = String
type Type = String
type Parameters = String
import Text.Docvim.Visitor.Footer
import Text.Docvim.Visitor.Function
import Text.Docvim.Visitor.Functions
+import Text.Docvim.Visitor.Header
import Text.Docvim.Visitor.Heading
import Text.Docvim.Visitor.Mapping
import Text.Docvim.Visitor.Mappings
, injectMappings
, injectOptions
]
- let steps = [ extract extractPlugin
+ let steps = [ extract extractHeader
+ , extract extractPlugin
, extract extractCommands
, extract extractCommand
, extract extractMappings
, try $ string "footer" >> pure FooterAnnotation -- must come before function'
, try $ string "functions" >> pure FunctionsAnnotation -- must come before function'
, function'
- , string "indent" >> pure IndentAnnotation
+ , string "header" >> pure HeaderAnnotation
+ , try $ string "indent" >> pure IndentAnnotation -- must come before image'
+ , image'
, try $ string "mappings" >> pure MappingsAnnotation -- must come before mapping
, mapping
, try $ string "options" >> pure OptionsAnnotation -- must come before option'
function' = string "function" >> ws >> FunctionAnnotation <$> word <* optional ws
+ image' = string "image" >> ws >> ImageAnnotation <$> imageSource <*> imageAlignment
+ imageSource = word <* optional ws
+ imageAlignment = optionMaybe $ many1 (noneOf "\n")
+
mapping = string "mapping" >> ws >> MappingAnnotation <$> mappingName
mappingName = word <* optional ws
FunctionDeclaration {} -> nodes $ functionBody n
FunctionsAnnotation -> h2 "Functions"
HeadingAnnotation h -> h2 h
+ ImageAnnotation {} -> image n
Link l -> link l
LinkTargets l -> return $ linkTargets l
List ls -> nodes ls >>= nl
where target = linkTargets [name ++ "()"]
function _ = invalidNode
+image :: Node -> Env
+image (ImageAnnotation source alignment) = do
+ return $ open ++ img ++ close
+ where open = "<p" ++ (align alignment) ++ ">\n"
+ align (Just al) = " align=\"" ++ al ++ "\""
+ align Nothing = ""
+ img = " <img src=\"" ++ source ++ "\" />\n"
+ close = "</p>\n"
+image _ = invalidNode
+
mapping :: String -> Env
mapping name = h3 $ "`" ++ name ++ "`"
FooterAnnotation -> True
FunctionAnnotation _ -> True
FunctionsAnnotation -> True
+ HeaderAnnotation -> True
MappingAnnotation _ -> True
MappingsAnnotation -> True
OptionAnnotation {} -> True
--- /dev/null
+module Text.Docvim.Visitor.Header (extractHeader) where
+
+import Control.Applicative
+import Text.Docvim.AST
+import Text.Docvim.Visitor
+
+-- | Extracts a list of nodes (if any exist) from the `@header` section(s) of
+-- the source code.
+--
+-- It is not recommended to have multiple headers in a project. If multiple
+-- headers (potentially across multiple translation units) exist, there are no
+-- guarantees about order but they just get concatenated in the order we see
+-- them.
+extractHeader :: Alternative f => [Node] -> (f [Node], [Node])
+extractHeader = extractBlocks f
+ where
+ f x = if x == HeaderAnnotation
+ then Just endSection
+ else Nothing
--- /dev/null
+{-# LANGUAGE LambdaCase #-}
+
+module Text.Docvim.Visitor.Image (extractImage) where
+
+import Control.Applicative
+import Text.Docvim.AST
+import Text.Docvim.Visitor
+
+-- | Extracts a list of nodes (if any exist) identified by the `@image`
+-- annotation of the source code.
+extractImage :: Alternative f => [Node] -> (f [Node], [Node])
+extractImage = extractBlocks f
+ where
+ f = \case
+ ImageAnnotation {} -> Just endSection
+ _ -> Nothing
Project
- [ DocBlock
- [ PluginAnnotation "ferret" "Ferret plug-in for Vim"
- , TOC
- [ "Intro"
- , "Installation"
- , "Commands"
- , "Mappings"
- , "Options"
- , "Functions"
- , "Custom autocommands"
- , "Overrides"
- , "Troubleshooting"
- , "FAQ"
- , "Related"
- , "Website"
- , "License"
- , "Development"
- , "Authors"
- , "History"
- ]
- ]
- , HeadingAnnotation "Intro"
- , Blockquote
- [ Paragraph
- [ Plaintext "\"ferret"
- , Whitespace
- , Plaintext "(verb)"
- , BreakTag
- , Plaintext "(ferret"
- , Whitespace
- , Plaintext "something"
- , Whitespace
- , Plaintext "out)"
- , Whitespace
- , Plaintext "search"
- , Whitespace
- , Plaintext "tenaciously"
- , Whitespace
- , Plaintext "for"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Plaintext "find"
- , Whitespace
- , Plaintext "something:"
- , Whitespace
- , Plaintext "she"
- , Whitespace
- , Plaintext "had"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "ability"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "ferret"
- , Whitespace
- , Plaintext "out"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "facts.\""
+ [ HeaderAnnotation
+ , ImageAnnotation
+ "https://raw.githubusercontent.com/wincent/ferret/media/ferret.jpg"
+ (Just "center")
+ , ImageAnnotation
+ "https://raw.githubusercontent.com/wincent/ferret/media/ferret.gif"
+ (Just "center")
+ , Project
+ [ Unit
+ [ FunctionDeclaration
+ { functionBang = True
+ , functionName = "ferret#get_default_arguments"
+ , functionArguments = ArgumentList [ Argument "executable" ]
+ , functionAttributes = [ "abort" ]
+ , functionBody =
+ [ GenericStatement
+ "return get(ferret#private#executables(), a:executable, '')"
+ ]
+ }
]
- ]
- , LinkTargets [ "ferret-features" ]
- , Paragraph
- [ Plaintext "Ferret"
- , Whitespace
- , Plaintext "improves"
- , Whitespace
- , Plaintext "Vim's"
- , Whitespace
- , Plaintext "multi-file"
- , Whitespace
- , Plaintext "search"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "four"
- , Whitespace
- , Plaintext "ways:"
- ]
- , SubheadingAnnotation "1. Powerful multi-file search"
- , Paragraph
- [ Plaintext "Ferret"
- , Whitespace
- , Plaintext "provides"
- , Whitespace
- , Plaintext "an"
- , Whitespace
- , Link ":Ack"
- , Whitespace
- , Plaintext "command"
- , Whitespace
- , Plaintext "for"
- , Whitespace
- , Plaintext "searching"
- , Whitespace
- , Plaintext "across"
- , Whitespace
- , Plaintext "multiple"
- , Whitespace
- , Plaintext "files"
- , Whitespace
- , Plaintext "using"
- , Whitespace
- , Plaintext "ripgrep"
- , Whitespace
- , Plaintext "(https://github.com/BurntSushi/ripgrep),"
- , Whitespace
- , Plaintext "The"
- , Whitespace
- , Plaintext "Silver"
- , Whitespace
- , Plaintext "Searcher"
- , Whitespace
- , Plaintext "(https://github.com/ggreer/the_silver_searcher),"
- , Whitespace
- , Plaintext "or"
- , Whitespace
- , Plaintext "Ack"
- , Whitespace
- , Plaintext "(http://beyondgrep.com/)."
- , Whitespace
- , Plaintext "Support"
- , Whitespace
- , Plaintext "for"
- , Whitespace
- , Plaintext "passing"
- , Whitespace
- , Plaintext "options"
- , Whitespace
- , Plaintext "through"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "underlying"
- , Whitespace
- , Plaintext "search"
- , Whitespace
- , Plaintext "command"
- , Whitespace
- , Plaintext "exists,"
- , Whitespace
- , Plaintext "along"
- , Whitespace
- , Plaintext "with"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "ability"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "use"
- , Whitespace
- , Plaintext "full"
- , Whitespace
- , Plaintext "regular"
- , Whitespace
- , Plaintext "expression"
- , Whitespace
- , Plaintext "syntax"
- , Whitespace
- , Plaintext "without"
- , Whitespace
- , Plaintext "doing"
- , Whitespace
- , Plaintext "special"
- , Whitespace
- , Plaintext "escaping."
- , Whitespace
- , Plaintext "On"
- , Whitespace
- , Plaintext "modern"
- , Whitespace
- , Plaintext "versions"
- , Whitespace
- , Plaintext "of"
- , Whitespace
- , Plaintext "Vim"
- , Whitespace
- , Plaintext "(version"
- , Whitespace
- , Plaintext "8"
- , Whitespace
- , Plaintext "or"
- , Whitespace
- , Plaintext "higher,"
- , Whitespace
- , Plaintext "or"
- , Whitespace
- , Plaintext "Neovim),"
- , Whitespace
- , Plaintext "searches"
- , Whitespace
- , Plaintext "are"
- , Whitespace
- , Plaintext "performed"
- , Whitespace
- , Plaintext "asynchronously"
- , Whitespace
- , Plaintext "(without"
- , Whitespace
- , Plaintext "blocking"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "UI)."
- ]
- , Paragraph
- [ Plaintext "Shortcut"
- , Whitespace
- , Plaintext "mappings"
- , Whitespace
- , Plaintext "are"
- , Whitespace
- , Plaintext "provided"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "start"
- , Whitespace
- , Plaintext "an"
- , Whitespace
- , Link ":Ack"
- , Whitespace
- , Plaintext "search"
- , Whitespace
- , Plaintext "(<leader>a)"
- , Whitespace
- , Plaintext "or"
- , 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 "(<leader>s)."
- ]
- , Paragraph
- [ Plaintext "Results"
- , Whitespace
- , Plaintext "are"
- , Whitespace
- , Plaintext "normally"
- , Whitespace
- , Plaintext "displayed"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Link "quickfix"
- , Whitespace
- , Plaintext "window,"
- , Whitespace
- , Plaintext "but"
- , Whitespace
- , Plaintext "Ferret"
- , Whitespace
- , Plaintext "also"
- , Whitespace
- , Plaintext "provides"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Link ":Lack"
- , Whitespace
- , Plaintext "command"
- , Whitespace
- , Plaintext "that"
- , Whitespace
- , Plaintext "behaves"
- , Whitespace
- , Plaintext "like"
- , Whitespace
- , Link ":Ack"
- , Whitespace
- , Plaintext "but"
- , Whitespace
- , Plaintext "uses"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Link "location-list"
- , Whitespace
- , Plaintext "instead,"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Plaintext "<leader>l"
- , Whitespace
- , Plaintext "mapping"
- , Whitespace
- , Plaintext "as"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Plaintext "shortcut"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Link ":Lack"
- , Plaintext "."
- ]
- , Paragraph
- [ Link ":Back"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Link ":Black"
- , Whitespace
- , Plaintext "are"
- , Whitespace
- , Plaintext "analogous"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Link ":Ack"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Link ":Lack"
- , Plaintext ","
- , Whitespace
- , Plaintext "but"
- , Whitespace
- , Plaintext "scoped"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "search"
- , Whitespace
- , Plaintext "within"
- , Whitespace
- , Plaintext "currently"
- , Whitespace
- , Plaintext "open"
- , Whitespace
- , Plaintext "buffers"
- , Whitespace
- , Plaintext "only."
- ]
- , SubheadingAnnotation "2. Streamlined multi-file replace"
- , Paragraph
- [ Plaintext "The"
- , Whitespace
- , Plaintext "companion"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Link ":Ack"
- , Whitespace
- , Plaintext "is"
- , Whitespace
- , Link ":Acks"
- , Whitespace
- , Plaintext "(mnemonic:"
- , Whitespace
- , Plaintext "\"Ack"
- , Whitespace
- , Plaintext "substitute\","
- , Whitespace
- , Plaintext "accessible"
- , Whitespace
- , Plaintext "via"
- , Whitespace
- , Plaintext "shortcut"
- , Whitespace
- , Plaintext "<leader>r),"
- , Whitespace
- , Plaintext "which"
- , Whitespace
- , Plaintext "allows"
- , Whitespace
- , Plaintext "you"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "run"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Plaintext "multi-file"
- , Whitespace
- , Plaintext "replace"
- , Whitespace
- , Plaintext "across"
- , Whitespace
- , Plaintext "all"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "files"
- , Whitespace
- , Plaintext "placed"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Link "quickfix"
- , Whitespace
- , Plaintext "window"
- , Whitespace
- , Plaintext "by"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Plaintext "previous"
- , Whitespace
- , Plaintext "invocation"
- , Whitespace
- , Plaintext "of"
- , Whitespace
- , Link ":Ack"
- , Whitespace
- , Plaintext "(or"
- , Whitespace
- , Link ":Back"
- , Plaintext ")."
- ]
- , SubheadingAnnotation "3. Quickfix listing enhancements"
- , Paragraph
- [ Plaintext "The"
- , Whitespace
- , Link "quickfix"
- , Whitespace
- , Plaintext "listing"
- , Whitespace
- , Plaintext "itself"
- , Whitespace
- , Plaintext "is"
- , Whitespace
- , Plaintext "enhanced"
- , Whitespace
- , Plaintext "with"
- , Whitespace
- , Plaintext "settings"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "improve"
- , Whitespace
- , Plaintext "its"
- , Whitespace
- , Plaintext "usability,"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Plaintext "natural"
- , Whitespace
- , Plaintext "mappings"
- , Whitespace
- , Plaintext "that"
- , Whitespace
- , Plaintext "allow"
- , Whitespace
- , Plaintext "quick"
- , Whitespace
- , Plaintext "removal"
- , Whitespace
- , Plaintext "of"
- , Whitespace
- , Plaintext "items"
- , Whitespace
- , Plaintext "from"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "list"
- , Whitespace
- , Plaintext "(for"
- , Whitespace
- , Plaintext "example,"
- , Whitespace
- , Plaintext "you"
- , Whitespace
- , Plaintext "can"
- , Whitespace
- , Plaintext "reduce"
- , Whitespace
- , Plaintext "clutter"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "listing"
- , Whitespace
- , Plaintext "by"
- , Whitespace
- , Plaintext "removing"
- , Whitespace
- , Plaintext "lines"
- , Whitespace
- , Plaintext "that"
- , Whitespace
- , Plaintext "you"
- , Whitespace
- , Plaintext "don't"
- , Whitespace
- , Plaintext "intend"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "make"
- , Whitespace
- , Plaintext "changes"
- , Whitespace
- , Plaintext "to)."
- ]
- , Paragraph
- [ Plaintext "Additionally,"
- , Whitespace
- , Plaintext "Vim's"
- , Whitespace
- , Link ":cn"
- , Plaintext ","
- , Whitespace
- , Link ":cp"
- , Plaintext ","
- , Whitespace
- , Link ":cnf"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Link ":cpf"
- , Whitespace
- , Plaintext "commands"
- , Whitespace
- , Plaintext "are"
- , Whitespace
- , Plaintext "tweaked"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "make"
- , Whitespace
- , Plaintext "it"
- , Whitespace
- , Plaintext "easier"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "immediately"
- , Whitespace
- , Plaintext "identify"
- , Whitespace
- , Plaintext "matches"
- , Whitespace
- , Plaintext "by"
- , Whitespace
- , Plaintext "centering"
- , Whitespace
- , Plaintext "them"
- , Whitespace
- , Plaintext "within"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "viewport."
- ]
- , SubheadingAnnotation
- "4. Easy operations on files in the quickfix listing"
- , Paragraph
- [ Plaintext "Finally,"
- , Whitespace
- , Plaintext "Ferret"
- , Whitespace
- , Plaintext "provides"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Link ":Qargs"
- , Whitespace
- , Plaintext "command"
- , Whitespace
- , Plaintext "that"
- , Whitespace
- , Plaintext "puts"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "files"
- , Whitespace
- , Plaintext "currently"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Link "quickfix"
- , Whitespace
- , Plaintext "listing"
- , Whitespace
- , Plaintext "into"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Link ":args"
- , Whitespace
- , Plaintext "list,"
- , Whitespace
- , Plaintext "where"
- , Whitespace
- , Plaintext "they"
- , Whitespace
- , Plaintext "can"
- , Whitespace
- , Plaintext "be"
- , Whitespace
- , Plaintext "operated"
- , Whitespace
- , Plaintext "on"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "bulk"
- , Whitespace
- , Plaintext "via"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Link ":argdo"
- , Whitespace
- , Plaintext "command."
- , Whitespace
- , Plaintext "This"
- , Whitespace
- , Plaintext "is"
- , Whitespace
- , Plaintext "what's"
- , Whitespace
- , Plaintext "used"
- , Whitespace
- , Plaintext "under"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "covers"
- , Whitespace
- , Plaintext "on"
- , Whitespace
- , Plaintext "older"
- , Whitespace
- , Plaintext "versions"
- , Whitespace
- , Plaintext "of"
- , Whitespace
- , Plaintext "Vim"
- , Whitespace
- , Plaintext "by"
- , Whitespace
- , Link ":Acks"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "do"
- , Whitespace
- , Plaintext "its"
- , Whitespace
- , Plaintext "work"
- , Whitespace
- , Plaintext "(on"
- , Whitespace
- , Plaintext "newer"
- , Whitespace
- , Plaintext "versions"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "built-in"
- , Whitespace
- , Link ":cfdo"
- , Whitespace
- , Plaintext "is"
- , Whitespace
- , Plaintext "used"
- , Whitespace
- , Plaintext "instead)."
- ]
- , HeadingAnnotation "Installation"
- , Paragraph
- [ Plaintext "To"
- , Whitespace
- , Plaintext "install"
- , Whitespace
- , Plaintext "Ferret,"
- , Whitespace
- , Plaintext "use"
- , Whitespace
- , Plaintext "your"
- , Whitespace
- , Plaintext "plug-in"
- , Whitespace
- , Plaintext "management"
- , Whitespace
- , Plaintext "system"
- , Whitespace
- , Plaintext "of"
- , Whitespace
- , Plaintext "choice."
- ]
- , Paragraph
- [ Plaintext "If"
- , Whitespace
- , Plaintext "you"
- , Whitespace
- , Plaintext "don't"
- , Whitespace
- , Plaintext "have"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Plaintext "\"plug-in"
- , Whitespace
- , Plaintext "management"
- , Whitespace
- , Plaintext "system"
- , Whitespace
- , Plaintext "of"
- , Whitespace
- , Plaintext "choice\","
- , Whitespace
- , Plaintext "I"
- , Whitespace
- , Plaintext "recommend"
- , Whitespace
- , Plaintext "Pathogen"
- , Whitespace
- , Plaintext "(https://github.com/tpope/vim-pathogen)"
- , Whitespace
- , Plaintext "due"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "its"
- , Whitespace
- , Plaintext "simplicity"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Plaintext "robustness."
- , Whitespace
- , Plaintext "Assuming"
- , Whitespace
- , Plaintext "that"
- , Whitespace
- , Plaintext "you"
- , Whitespace
- , Plaintext "have"
- , Whitespace
- , Plaintext "Pathogen"
- , Whitespace
- , Plaintext "installed"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Plaintext "configured,"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Plaintext "that"
- , Whitespace
- , Plaintext "you"
- , Whitespace
- , Plaintext "want"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "install"
- , Whitespace
- , Plaintext "Ferret"
- , Whitespace
- , Plaintext "into"
- , Whitespace
- , Code "~/.vim/bundle"
- , Plaintext ","
- , Whitespace
- , Plaintext "you"
- , Whitespace
- , Plaintext "can"
- , Whitespace
- , Plaintext "do"
- , Whitespace
- , Plaintext "so"
- , Whitespace
- , Plaintext "with:"
- ]
- , Fenced
- [ "git clone https://github.com/wincent/ferret.git ~/.vim/bundle/ferret"
- ]
- , Paragraph
- [ Plaintext "Alternatively,"
- , Whitespace
- , Plaintext "if"
- , Whitespace
- , Plaintext "you"
- , Whitespace
- , Plaintext "use"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Plaintext "Git"
- , Whitespace
- , Plaintext "submodule"
- , Whitespace
- , Plaintext "for"
- , Whitespace
- , Plaintext "each"
- , Whitespace
- , Plaintext "Vim"
- , Whitespace
- , Plaintext "plug-in,"
- , Whitespace
- , Plaintext "you"
- , Whitespace
- , Plaintext "could"
- , Whitespace
- , Plaintext "do"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "following"
- , Whitespace
- , Plaintext "after"
- , Whitespace
- , Code "cd"
- , Plaintext "-ing"
- , Whitespace
- , Plaintext "into"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "top-level"
- , Whitespace
- , Plaintext "of"
- , Whitespace
- , Plaintext "your"
- , Whitespace
- , Plaintext "Git"
- , Whitespace
- , Plaintext "superproject:"
- ]
- , Fenced
- [ "git submodule add https://github.com/wincent/ferret.git ~/vim/bundle/ferret"
- , "git submodule init"
- ]
- , Paragraph
- [ Plaintext "To"
- , Whitespace
- , Plaintext "generate"
- , Whitespace
- , Plaintext "help"
- , Whitespace
- , Plaintext "tags"
- , Whitespace
- , Plaintext "under"
- , Whitespace
- , Plaintext "Pathogen,"
- , Whitespace
- , Plaintext "you"
- , Whitespace
- , Plaintext "can"
- , Whitespace
- , Plaintext "do"
- , Whitespace
- , Plaintext "so"
- , Whitespace
- , Plaintext "from"
- , Whitespace
- , Plaintext "inside"
- , Whitespace
- , Plaintext "Vim"
- , Whitespace
- , Plaintext "with:"
- ]
- , Fenced [ ":call pathogen#helptags()" ]
- , Project
- [ Unit
+ , Unit
[ FunctionDeclaration
{ functionBang = True
- , functionName = "ferret#get_default_arguments"
- , functionArguments = ArgumentList [ Argument "executable" ]
- , functionAttributes = [ "abort" ]
+ , functionName = "s:is_quickfix"
+ , functionArguments = ArgumentList []
+ , functionAttributes = []
, functionBody =
- [ GenericStatement
- "return get(ferret#private#executables(), a:executable, '')"
+ [ GenericStatement "if exists('*getwininfo')"
+ , LetStatement
+ { letLexpr = "l:info" , letValue = "getwininfo(win_getid())[0]" }
+ , GenericStatement "return l:info.quickfix && !l:info.loclist"
+ , GenericStatement "else"
+ , GenericStatement "return 1"
+ , GenericStatement "endif"
]
}
- ]
- , Unit
- [ FunctionDeclaration
+ , FunctionDeclaration
{ functionBang = True
, functionName = "s:delete"
, functionArguments =
ArgumentList [ Argument "first" , Argument "last" ]
, functionAttributes = []
, functionBody =
- [ LetStatement { letLexpr = "l:list" , letValue = "getqflist()" }
+ [ LetStatement
+ { letLexpr = "l:type"
+ , letValue = "s:is_quickfix() ? 'qf' : 'location'"
+ }
+ , LetStatement
+ { letLexpr = "l:list"
+ , letValue = "l:type == 'qf' ? getqflist() : getloclist(0)"
+ }
, LetStatement { letLexpr = "l:line" , letValue = "a:first" }
, GenericStatement "while l:line >= a:first && l:line <= a:last"
, LetStatement { letLexpr = "l:list[l:line - 1]" , letValue = "0" }
, LetStatement { letLexpr = "l:line" , letValue = "l:line + 1" }
, GenericStatement "endwhile"
+ , GenericStatement "if l:type ==# 'qf'"
, GenericStatement "call setqflist(l:list, 'r')"
, GenericStatement "execute 'cc ' . a:first"
+ , GenericStatement "else"
+ , GenericStatement "call setloclist(0, l:list, 'r')"
+ , GenericStatement "execute 'll ' . a:first"
+ , GenericStatement "endif"
, GenericStatement "execute \"normal \\<C-W>\\<C-P>\""
]
}
"call call('ferret#private#lack', [a:bang, a:args . ' ' . ferret#private#buflist()])"
]
}
+ , FunctionDeclaration
+ { functionBang = True
+ , functionName = "ferret#private#quack"
+ , functionArguments =
+ ArgumentList [ Argument "bang" , Argument "args" ]
+ , functionAttributes = [ "abort" ]
+ , functionBody =
+ [ GenericStatement "if s:qfsize('qf') == 0"
+ , GenericStatement
+ "call ferret#private#error('Cannot search in empty quickfix list')"
+ , GenericStatement "else"
+ , GenericStatement
+ "call call('ferret#private#ack', [a:bang, a:args . ' ' . ferret#private#args('qf')])"
+ , GenericStatement "endif"
+ ]
+ }
, FunctionDeclaration
{ functionBang = True
, functionName = "ferret#private#installprompt"
, FunctionDeclaration
{ functionBang = True
, functionName = "ferret#private#acks"
- , functionArguments = ArgumentList [ Argument "command" ]
+ , functionArguments =
+ ArgumentList [ Argument "command" , Argument "type" ]
, functionAttributes = [ "abort" ]
, functionBody =
[ LetStatement
, LetStatement
{ letLexpr = "l:options" , letValue = "l:matches[3]" }
, GenericStatement "if l:options !~# 'e'"
- , LetStatement { letLexpr = "l:options ." , letValue = "'e'" }
+ , LetStatement { letLexpr = "l:options." , letValue = "'e'" }
, GenericStatement "endif"
+ , GenericStatement "if !&gdefault"
, GenericStatement "if l:options !~# 'g'"
- , LetStatement { letLexpr = "l:options ." , letValue = "'g'" }
+ , LetStatement { letLexpr = "l:options." , letValue = "'g'" }
+ , GenericStatement "else"
+ , LetStatement
+ { letLexpr = "l:options"
+ , letValue = "substitute(l:options, 'g', '', 'g') . 'g'"
+ }
+ , GenericStatement "endif"
+ , GenericStatement "elseif &gdefault && l:options =~# 'g'"
+ , LetStatement
+ { letLexpr = "l:options"
+ , letValue = "substitute(l:options, 'g', '', 'g')"
+ }
, GenericStatement "endif"
, LetStatement
- { letLexpr = "l:cfdo"
- , letValue = "has('listcmds') && exists(':cfdo') == 2"
+ { letLexpr = "l:cdo"
+ , letValue = "has('listcmds') && exists(':cdo') == 2"
}
- , GenericStatement "if !l:cfdo"
+ , GenericStatement "if !l:cdo"
, LetStatement
- { letLexpr = "l:filenames" , letValue = "ferret#private#qargs()" }
+ { letLexpr = "l:filenames"
+ , letValue = "ferret#private#args(a:type)"
+ }
, GenericStatement "if l:filenames ==# ''"
, GenericStatement
"call ferret#private#error( 'Ferret: Quickfix filenames must be present, but there are none ' . '(must use :Ack to find files before :Acks can be used)' )"
, GenericStatement "execute 'args' l:filenames"
, GenericStatement "endif"
, GenericStatement "call ferret#private#autocmd('FerretWillWrite')"
- , GenericStatement "if l:cfdo"
+ , GenericStatement "if l:cdo"
+ , GenericStatement "if a:type == 'qf'"
+ , Empty
, GenericStatement
- "execute 'cfdo' '%s' . l:pattern . l:options . ' | update'"
+ "if get(g:, 'FerretAcksCommand', 'cdo') == 'cfdo'"
+ , LetStatement { letLexpr = "l:command" , letValue = "'cfdo'" }
+ , LetStatement
+ { letLexpr = "l:substitute" , letValue = "'%substitute'" }
, GenericStatement "else"
+ , LetStatement { letLexpr = "l:command" , letValue = "'cdo'" }
+ , LetStatement
+ { letLexpr = "l:substitute" , letValue = "'substitute'" }
+ , GenericStatement "endif"
+ , GenericStatement "else"
+ , Empty
, GenericStatement
- "execute 'argdo' '%s' . l:pattern . l:options . ' | update'"
+ "if get(g:, 'FerretLacksCommand', 'ldo') == 'lfdo'"
+ , LetStatement { letLexpr = "l:command" , letValue = "'lfdo'" }
+ , LetStatement
+ { letLexpr = "l:substitute" , letValue = "'%substitute'" }
+ , GenericStatement "else"
+ , LetStatement { letLexpr = "l:command" , letValue = "'ldo'" }
+ , LetStatement
+ { letLexpr = "l:substitute" , letValue = "'substitute'" }
+ , GenericStatement "endif"
, GenericStatement "endif"
+ , GenericStatement "else"
+ , LetStatement { letLexpr = "l:command" , letValue = "'argdo'" }
+ , LetStatement
+ { letLexpr = "l:substitute" , letValue = "'%substitute'" }
+ , GenericStatement "endif"
+ , GenericStatement
+ "execute l:command l:substitute . l:pattern . l:options . ' | update'"
, GenericStatement "call ferret#private#autocmd('FerretDidWrite')"
]
}
+ , FunctionDeclaration
+ { functionBang = True
+ , functionName = "ferret#private#acks_prompt"
+ , functionArguments = ArgumentList []
+ , functionAttributes = [ "abort" ]
+ , functionBody =
+ [ LetStatement
+ { letLexpr = "l:magic"
+ , letValue = "get(g:, 'FerretVeryMagic', 1)"
+ }
+ , LetStatement
+ { letLexpr = "l:mode" , letValue = "l:magic ? '\\v' : ''" }
+ , GenericStatement "if exists('g:ferret_lastsearch')"
+ , GenericStatement
+ "return '/' . l:mode . g:ferret_lastsearch . '// '"
+ , GenericStatement "else"
+ , GenericStatement "return '/' . l:mode . '//'"
+ , GenericStatement "endif"
+ ]
+ }
, FunctionDeclaration
{ functionBang = True
, functionName = "ferret#private#autocmd"
, functionAttributes = [ "abort" ]
, functionBody =
[ GenericStatement
- "return ferret#private#complete('Ack', a:arglead, a:cmdline, a:cursorpos, 1)"
+ "return ferret#private#complete('Ack', a:arglead, a:cmdline, a:cursorpos, 1)"
+ ]
+ }
+ , FunctionDeclaration
+ { functionBang = True
+ , functionName = "ferret#private#backcomplete"
+ , functionArguments =
+ ArgumentList
+ [ Argument "arglead" , Argument "cmdline" , Argument "cursorpos" ]
+ , functionAttributes = [ "abort" ]
+ , functionBody =
+ [ GenericStatement
+ "return ferret#private#complete('Back', a:arglead, a:cmdline, a:cursorpos, 0)"
]
}
, FunctionDeclaration
{ functionBang = True
- , functionName = "ferret#private#backcomplete"
+ , functionName = "ferret#private#blackcomplete"
, functionArguments =
ArgumentList
[ Argument "arglead" , Argument "cmdline" , Argument "cursorpos" ]
, functionAttributes = [ "abort" ]
, functionBody =
[ GenericStatement
- "return ferret#private#complete('Lack', a:arglead, a:cmdline, a:cursorpos, 0)"
+ "return ferret#private#complete('Black', a:arglead, a:cmdline, a:cursorpos, 0)"
]
}
, FunctionDeclaration
{ functionBang = True
- , functionName = "ferret#private#blackcomplete"
+ , functionName = "ferret#private#lackcomplete"
, functionArguments =
ArgumentList
[ Argument "arglead" , Argument "cmdline" , Argument "cursorpos" ]
, functionAttributes = [ "abort" ]
, functionBody =
[ GenericStatement
- "return ferret#private#complete('Lack', a:arglead, a:cmdline, a:cursorpos, 0)"
+ "return ferret#private#complete('Lack', a:arglead, a:cmdline, a:cursorpos, 1)"
]
}
, FunctionDeclaration
{ functionBang = True
- , functionName = "ferret#private#lackcomplete"
+ , functionName = "ferret#private#quackcomplete"
, functionArguments =
ArgumentList
[ Argument "arglead" , Argument "cmdline" , Argument "cursorpos" ]
, functionAttributes = [ "abort" ]
, functionBody =
[ GenericStatement
- "return ferret#private#complete('Lack', a:arglead, a:cmdline, a:cursorpos, 1)"
+ "return ferret#private#complete('Quack', a:arglead, a:cmdline, a:cursorpos, 0)"
]
}
, FunctionDeclaration
{ letLexpr = "l:executable"
, letValue = "ferret#private#executable()"
}
- , LetStatement
- { letLexpr = "l:binary"
- , letValue = "matchstr(l:executable, '\\v\\w+')"
- }
+ , GenericStatement "return matchstr(l:executable, '\\v\\w+')"
]
}
, LetStatement { letLexpr = "s:options" , letValue = "{" }
}
, FunctionDeclaration
{ functionBang = True
- , functionName = "ferret#private#qargs"
- , functionArguments = ArgumentList []
+ , functionName = "ferret#private#args"
+ , functionArguments = ArgumentList [ Argument "type" ]
, functionAttributes = [ "abort" ]
, functionBody =
[ LetStatement { letLexpr = "l:buffer_numbers" , letValue = "{}" }
- , GenericStatement "for l:item in getqflist()"
, LetStatement
- { letLexpr = "l:buffer_numbers[l:item['bufnr']]"
- , letValue = "bufname(l:item['bufnr'])"
+ { letLexpr = "l:items"
+ , letValue = "a:type == 'qf' ? getqflist() : getloclist(0)"
+ }
+ , GenericStatement "for l:item in l:items"
+ , LetStatement
+ { letLexpr = "l:number" , letValue = "l:item['bufnr']" }
+ , GenericStatement "if !has_key(l:buffer_numbers, l:number)"
+ , LetStatement
+ { letLexpr = "l:buffer_numbers[l:number]"
+ , letValue = "bufname(l:number)"
}
+ , GenericStatement "endif"
, GenericStatement "endfor"
, GenericStatement
"return join(map(values(l:buffer_numbers), 'fnameescape(v:val)'))"
}
, LetStatement { letLexpr = "s:executables" , letValue = "{" }
, GenericStatement
- "\\ 'rg': '--vimgrep --no-config --no-heading', 'ag': '', 'ack': '--column --with-filename', 'ack-grep': '--column --with-filename' }"
+ "\\ 'rg': '--vimgrep --no-heading', 'ag': '', 'ack': '--column --with-filename', 'ack-grep': '--column --with-filename' }"
, LetStatement { letLexpr = "s:init_done" , letValue = "0" }
, FunctionDeclaration
{ functionBang = True
[ GenericStatement "if s:init_done"
, GenericStatement "return"
, GenericStatement "endif"
- , GenericStatement
- "if executable('rg') && match(system('rg --help'), '--max-columns') != -1"
+ , GenericStatement "if executable('rg')"
+ , LetStatement
+ { letLexpr = "l:rg_help" , letValue = "system('rg --help')" }
+ , GenericStatement "if match(l:rg_help, '--no-config') != -1"
+ , LetStatement
+ { letLexpr = "s:executables['rg']." , letValue = "' --no-config'" }
+ , GenericStatement "endif"
+ , GenericStatement "if match(l:rg_help, '--max-columns') != -1"
, LetStatement
{ letLexpr = "s:executables['rg']."
, letValue = "' --max-columns 4096'"
}
, GenericStatement "endif"
+ , GenericStatement "endif"
, GenericStatement "if executable('ag')"
, LetStatement
{ letLexpr = "l:ag_help" , letValue = "system('ag --help')" }
, GenericStatement "endif"
, GenericStatement "setlocal nowrap"
, GenericStatement "setlocal number"
+ , GenericStatement "if !exists('s:original_scrolloff')"
, LetStatement
{ letLexpr = "s:original_scrolloff" , letValue = "&scrolloff" }
+ , GenericStatement "endif"
, GenericStatement "set scrolloff=0"
, GenericStatement "if has('autocmd')"
, GenericStatement "augroup FerretQF"
, GenericStatement
"command! -bang -nargs=1 -complete=customlist,ferret#private#blackcomplete Black call ferret#private#black(<bang>0, <q-args>)"
, GenericStatement
- "command! -nargs=1 Acks call ferret#private#acks(<q-args>)"
+ "command! -bang -nargs=1 -complete=customlist,ferret#private#quackcomplete Quack call ferret#private#quack(<bang>0, <q-args>)"
+ , GenericStatement
+ "command! -nargs=1 Acks call ferret#private#acks(<q-args>, 'qf')"
+ , GenericStatement
+ "command! -nargs=1 Lacks call ferret#private#acks(<q-args>, 'location')"
, GenericStatement
"command! FerretCancelAsync call ferret#private#async#cancel()"
, GenericStatement
, GenericStatement
"nnoremap <Plug>(FerretAckWord) :Ack <C-r><C-w><CR>"
, GenericStatement
- "nnoremap <Plug>(FerretAcks) :Acks <c-r>=(exists('g:ferret_lastsearch') ? '/' . g:ferret_lastsearch . '//' : ' ')<CR><Left>"
+ "nnoremap <Plug>(FerretAcks) :Acks <c-r>=(ferret#private#acks_prompt())<CR><Left><Left>"
, LetStatement
{ letLexpr = "s:map" , letValue = "get(g:, 'FerretMap', 1)" }
, GenericStatement "if s:map"
, GenericStatement "endif"
, GenericStatement "endif"
, GenericStatement
- "command! -bar Qargs execute 'args' ferret#private#qargs()"
+ "command! -bar Qargs execute 'args' ferret#private#args('qf')"
+ , GenericStatement
+ "command! -bar Largs execute 'args' ferret#private#args('location')"
, LetStatement
{ letLexpr = "s:commands"
, letValue = "get(g:, 'FerretQFCommands', 1)"
, UnletStatement { unletBang = False , unletBody = "s:cpoptions" }
]
]
- , CommandsAnnotation
- , CommandAnnotation "Ack" (Just "{pattern} {options}")
+ , DocBlock
+ [ PluginAnnotation "ferret" "Ferret plug-in for Vim"
+ , TOC
+ [ "Intro"
+ , "Installation"
+ , "Commands"
+ , "Mappings"
+ , "Options"
+ , "Functions"
+ , "Custom autocommands"
+ , "Overrides"
+ , "Troubleshooting"
+ , "FAQ"
+ , "Related"
+ , "Website"
+ , "License"
+ , "Development"
+ , "Authors"
+ , "History"
+ ]
+ ]
+ , HeadingAnnotation "Intro"
+ , Blockquote
+ [ Paragraph
+ [ Plaintext "\"ferret"
+ , Whitespace
+ , Plaintext "(verb)"
+ , BreakTag
+ , Plaintext "(ferret"
+ , Whitespace
+ , Plaintext "something"
+ , Whitespace
+ , Plaintext "out)"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "tenaciously"
+ , Whitespace
+ , Plaintext "for"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "find"
+ , Whitespace
+ , Plaintext "something:"
+ , Whitespace
+ , Plaintext "she"
+ , Whitespace
+ , Plaintext "had"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "ability"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "ferret"
+ , Whitespace
+ , Plaintext "out"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "facts.\""
+ ]
+ ]
+ , LinkTargets [ "ferret-features" ]
+ , Paragraph
+ [ Plaintext "Ferret"
+ , Whitespace
+ , Plaintext "improves"
+ , Whitespace
+ , Plaintext "Vim's"
+ , Whitespace
+ , Plaintext "multi-file"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "in"
+ , Whitespace
+ , Plaintext "four"
+ , Whitespace
+ , Plaintext "ways:"
+ ]
+ , SubheadingAnnotation "1. Powerful multi-file search"
+ , Paragraph
+ [ Plaintext "Ferret"
+ , Whitespace
+ , Plaintext "provides"
+ , Whitespace
+ , Plaintext "an"
+ , Whitespace
+ , Link ":Ack"
+ , Whitespace
+ , Plaintext "command"
+ , Whitespace
+ , Plaintext "for"
+ , Whitespace
+ , Plaintext "searching"
+ , Whitespace
+ , Plaintext "across"
+ , Whitespace
+ , Plaintext "multiple"
+ , Whitespace
+ , Plaintext "files"
+ , Whitespace
+ , Plaintext "using"
+ , Whitespace
+ , Plaintext "ripgrep"
+ , Whitespace
+ , Plaintext "(https://github.com/BurntSushi/ripgrep),"
+ , Whitespace
+ , Plaintext "The"
+ , Whitespace
+ , Plaintext "Silver"
+ , Whitespace
+ , Plaintext "Searcher"
+ , Whitespace
+ , Plaintext "(https://github.com/ggreer/the_silver_searcher),"
+ , Whitespace
+ , Plaintext "or"
+ , Whitespace
+ , Plaintext "Ack"
+ , Whitespace
+ , Plaintext "(http://beyondgrep.com/)."
+ , Whitespace
+ , Plaintext "Support"
+ , Whitespace
+ , Plaintext "for"
+ , Whitespace
+ , Plaintext "passing"
+ , Whitespace
+ , Plaintext "options"
+ , Whitespace
+ , Plaintext "through"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "underlying"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "command"
+ , Whitespace
+ , Plaintext "exists,"
+ , Whitespace
+ , Plaintext "along"
+ , Whitespace
+ , Plaintext "with"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "ability"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "use"
+ , Whitespace
+ , Plaintext "full"
+ , Whitespace
+ , Plaintext "regular"
+ , Whitespace
+ , Plaintext "expression"
+ , Whitespace
+ , Plaintext "syntax"
+ , Whitespace
+ , Plaintext "without"
+ , Whitespace
+ , Plaintext "doing"
+ , Whitespace
+ , Plaintext "special"
+ , Whitespace
+ , Plaintext "escaping."
+ , Whitespace
+ , Plaintext "On"
+ , Whitespace
+ , Plaintext "modern"
+ , Whitespace
+ , Plaintext "versions"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Plaintext "Vim"
+ , Whitespace
+ , Plaintext "(version"
+ , Whitespace
+ , Plaintext "8"
+ , Whitespace
+ , Plaintext "or"
+ , Whitespace
+ , Plaintext "higher,"
+ , Whitespace
+ , Plaintext "or"
+ , Whitespace
+ , Plaintext "Neovim),"
+ , Whitespace
+ , Plaintext "searches"
+ , Whitespace
+ , Plaintext "are"
+ , Whitespace
+ , Plaintext "performed"
+ , Whitespace
+ , Plaintext "asynchronously"
+ , Whitespace
+ , Plaintext "(without"
+ , Whitespace
+ , Plaintext "blocking"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "UI)."
+ ]
+ , Paragraph
+ [ Plaintext "Shortcut"
+ , Whitespace
+ , Plaintext "mappings"
+ , Whitespace
+ , Plaintext "are"
+ , Whitespace
+ , Plaintext "provided"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "start"
+ , Whitespace
+ , Plaintext "an"
+ , Whitespace
+ , Link ":Ack"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "(<leader>a)"
+ , Whitespace
+ , Plaintext "or"
+ , 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 "(<leader>s)."
+ ]
+ , Paragraph
+ [ Plaintext "Results"
+ , Whitespace
+ , Plaintext "are"
+ , Whitespace
+ , Plaintext "normally"
+ , Whitespace
+ , Plaintext "displayed"
+ , Whitespace
+ , Plaintext "in"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "quickfix"
+ , Whitespace
+ , Plaintext "window,"
+ , Whitespace
+ , Plaintext "but"
+ , Whitespace
+ , Plaintext "Ferret"
+ , Whitespace
+ , Plaintext "also"
+ , Whitespace
+ , Plaintext "provides"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Link ":Lack"
+ , Whitespace
+ , Plaintext "command"
+ , Whitespace
+ , Plaintext "that"
+ , Whitespace
+ , Plaintext "behaves"
+ , Whitespace
+ , Plaintext "like"
+ , Whitespace
+ , Link ":Ack"
+ , Whitespace
+ , Plaintext "but"
+ , Whitespace
+ , Plaintext "uses"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "location-list"
+ , Whitespace
+ , Plaintext "instead,"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Plaintext "<leader>l"
+ , Whitespace
+ , Plaintext "mapping"
+ , Whitespace
+ , Plaintext "as"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Plaintext "shortcut"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Link ":Lack"
+ , Plaintext "."
+ ]
+ , Paragraph
+ [ Link ":Back"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Link ":Black"
+ , Whitespace
+ , Plaintext "are"
+ , Whitespace
+ , Plaintext "analogous"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Link ":Ack"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Link ":Lack"
+ , Plaintext ","
+ , Whitespace
+ , Plaintext "but"
+ , Whitespace
+ , Plaintext "scoped"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "within"
+ , Whitespace
+ , Plaintext "currently"
+ , Whitespace
+ , Plaintext "open"
+ , Whitespace
+ , Plaintext "buffers"
+ , Whitespace
+ , Plaintext "only."
+ , Whitespace
+ , Link ":Quack"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "scoped"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "among"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "files"
+ , Whitespace
+ , Plaintext "currently"
+ , Whitespace
+ , Plaintext "in"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "quickfix"
+ , Whitespace
+ , Plaintext "list."
+ ]
+ , SubheadingAnnotation "2. Streamlined multi-file replace"
+ , Paragraph
+ [ Plaintext "The"
+ , Whitespace
+ , Plaintext "companion"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Link ":Ack"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Link ":Acks"
+ , Whitespace
+ , Plaintext "(mnemonic:"
+ , Whitespace
+ , Plaintext "\"Ack"
+ , Whitespace
+ , Plaintext "substitute\","
+ , Whitespace
+ , Plaintext "accessible"
+ , Whitespace
+ , Plaintext "via"
+ , Whitespace
+ , Plaintext "shortcut"
+ , Whitespace
+ , Plaintext "<leader>r),"
+ , Whitespace
+ , Plaintext "which"
+ , Whitespace
+ , Plaintext "allows"
+ , Whitespace
+ , Plaintext "you"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "run"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Plaintext "multi-file"
+ , Whitespace
+ , Plaintext "replace"
+ , Whitespace
+ , Plaintext "across"
+ , Whitespace
+ , Plaintext "all"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "files"
+ , Whitespace
+ , Plaintext "placed"
+ , Whitespace
+ , Plaintext "in"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "quickfix"
+ , Whitespace
+ , Plaintext "window"
+ , Whitespace
+ , Plaintext "by"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Plaintext "previous"
+ , Whitespace
+ , Plaintext "invocation"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Link ":Ack"
+ , Whitespace
+ , Plaintext "(or"
+ , Whitespace
+ , Link ":Back"
+ , Plaintext ","
+ , Whitespace
+ , Plaintext "or"
+ , Whitespace
+ , Link ":Quack"
+ , Plaintext ")."
+ ]
+ , Paragraph
+ [ Plaintext "Correspondingly,"
+ , Whitespace
+ , Plaintext "results"
+ , Whitespace
+ , Plaintext "obtained"
+ , Whitespace
+ , Plaintext "by"
+ , Whitespace
+ , Link ":Lack"
+ , Whitespace
+ , Plaintext "can"
+ , Whitespace
+ , Plaintext "be"
+ , Whitespace
+ , Plaintext "targeted"
+ , Whitespace
+ , Plaintext "for"
+ , Whitespace
+ , Plaintext "replacement"
+ , Whitespace
+ , Plaintext "with"
+ , Whitespace
+ , Link ":Lacks"
+ , Plaintext "."
+ ]
+ , SubheadingAnnotation "3. Quickfix listing enhancements"
+ , Paragraph
+ [ Plaintext "The"
+ , Whitespace
+ , Link "quickfix"
+ , Whitespace
+ , Plaintext "listing"
+ , Whitespace
+ , Plaintext "itself"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "enhanced"
+ , Whitespace
+ , Plaintext "with"
+ , Whitespace
+ , Plaintext "settings"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "improve"
+ , Whitespace
+ , Plaintext "its"
+ , Whitespace
+ , Plaintext "usability,"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "natural"
+ , Whitespace
+ , Plaintext "mappings"
+ , Whitespace
+ , Plaintext "that"
+ , Whitespace
+ , Plaintext "allow"
+ , Whitespace
+ , Plaintext "quick"
+ , Whitespace
+ , Plaintext "removal"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Plaintext "items"
+ , Whitespace
+ , Plaintext "from"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "list"
+ , Whitespace
+ , Plaintext "(for"
+ , Whitespace
+ , Plaintext "example,"
+ , Whitespace
+ , Plaintext "you"
+ , Whitespace
+ , Plaintext "can"
+ , Whitespace
+ , Plaintext "reduce"
+ , Whitespace
+ , Plaintext "clutter"
+ , Whitespace
+ , Plaintext "in"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "listing"
+ , Whitespace
+ , Plaintext "by"
+ , Whitespace
+ , Plaintext "removing"
+ , Whitespace
+ , Plaintext "lines"
+ , Whitespace
+ , Plaintext "that"
+ , Whitespace
+ , Plaintext "you"
+ , Whitespace
+ , Plaintext "don't"
+ , Whitespace
+ , Plaintext "intend"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "make"
+ , Whitespace
+ , Plaintext "changes"
+ , Whitespace
+ , Plaintext "to)."
+ ]
+ , Paragraph
+ [ Plaintext "Additionally,"
+ , Whitespace
+ , Plaintext "Vim's"
+ , Whitespace
+ , Link ":cn"
+ , Plaintext ","
+ , Whitespace
+ , Link ":cp"
+ , Plaintext ","
+ , Whitespace
+ , Link ":cnf"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Link ":cpf"
+ , Whitespace
+ , Plaintext "commands"
+ , Whitespace
+ , Plaintext "are"
+ , Whitespace
+ , Plaintext "tweaked"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "make"
+ , Whitespace
+ , Plaintext "it"
+ , Whitespace
+ , Plaintext "easier"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "immediately"
+ , Whitespace
+ , Plaintext "identify"
+ , Whitespace
+ , Plaintext "matches"
+ , Whitespace
+ , Plaintext "by"
+ , Whitespace
+ , Plaintext "centering"
+ , Whitespace
+ , Plaintext "them"
+ , Whitespace
+ , Plaintext "within"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "viewport."
+ ]
+ , SubheadingAnnotation
+ "4. Easy operations on files in the quickfix listing"
+ , Paragraph
+ [ Plaintext "Finally,"
+ , Whitespace
+ , Plaintext "Ferret"
+ , Whitespace
+ , Plaintext "provides"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Link ":Qargs"
+ , Whitespace
+ , Plaintext "command"
+ , Whitespace
+ , Plaintext "that"
+ , Whitespace
+ , Plaintext "puts"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "files"
+ , Whitespace
+ , Plaintext "currently"
+ , Whitespace
+ , Plaintext "in"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "quickfix"
+ , Whitespace
+ , Plaintext "listing"
+ , Whitespace
+ , Plaintext "into"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link ":args"
+ , Whitespace
+ , Plaintext "list,"
+ , Whitespace
+ , Plaintext "where"
+ , Whitespace
+ , Plaintext "they"
+ , Whitespace
+ , Plaintext "can"
+ , Whitespace
+ , Plaintext "be"
+ , Whitespace
+ , Plaintext "operated"
+ , Whitespace
+ , Plaintext "on"
+ , Whitespace
+ , Plaintext "in"
+ , Whitespace
+ , Plaintext "bulk"
+ , Whitespace
+ , Plaintext "via"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link ":argdo"
+ , Whitespace
+ , Plaintext "command."
+ , Whitespace
+ , Plaintext "This"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "what's"
+ , Whitespace
+ , Plaintext "used"
+ , Whitespace
+ , Plaintext "under"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "covers"
+ , Whitespace
+ , Plaintext "on"
+ , Whitespace
+ , Plaintext "older"
+ , Whitespace
+ , Plaintext "versions"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Plaintext "Vim"
+ , Whitespace
+ , Plaintext "by"
+ , Whitespace
+ , Link ":Acks"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "do"
+ , Whitespace
+ , Plaintext "its"
+ , Whitespace
+ , Plaintext "work"
+ , Whitespace
+ , Plaintext "(on"
+ , Whitespace
+ , Plaintext "newer"
+ , Whitespace
+ , Plaintext "versions"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "built-in"
+ , Whitespace
+ , Link ":cdo"
+ , Whitespace
+ , Plaintext "or"
+ , Whitespace
+ , Link ":cfdo"
+ , Whitespace
+ , Plaintext "are"
+ , Whitespace
+ , Plaintext "used"
+ , Whitespace
+ , Plaintext "instead)."
+ ]
+ , Paragraph
+ [ Plaintext "Ferret"
+ , Whitespace
+ , Plaintext "also"
+ , Whitespace
+ , Plaintext "provides"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Link ":Largs"
+ , Whitespace
+ , Plaintext "command,"
+ , Whitespace
+ , Plaintext "which"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Link "location-list"
+ , Whitespace
+ , Plaintext "analog"
+ , Whitespace
+ , Plaintext "for"
+ , Whitespace
+ , Link ":Qargs"
+ , Plaintext "."
+ ]
+ , HeadingAnnotation "Installation"
+ , Paragraph
+ [ Plaintext "To"
+ , Whitespace
+ , Plaintext "install"
+ , Whitespace
+ , Plaintext "Ferret,"
+ , Whitespace
+ , Plaintext "use"
+ , Whitespace
+ , Plaintext "your"
+ , Whitespace
+ , Plaintext "plug-in"
+ , Whitespace
+ , Plaintext "management"
+ , Whitespace
+ , Plaintext "system"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Plaintext "choice."
+ ]
+ , Paragraph
+ [ Plaintext "If"
+ , Whitespace
+ , Plaintext "you"
+ , Whitespace
+ , Plaintext "don't"
+ , Whitespace
+ , Plaintext "have"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Plaintext "\"plug-in"
+ , Whitespace
+ , Plaintext "management"
+ , Whitespace
+ , Plaintext "system"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Plaintext "choice\","
+ , Whitespace
+ , Plaintext "I"
+ , Whitespace
+ , Plaintext "recommend"
+ , Whitespace
+ , Plaintext "Pathogen"
+ , Whitespace
+ , Plaintext "(https://github.com/tpope/vim-pathogen)"
+ , Whitespace
+ , Plaintext "due"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "its"
+ , Whitespace
+ , Plaintext "simplicity"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "robustness."
+ , Whitespace
+ , Plaintext "Assuming"
+ , Whitespace
+ , Plaintext "that"
+ , Whitespace
+ , Plaintext "you"
+ , Whitespace
+ , Plaintext "have"
+ , Whitespace
+ , Plaintext "Pathogen"
+ , Whitespace
+ , Plaintext "installed"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "configured,"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "that"
+ , Whitespace
+ , Plaintext "you"
+ , Whitespace
+ , Plaintext "want"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "install"
+ , Whitespace
+ , Plaintext "Ferret"
+ , Whitespace
+ , Plaintext "into"
+ , Whitespace
+ , Code "~/.vim/bundle"
+ , Plaintext ","
+ , Whitespace
+ , Plaintext "you"
+ , Whitespace
+ , Plaintext "can"
+ , Whitespace
+ , Plaintext "do"
+ , Whitespace
+ , Plaintext "so"
+ , Whitespace
+ , Plaintext "with:"
+ ]
+ , Fenced
+ [ "git clone https://github.com/wincent/ferret.git ~/.vim/bundle/ferret"
+ ]
+ , Paragraph
+ [ Plaintext "Alternatively,"
+ , Whitespace
+ , Plaintext "if"
+ , Whitespace
+ , Plaintext "you"
+ , Whitespace
+ , Plaintext "use"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Plaintext "Git"
+ , Whitespace
+ , Plaintext "submodule"
+ , Whitespace
+ , Plaintext "for"
+ , Whitespace
+ , Plaintext "each"
+ , Whitespace
+ , Plaintext "Vim"
+ , Whitespace
+ , Plaintext "plug-in,"
+ , Whitespace
+ , Plaintext "you"
+ , Whitespace
+ , Plaintext "could"
+ , Whitespace
+ , Plaintext "do"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "following"
+ , Whitespace
+ , Plaintext "after"
+ , Whitespace
+ , Code "cd"
+ , Plaintext "-ing"
+ , Whitespace
+ , Plaintext "into"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "top-level"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Plaintext "your"
+ , Whitespace
+ , Plaintext "Git"
+ , Whitespace
+ , Plaintext "superproject:"
+ ]
+ , Fenced
+ [ "git submodule add https://github.com/wincent/ferret.git ~/vim/bundle/ferret"
+ , "git submodule init"
+ ]
+ , Paragraph
+ [ Plaintext "To"
+ , Whitespace
+ , Plaintext "generate"
+ , Whitespace
+ , Plaintext "help"
+ , Whitespace
+ , Plaintext "tags"
+ , Whitespace
+ , Plaintext "under"
+ , Whitespace
+ , Plaintext "Pathogen,"
+ , Whitespace
+ , Plaintext "you"
+ , Whitespace
+ , Plaintext "can"
+ , Whitespace
+ , Plaintext "do"
+ , Whitespace
+ , Plaintext "so"
+ , Whitespace
+ , Plaintext "from"
+ , Whitespace
+ , Plaintext "inside"
+ , Whitespace
+ , Plaintext "Vim"
+ , Whitespace
+ , Plaintext "with:"
+ ]
+ , Fenced [ ":call pathogen#helptags()" ]
+ , CommandsAnnotation
+ , CommandAnnotation "Ack" (Just "{pattern} {options}")
+ , Paragraph
+ [ Plaintext "Searches"
+ , Whitespace
+ , Plaintext "for"
+ , Whitespace
+ , Plaintext "{pattern}"
+ , Whitespace
+ , Plaintext "in"
+ , Whitespace
+ , Plaintext "all"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "files"
+ , Whitespace
+ , Plaintext "under"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "current"
+ , Whitespace
+ , Plaintext "directory"
+ , Whitespace
+ , Plaintext "(see"
+ , Whitespace
+ , Link ":pwd"
+ , Plaintext "),"
+ , Whitespace
+ , Plaintext "unless"
+ , Whitespace
+ , Plaintext "otherwise"
+ , Whitespace
+ , Plaintext "overridden"
+ , Whitespace
+ , Plaintext "via"
+ , Whitespace
+ , Plaintext "{options},"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "displays"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "results"
+ , Whitespace
+ , Plaintext "in"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "quickfix"
+ , Whitespace
+ , Plaintext "listing."
+ ]
+ , Paragraph
+ [ Code "rg"
+ , Whitespace
+ , Plaintext "(ripgrep)"
+ , Whitespace
+ , Plaintext "then"
+ , Whitespace
+ , Code "ag"
+ , Whitespace
+ , Plaintext "(The"
+ , Whitespace
+ , Plaintext "Silver"
+ , Whitespace
+ , Plaintext "Searcher)"
+ , Whitespace
+ , Plaintext "will"
+ , Whitespace
+ , Plaintext "be"
+ , Whitespace
+ , Plaintext "used"
+ , Whitespace
+ , Plaintext "preferentially"
+ , Whitespace
+ , Plaintext "if"
+ , Whitespace
+ , Plaintext "present"
+ , Whitespace
+ , Plaintext "on"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "system,"
+ , Whitespace
+ , Plaintext "because"
+ , Whitespace
+ , Plaintext "they"
+ , Whitespace
+ , Plaintext "are"
+ , Whitespace
+ , Plaintext "faster,"
+ , Whitespace
+ , Plaintext "falling"
+ , Whitespace
+ , Plaintext "back"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Code "ack"
+ , Plaintext "/"
+ , Code "ack-grep"
+ , Whitespace
+ , Plaintext "as"
+ , Whitespace
+ , Plaintext "needed."
+ ]
+ , Paragraph
+ [ Plaintext "On"
+ , Whitespace
+ , Plaintext "newer"
+ , Whitespace
+ , Plaintext "versions"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Plaintext "Vim"
+ , Whitespace
+ , Plaintext "(version"
+ , Whitespace
+ , Plaintext "8"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "above),"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "process"
+ , Whitespace
+ , Plaintext "runs"
+ , Whitespace
+ , Plaintext "asynchronously"
+ , Whitespace
+ , Plaintext "in"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "background"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "does"
+ , Whitespace
+ , Plaintext "not"
+ , Whitespace
+ , Plaintext "block"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "UI."
+ ]
+ , Paragraph
+ [ Plaintext "Asynchronous"
+ , Whitespace
+ , Plaintext "searches"
+ , Whitespace
+ , Plaintext "are"
+ , Whitespace
+ , Plaintext "preferred"
+ , Whitespace
+ , Plaintext "because"
+ , Whitespace
+ , Plaintext "they"
+ , Whitespace
+ , Plaintext "do"
+ , Whitespace
+ , Plaintext "not"
+ , Whitespace
+ , Plaintext "block,"
+ , Whitespace
+ , Plaintext "despite"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "fact"
+ , Whitespace
+ , Plaintext "that"
+ , Whitespace
+ , Plaintext "Vim"
+ , Whitespace
+ , Plaintext "itself"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "single"
+ , Whitespace
+ , Plaintext "threaded."
+ ]
+ , Paragraph
+ [ Plaintext "The"
+ , Whitespace
+ , Plaintext "{pattern}"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "passed"
+ , Whitespace
+ , Plaintext "through"
+ , Whitespace
+ , Plaintext "as-is"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "underlying"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "program,"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "no"
+ , Whitespace
+ , Plaintext "escaping"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "required"
+ , Whitespace
+ , Plaintext "other"
+ , Whitespace
+ , Plaintext "than"
+ , Whitespace
+ , Plaintext "preceding"
+ , Whitespace
+ , Plaintext "spaces"
+ , Whitespace
+ , Plaintext "by"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Plaintext "single"
+ , Whitespace
+ , Plaintext "backslash."
+ , Whitespace
+ , Plaintext "For"
+ , Whitespace
+ , Plaintext "example,"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "for"
+ , Whitespace
+ , Plaintext "\"\\bfoo[0-9]{2}"
+ , Whitespace
+ , Plaintext "bar\\b\""
+ , Whitespace
+ , Plaintext "(ie."
+ , Whitespace
+ , Plaintext "using"
+ , Whitespace
+ , Code "ag"
+ , Plaintext "'s"
+ , Whitespace
+ , Plaintext "Perl-style"
+ , Whitespace
+ , Plaintext "regular"
+ , Whitespace
+ , Plaintext "expression"
+ , Whitespace
+ , Plaintext "syntax),"
+ , Whitespace
+ , Plaintext "you"
+ , Whitespace
+ , Plaintext "could"
+ , Whitespace
+ , Plaintext "do:"
+ ]
+ , Fenced [ ":Ack \\bfoo[0-9]{2}\\ bar\\b" ]
+ , Paragraph
+ [ Plaintext "Likewise,"
+ , Whitespace
+ , Plaintext "{options}"
+ , Whitespace
+ , Plaintext "are"
+ , Whitespace
+ , Plaintext "passed"
+ , Whitespace
+ , Plaintext "through."
+ , Whitespace
+ , Plaintext "In"
+ , Whitespace
+ , Plaintext "this"
+ , Whitespace
+ , Plaintext "example,"
+ , Whitespace
+ , Plaintext "we"
+ , Whitespace
+ , Plaintext "pass"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Code "-w"
+ , Whitespace
+ , Plaintext "option"
+ , Whitespace
+ , Plaintext "(to"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "on"
+ , Whitespace
+ , Plaintext "word"
+ , Whitespace
+ , Plaintext "boundaries),"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "scope"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "\"foo\""
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "\"bar\""
+ , Whitespace
+ , Plaintext "subdirectories:"
+ ]
+ , Fenced [ ":Ack -w something foo bar" ]
+ , Paragraph
+ [ Plaintext "As"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Plaintext "convenience"
+ , Whitespace
+ , Plaintext "<leader>a"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "set-up"
+ , Whitespace
+ , Plaintext "("
+ , Link "<Plug>(FerretAck)"
+ , Plaintext ")"
+ , Whitespace
+ , Plaintext "as"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Plaintext "shortcut"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "enter"
+ , Whitespace
+ , Link "Cmdline-mode"
+ , Whitespace
+ , Plaintext "with"
+ , Whitespace
+ , Code ":Ack"
+ , Whitespace
+ , Plaintext "inserted"
+ , Whitespace
+ , Plaintext "on"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "Cmdline"
+ , Plaintext "."
+ , Whitespace
+ , Plaintext "Likewise"
+ , Whitespace
+ , Plaintext "<leader>s"
+ , Whitespace
+ , Plaintext "("
+ , Link "<Plug>(FerretAckWord)"
+ , Plaintext ")"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Plaintext "shortcut"
+ , Whitespace
+ , Plaintext "for"
+ , Whitespace
+ , Plaintext "running"
+ , Whitespace
+ , Link ":Ack"
+ , Whitespace
+ , Plaintext "with"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "word"
+ , Whitespace
+ , Plaintext "currently"
+ , Whitespace
+ , Plaintext "under"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "cursor."
+ ]
+ , CommandAnnotation "Ack!" (Just "{pattern} {options}")
+ , Paragraph
+ [ Plaintext "Like"
+ , Whitespace
+ , Link ":Ack"
+ , Plaintext ","
+ , Whitespace
+ , Plaintext "but"
+ , Whitespace
+ , Plaintext "returns"
+ , Whitespace
+ , Plaintext "all"
+ , Whitespace
+ , Plaintext "results"
+ , Whitespace
+ , Plaintext "irrespective"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "value"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Link "g:FerretMaxResults"
+ , Plaintext "."
+ ]
+ , CommandAnnotation "Lack" (Just "{pattern} {options}")
+ , Paragraph
+ [ Plaintext "Just"
+ , Whitespace
+ , Plaintext "like"
+ , Whitespace
+ , Link ":Ack"
+ , Plaintext ","
+ , Whitespace
+ , Plaintext "but"
+ , Whitespace
+ , Plaintext "instead"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Plaintext "using"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "quickfix"
+ , Whitespace
+ , Plaintext "listing,"
+ , Whitespace
+ , Plaintext "which"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "global"
+ , Whitespace
+ , Plaintext "across"
+ , Whitespace
+ , Plaintext "an"
+ , Whitespace
+ , Plaintext "entire"
+ , Whitespace
+ , Plaintext "Vim"
+ , Whitespace
+ , Plaintext "instance,"
+ , Whitespace
+ , Plaintext "it"
+ , Whitespace
+ , Plaintext "uses"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "location-list"
+ , Plaintext ","
+ , Whitespace
+ , Plaintext "which"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Plaintext "per-window"
+ , Whitespace
+ , Plaintext "construct."
+ ]
+ , Paragraph
+ [ Plaintext "Note"
+ , Whitespace
+ , Plaintext "that"
+ , Whitespace
+ , Link ":Lack"
+ , Whitespace
+ , Plaintext "always"
+ , Whitespace
+ , Plaintext "runs"
+ , Whitespace
+ , Plaintext "synchronously"
+ , Whitespace
+ , Plaintext "via"
+ , Whitespace
+ , Link ":cexpr"
+ , Plaintext "."
+ ]
+ , CommandAnnotation "Lack!" (Just "{pattern} {options}")
+ , Paragraph
+ [ Plaintext "Like"
+ , Whitespace
+ , Link ":Lack"
+ , Plaintext ","
+ , Whitespace
+ , Plaintext "but"
+ , Whitespace
+ , Plaintext "returns"
+ , Whitespace
+ , Plaintext "all"
+ , Whitespace
+ , Plaintext "results"
+ , Whitespace
+ , Plaintext "irrespective"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "value"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Link "g:FerretMaxResults"
+ , Plaintext "."
+ ]
+ , CommandAnnotation "Back" (Just "{pattern} {options}")
, Paragraph
- [ Plaintext "Searches"
+ [ Plaintext "Like"
, Whitespace
- , Plaintext "for"
+ , Link ":Ack"
+ , Plaintext ","
, Whitespace
- , Plaintext "{pattern}"
+ , Plaintext "but"
, Whitespace
- , Plaintext "in"
+ , Plaintext "searches"
, Whitespace
- , Plaintext "all"
+ , Plaintext "only"
+ , Whitespace
+ , Plaintext "listed"
+ , Whitespace
+ , Plaintext "buffers."
+ , Whitespace
+ , Plaintext "Note"
+ , Whitespace
+ , Plaintext "that"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "files"
+ , Plaintext "search"
, Whitespace
- , Plaintext "under"
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "still"
+ , Whitespace
+ , Plaintext "delegated"
+ , Whitespace
+ , Plaintext "to"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "current"
+ , Plaintext "underlying"
, Whitespace
- , Plaintext "directory"
+ , Link "'grepprg'"
, Whitespace
- , Plaintext "(see"
+ , Plaintext "("
+ , Code "rg"
+ , Plaintext ","
, Whitespace
- , Link ":pwd"
+ , Code "ag"
+ , Plaintext ","
+ , Whitespace
+ , Code "ack"
+ , Whitespace
+ , Plaintext "or"
+ , Whitespace
+ , Code "ack-grep"
, Plaintext "),"
, Whitespace
- , Plaintext "unless"
+ , Plaintext "which"
, Whitespace
- , Plaintext "otherwise"
+ , Plaintext "means"
, Whitespace
- , Plaintext "overridden"
+ , Plaintext "that"
, Whitespace
- , Plaintext "via"
+ , Plaintext "only"
, Whitespace
- , Plaintext "{options},"
+ , Plaintext "buffers"
+ , Whitespace
+ , Plaintext "written"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "disk"
+ , Whitespace
+ , Plaintext "will"
+ , Whitespace
+ , Plaintext "be"
+ , Whitespace
+ , Plaintext "searched."
+ , Whitespace
+ , Plaintext "If"
+ , Whitespace
+ , Plaintext "no"
+ , Whitespace
+ , Plaintext "buffers"
+ , Whitespace
+ , Plaintext "are"
+ , Whitespace
+ , Plaintext "written"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "disk,"
+ , Whitespace
+ , Plaintext "then"
+ , Whitespace
+ , Link ":Back"
+ , Whitespace
+ , Plaintext "behaves"
+ , Whitespace
+ , Plaintext "exactly"
+ , Whitespace
+ , Plaintext "like"
+ , Whitespace
+ , Link ":Ack"
, Whitespace
, Plaintext "and"
, Whitespace
- , Plaintext "displays"
+ , Plaintext "will"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "all"
+ , Whitespace
+ , Plaintext "files"
+ , Whitespace
+ , Plaintext "in"
, Whitespace
, Plaintext "the"
, Whitespace
+ , Plaintext "current"
+ , Whitespace
+ , Plaintext "directory."
+ ]
+ , CommandAnnotation "Back!" (Just "{pattern} {options}")
+ , Paragraph
+ [ Plaintext "Like"
+ , Whitespace
+ , Link ":Back"
+ , Plaintext ","
+ , Whitespace
+ , Plaintext "but"
+ , Whitespace
+ , Plaintext "returns"
+ , Whitespace
+ , Plaintext "all"
+ , Whitespace
, Plaintext "results"
, Whitespace
- , Plaintext "in"
+ , Plaintext "irrespective"
+ , Whitespace
+ , Plaintext "of"
, Whitespace
, Plaintext "the"
, Whitespace
- , Link "quickfix"
+ , Plaintext "value"
, Whitespace
- , Plaintext "listing."
+ , Plaintext "of"
+ , Whitespace
+ , Link "g:FerretMaxResults"
+ , Plaintext "."
]
+ , CommandAnnotation "Black" (Just "{pattern} {options}")
, Paragraph
- [ Code "rg"
+ [ Plaintext "Like"
, Whitespace
- , Plaintext "(ripgrep)"
+ , Link ":Lack"
+ , Plaintext ","
, Whitespace
- , Plaintext "then"
+ , Plaintext "but"
+ , Whitespace
+ , Plaintext "searches"
+ , Whitespace
+ , Plaintext "only"
+ , Whitespace
+ , Plaintext "listed"
+ , Whitespace
+ , Plaintext "buffers."
+ , Whitespace
+ , Plaintext "As"
+ , Whitespace
+ , Plaintext "with"
+ , Whitespace
+ , Link ":Back"
+ , Plaintext ","
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "still"
+ , Whitespace
+ , Plaintext "delegated"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "underlying"
+ , Whitespace
+ , Link "'grepprg'"
+ , Whitespace
+ , Plaintext "("
+ , Code "rg"
+ , Plaintext ","
, Whitespace
, Code "ag"
+ , Plaintext ","
, Whitespace
- , Plaintext "(The"
+ , Code "ack"
, Whitespace
- , Plaintext "Silver"
+ , Plaintext "or"
, Whitespace
- , Plaintext "Searcher)"
+ , Code "ack-grep"
+ , Plaintext "),"
+ , Whitespace
+ , Plaintext "which"
+ , Whitespace
+ , Plaintext "means"
+ , Whitespace
+ , Plaintext "that"
+ , Whitespace
+ , Plaintext "only"
+ , Whitespace
+ , Plaintext "buffers"
+ , Whitespace
+ , Plaintext "written"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "disk"
, Whitespace
, Plaintext "will"
, Whitespace
, Plaintext "be"
, Whitespace
- , Plaintext "used"
+ , Plaintext "searched."
, Whitespace
- , Plaintext "preferentially"
+ , Plaintext "Likewise,"
, Whitespace
- , Plaintext "if"
+ , Plaintext "If"
, Whitespace
- , Plaintext "present"
+ , Plaintext "no"
, Whitespace
- , Plaintext "on"
+ , Plaintext "buffers"
, Whitespace
- , Plaintext "the"
+ , Plaintext "are"
, Whitespace
- , Plaintext "system,"
+ , Plaintext "written"
, Whitespace
- , Plaintext "because"
+ , Plaintext "to"
, Whitespace
- , Plaintext "they"
+ , Plaintext "disk,"
, Whitespace
- , Plaintext "are"
+ , Plaintext "then"
, Whitespace
- , Plaintext "faster,"
+ , Link ":Black"
, Whitespace
- , Plaintext "falling"
+ , Plaintext "behaves"
, Whitespace
- , Plaintext "back"
+ , Plaintext "exactly"
+ , Whitespace
+ , Plaintext "like"
+ , Whitespace
+ , Link ":Lack"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "will"
+ , Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "all"
+ , Whitespace
+ , Plaintext "files"
, Whitespace
- , Plaintext "to"
+ , Plaintext "in"
, Whitespace
- , Code "ack"
- , Plaintext "/"
- , Code "ack-grep"
+ , Plaintext "the"
, Whitespace
- , Plaintext "as"
+ , Plaintext "current"
, Whitespace
- , Plaintext "needed."
+ , Plaintext "directory."
]
+ , CommandAnnotation "Black!" (Just "{pattern} {options}")
, Paragraph
- [ Plaintext "On"
- , Whitespace
- , Plaintext "newer"
+ [ Plaintext "Like"
, Whitespace
- , Plaintext "versions"
+ , Link ":Black"
+ , Plaintext ","
, Whitespace
- , Plaintext "of"
+ , Plaintext "but"
, Whitespace
- , Plaintext "Vim"
+ , Plaintext "returns"
, Whitespace
- , Plaintext "(version"
+ , Plaintext "all"
, Whitespace
- , Plaintext "8"
+ , Plaintext "results"
, Whitespace
- , Plaintext "and"
+ , Plaintext "irrespective"
, Whitespace
- , Plaintext "above),"
+ , Plaintext "of"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "search"
+ , Plaintext "value"
, Whitespace
- , Plaintext "process"
+ , Plaintext "of"
, Whitespace
- , Plaintext "runs"
+ , Link "g:FerretMaxResults"
+ , Plaintext "."
+ ]
+ , CommandAnnotation "Quack" (Just "{pattern} {options}")
+ , Paragraph
+ [ Plaintext "Like"
, Whitespace
- , Plaintext "asynchronously"
+ , Link ":Ack"
+ , Plaintext ","
, Whitespace
- , Plaintext "in"
+ , Plaintext "but"
, Whitespace
- , Plaintext "the"
+ , Plaintext "searches"
, Whitespace
- , Plaintext "background"
+ , Plaintext "only"
, Whitespace
- , Plaintext "and"
+ , Plaintext "among"
, Whitespace
- , Plaintext "does"
+ , Plaintext "files"
, Whitespace
- , Plaintext "not"
+ , Plaintext "currently"
, Whitespace
- , Plaintext "block"
+ , Plaintext "in"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "UI."
- ]
- , Paragraph
- [ Plaintext "Asynchronous"
+ , Link "quickfix"
, Whitespace
- , Plaintext "searches"
+ , Plaintext "listing."
, Whitespace
- , Plaintext "are"
+ , Plaintext "Note"
, Whitespace
- , Plaintext "preferred"
+ , Plaintext "that"
, Whitespace
- , Plaintext "because"
+ , Plaintext "the"
, Whitespace
- , Plaintext "they"
+ , Plaintext "search"
, Whitespace
- , Plaintext "do"
+ , Plaintext "is"
, Whitespace
- , Plaintext "not"
+ , Plaintext "still"
, Whitespace
- , Plaintext "block,"
+ , Plaintext "delegated"
, Whitespace
- , Plaintext "despite"
+ , Plaintext "to"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "fact"
+ , Plaintext "underlying"
, Whitespace
- , Plaintext "that"
+ , Link "'grepprg'"
, Whitespace
- , Plaintext "Vim"
+ , Plaintext "("
+ , Code "rg"
+ , Plaintext ","
, Whitespace
- , Plaintext "itself"
+ , Code "ag"
+ , Plaintext ","
, Whitespace
- , Plaintext "is"
+ , Code "ack"
, Whitespace
- , Plaintext "single"
+ , Plaintext "or"
, Whitespace
- , Plaintext "threaded."
- ]
- , Paragraph
- [ Plaintext "The"
+ , Code "ack-grep"
+ , Plaintext "),"
, Whitespace
- , Plaintext "{pattern}"
+ , Plaintext "which"
, Whitespace
- , Plaintext "is"
+ , Plaintext "means"
, Whitespace
- , Plaintext "passed"
+ , Plaintext "that"
, Whitespace
- , Plaintext "through"
+ , Plaintext "only"
, Whitespace
- , Plaintext "as-is"
+ , Plaintext "buffers"
+ , Whitespace
+ , Plaintext "written"
, Whitespace
, Plaintext "to"
, Whitespace
- , Plaintext "the"
+ , Plaintext "disk"
, Whitespace
- , Plaintext "underlying"
+ , Plaintext "will"
, Whitespace
- , Plaintext "search"
+ , Plaintext "be"
, Whitespace
- , Plaintext "program,"
+ , Plaintext "searched."
, Whitespace
- , Plaintext "and"
+ , Plaintext "If"
, Whitespace
, Plaintext "no"
, Whitespace
- , Plaintext "escaping"
- , Whitespace
- , Plaintext "is"
+ , Plaintext "buffers"
, Whitespace
- , Plaintext "required"
+ , Plaintext "are"
, Whitespace
- , Plaintext "other"
+ , Plaintext "written"
, Whitespace
- , Plaintext "than"
+ , Plaintext "to"
, Whitespace
- , Plaintext "preceding"
+ , Plaintext "disk,"
, Whitespace
- , Plaintext "spaces"
+ , Plaintext "then"
, Whitespace
- , Plaintext "by"
+ , Link ":Quack"
, Whitespace
- , Plaintext "a"
+ , Plaintext "behaves"
, Whitespace
- , Plaintext "single"
+ , Plaintext "exactly"
, Whitespace
- , Plaintext "backslash."
+ , Plaintext "like"
, Whitespace
- , Plaintext "For"
+ , Link ":Ack"
, Whitespace
- , Plaintext "example,"
+ , Plaintext "and"
, Whitespace
- , Plaintext "to"
+ , Plaintext "will"
, Whitespace
, Plaintext "search"
, Whitespace
- , Plaintext "for"
+ , Plaintext "all"
, Whitespace
- , Plaintext "\"\\bfoo[0-9]{2}"
+ , Plaintext "files"
, Whitespace
- , Plaintext "bar\\b\""
+ , Plaintext "in"
, Whitespace
- , Plaintext "(ie."
+ , Plaintext "the"
, Whitespace
- , Plaintext "using"
+ , Plaintext "current"
, Whitespace
- , Code "ag"
- , Plaintext "'s"
+ , Plaintext "directory."
+ ]
+ , CommandAnnotation "Quack!" (Just "{pattern} {options}")
+ , Paragraph
+ [ Plaintext "Like"
, Whitespace
- , Plaintext "Perl-style"
+ , Link ":Quack"
+ , Plaintext ","
, Whitespace
- , Plaintext "regular"
+ , Plaintext "but"
, Whitespace
- , Plaintext "expression"
+ , Plaintext "returns"
, Whitespace
- , Plaintext "syntax),"
+ , Plaintext "all"
, Whitespace
- , Plaintext "you"
+ , Plaintext "results"
, Whitespace
- , Plaintext "could"
+ , Plaintext "irrespective"
, Whitespace
- , Plaintext "do:"
- ]
- , Fenced [ ":Ack \\bfoo[0-9]{2}\\ bar\\b" ]
- , Paragraph
- [ Plaintext "Likewise,"
+ , Plaintext "of"
, Whitespace
- , Plaintext "{options}"
+ , Plaintext "the"
, Whitespace
- , Plaintext "are"
+ , Plaintext "value"
, Whitespace
- , Plaintext "passed"
+ , Plaintext "of"
, Whitespace
- , Plaintext "through."
+ , Link "g:FerretMaxResults"
+ , Plaintext "."
+ ]
+ , CommandAnnotation "Acks" (Just "/{pattern}/{replacement}/")
+ , Paragraph
+ [ Plaintext "Takes"
, Whitespace
- , Plaintext "In"
+ , Plaintext "all"
, Whitespace
- , Plaintext "this"
+ , Plaintext "of"
, Whitespace
- , Plaintext "example,"
+ , Plaintext "the"
, Whitespace
- , Plaintext "we"
+ , Plaintext "files"
, Whitespace
- , Plaintext "pass"
+ , Plaintext "currently"
+ , Whitespace
+ , Plaintext "in"
, Whitespace
, Plaintext "the"
, Whitespace
- , Code "-w"
+ , Link "quickfix"
, Whitespace
- , Plaintext "option"
+ , Plaintext "listing"
, Whitespace
- , Plaintext "(to"
+ , Plaintext "and"
, Whitespace
- , Plaintext "search"
+ , Plaintext "performs"
, Whitespace
- , Plaintext "on"
+ , Plaintext "a"
, Whitespace
- , Plaintext "word"
+ , Plaintext "substitution"
, Whitespace
- , Plaintext "boundaries),"
+ , Plaintext "of"
, Whitespace
- , Plaintext "and"
+ , Plaintext "all"
, Whitespace
- , Plaintext "scope"
+ , Plaintext "instances"
, Whitespace
- , Plaintext "the"
+ , Plaintext "of"
, Whitespace
- , Plaintext "search"
+ , Plaintext "{pattern}"
, Whitespace
- , Plaintext "to"
+ , Plaintext "(a"
, Whitespace
- , Plaintext "the"
+ , Plaintext "standard"
, Whitespace
- , Plaintext "\"foo\""
+ , Plaintext "Vim"
, Whitespace
- , Plaintext "and"
+ , Plaintext "search"
, Whitespace
- , Plaintext "\"bar\""
+ , Link "pattern"
+ , Plaintext ")"
, Whitespace
- , Plaintext "subdirectories:"
+ , Plaintext "by"
+ , Whitespace
+ , Plaintext "{replacement}."
]
- , Fenced [ ":Ack -w something foo bar" ]
, Paragraph
- [ Plaintext "As"
- , Whitespace
- , Plaintext "a"
- , Whitespace
- , Plaintext "convenience"
+ [ Plaintext "A"
, Whitespace
- , Plaintext "<leader>a"
+ , Plaintext "typical"
, Whitespace
- , Plaintext "is"
+ , Plaintext "sequence"
, Whitespace
- , Plaintext "set-up"
+ , Plaintext "consists"
, Whitespace
- , Plaintext "("
- , Link "<Plug>(FerretAck)"
- , Plaintext ")"
+ , Plaintext "of"
, Whitespace
- , Plaintext "as"
+ , Plaintext "an"
, Whitespace
- , Plaintext "a"
+ , Link ":Ack"
, Whitespace
- , Plaintext "shortcut"
+ , Plaintext "invocation"
, Whitespace
, Plaintext "to"
, Whitespace
- , Plaintext "enter"
+ , Plaintext "populate"
, Whitespace
- , Link "Cmdline-mode"
+ , Plaintext "the"
, Whitespace
- , Plaintext "with"
+ , Link "quickfix"
, Whitespace
- , Code ":Ack"
+ , Plaintext "listing"
, Whitespace
- , Plaintext "inserted"
+ , Plaintext "and"
, Whitespace
- , Plaintext "on"
+ , Plaintext "then"
, Whitespace
- , Plaintext "the"
+ , Link ":Acks"
, Whitespace
- , Link "Cmdline"
- , Plaintext "."
+ , Plaintext "(mnemonic:"
, Whitespace
- , Plaintext "Likewise"
+ , Plaintext "\"Ack"
, Whitespace
- , Plaintext "<leader>s"
+ , Plaintext "substitute\")"
, Whitespace
- , Plaintext "("
- , Link "<Plug>(FerretAckWord)"
- , Plaintext ")"
+ , Plaintext "to"
, Whitespace
- , Plaintext "is"
+ , Plaintext "perform"
, Whitespace
- , Plaintext "a"
+ , Plaintext "replacements."
, Whitespace
- , Plaintext "shortcut"
+ , Plaintext "For"
, Whitespace
- , Plaintext "for"
+ , Plaintext "example,"
, Whitespace
- , Plaintext "running"
+ , Plaintext "to"
, Whitespace
- , Link ":Ack"
+ , Plaintext "replace"
+ , Whitespace
+ , Plaintext "\"foo\""
, Whitespace
, Plaintext "with"
, Whitespace
- , Plaintext "the"
+ , Plaintext "\"bar\""
, Whitespace
- , Plaintext "word"
+ , Plaintext "across"
, Whitespace
- , Plaintext "currently"
+ , Plaintext "all"
, Whitespace
- , Plaintext "under"
+ , Plaintext "files"
+ , Whitespace
+ , Plaintext "in"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "cursor."
+ , Plaintext "current"
+ , Whitespace
+ , Plaintext "directory:"
]
- , CommandAnnotation "Ack!" (Just "{pattern} {options}")
+ , Fenced [ ":Ack foo" , ":Acks /foo/bar/" ]
, Paragraph
- [ Plaintext "Like"
+ [ Plaintext "The"
, Whitespace
- , Link ":Ack"
- , Plaintext ","
+ , Plaintext "pattern"
, Whitespace
- , Plaintext "but"
+ , Plaintext "and"
, Whitespace
- , Plaintext "returns"
+ , Plaintext "replacement"
, Whitespace
- , Plaintext "all"
+ , Plaintext "are"
, Whitespace
- , Plaintext "results"
+ , Plaintext "passed"
, Whitespace
- , Plaintext "irrespective"
+ , Plaintext "through"
, Whitespace
- , Plaintext "of"
+ , Plaintext "literally"
, Whitespace
- , Plaintext "the"
+ , Plaintext "to"
, Whitespace
- , Plaintext "value"
+ , Plaintext "Vim's"
, Whitespace
- , Plaintext "of"
+ , Link ":substitute"
, Whitespace
- , Link "g:FerretMaxResults"
- , Plaintext "."
- ]
- , CommandAnnotation "Lack" (Just "{pattern} {options}")
- , Paragraph
- [ Plaintext "Just"
+ , Plaintext "command,"
, Whitespace
- , Plaintext "like"
+ , Plaintext "preserving"
, Whitespace
- , Link ":Ack"
- , Plaintext ","
+ , Plaintext "all"
, Whitespace
- , Plaintext "but"
+ , Plaintext "characters"
, Whitespace
- , Plaintext "instead"
+ , Plaintext "and"
, Whitespace
- , Plaintext "of"
+ , Plaintext "escapes,"
, Whitespace
- , Plaintext "using"
+ , Plaintext "including"
, Whitespace
- , Plaintext "the"
+ , Plaintext "references"
, Whitespace
- , Link "quickfix"
+ , Plaintext "to"
, Whitespace
- , Plaintext "listing,"
+ , Plaintext "matches"
, Whitespace
- , Plaintext "which"
+ , Plaintext "in"
, Whitespace
- , Plaintext "is"
+ , Plaintext "the"
, Whitespace
- , Plaintext "global"
+ , Plaintext "pattern."
, Whitespace
- , Plaintext "across"
+ , Plaintext "For"
, Whitespace
- , Plaintext "an"
+ , Plaintext "example,"
, Whitespace
- , Plaintext "entire"
+ , Plaintext "the"
, Whitespace
- , Plaintext "Vim"
+ , Plaintext "following"
, Whitespace
- , Plaintext "instance,"
+ , Plaintext "could"
, Whitespace
- , Plaintext "it"
+ , Plaintext "be"
, Whitespace
- , Plaintext "uses"
+ , Plaintext "used"
, Whitespace
- , Plaintext "the"
+ , Plaintext "to"
, Whitespace
- , Link "location-list"
- , Plaintext ","
+ , Plaintext "swap"
, Whitespace
- , Plaintext "which"
+ , Plaintext "the"
, Whitespace
- , Plaintext "is"
+ , Plaintext "order"
, Whitespace
- , Plaintext "a"
+ , Plaintext "of"
, Whitespace
- , Plaintext "per-window"
+ , Plaintext "\"foo123\""
, Whitespace
- , Plaintext "construct."
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "\"bar\":"
]
+ , Fenced [ ":Acks /\\v(foo\\d+)(bar)/\\2\\1/" ]
+ , CommandAnnotation "Lacks" (Just "/{pattern}/{replacement}/")
, Paragraph
- [ Plaintext "Note"
- , Whitespace
- , Plaintext "that"
+ [ Plaintext "Takes"
, Whitespace
- , Link ":Lack"
+ , Plaintext "all"
, Whitespace
- , Plaintext "always"
+ , Plaintext "of"
, Whitespace
- , Plaintext "runs"
+ , Plaintext "the"
, Whitespace
- , Plaintext "synchronously"
+ , Plaintext "files"
, Whitespace
- , Plaintext "via"
+ , Plaintext "in"
, Whitespace
- , Link ":cexpr"
- , Plaintext "."
- ]
- , CommandAnnotation "Lack!" (Just "{pattern} {options}")
- , Paragraph
- [ Plaintext "Like"
+ , Plaintext "the"
, Whitespace
- , Link ":Lack"
- , Plaintext ","
+ , Plaintext "current"
, Whitespace
- , Plaintext "but"
+ , Link "location-list"
, Whitespace
- , Plaintext "returns"
+ , Plaintext "and"
, Whitespace
- , Plaintext "all"
+ , Plaintext "performs"
, Whitespace
- , Plaintext "results"
+ , Plaintext "a"
, Whitespace
- , Plaintext "irrespective"
+ , Plaintext "substitution"
, Whitespace
, Plaintext "of"
, Whitespace
- , Plaintext "the"
+ , Plaintext "all"
, Whitespace
- , Plaintext "value"
+ , Plaintext "instances"
, Whitespace
, Plaintext "of"
, Whitespace
- , Link "g:FerretMaxResults"
- , Plaintext "."
- ]
- , CommandAnnotation "Back" (Just "{pattern} {options}")
- , Paragraph
- [ Plaintext "Like"
- , Whitespace
- , Link ":Ack"
- , Plaintext ","
+ , Plaintext "{pattern}"
, Whitespace
- , Plaintext "but"
+ , Plaintext "by"
, Whitespace
- , Plaintext "searches"
+ , Plaintext "{replacement}."
, Whitespace
- , Plaintext "only"
+ , Plaintext "This"
, Whitespace
- , Plaintext "listed"
+ , Plaintext "is"
, Whitespace
- , Plaintext "buffers."
+ , Plaintext "an"
, Whitespace
- , Plaintext "Note"
+ , Plaintext "analog"
, Whitespace
- , Plaintext "that"
+ , Plaintext "of"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "search"
+ , Link ":Acks"
, Whitespace
- , Plaintext "is"
+ , Plaintext "command,"
, Whitespace
- , Plaintext "still"
+ , Plaintext "but"
, Whitespace
- , Plaintext "delegated"
+ , Plaintext "operates"
, Whitespace
- , Plaintext "to"
+ , Plaintext "on"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "underlying"
+ , Link "location-list"
, Whitespace
- , Link "'grepprg'"
+ , Plaintext "instead"
, Whitespace
- , Plaintext "("
- , Code "rg"
- , Plaintext ","
+ , Plaintext "of"
, Whitespace
- , Code "ag"
- , Plaintext ","
+ , Plaintext "the"
, Whitespace
- , Code "ack"
+ , Link "quickfix"
, Whitespace
- , Plaintext "or"
+ , Plaintext "listing."
+ ]
+ , CommandAnnotation "FerretCancelAsync" Nothing
+ , Paragraph
+ [ Plaintext "Cancels"
, Whitespace
- , Code "ack-grep"
- , Plaintext "),"
+ , Plaintext "any"
, Whitespace
- , Plaintext "which"
+ , Plaintext "asynchronous"
, Whitespace
- , Plaintext "means"
+ , Plaintext "search"
, Whitespace
, Plaintext "that"
, Whitespace
- , Plaintext "only"
+ , Plaintext "may"
+ , Whitespace
+ , Plaintext "be"
+ , Whitespace
+ , Plaintext "in"
, Whitespace
- , Plaintext "buffers"
+ , Plaintext "progress"
, Whitespace
- , Plaintext "written"
+ , Plaintext "in"
, Whitespace
- , Plaintext "to"
+ , Plaintext "the"
, Whitespace
- , Plaintext "disk"
+ , Plaintext "background."
+ ]
+ , CommandAnnotation "FerretPullAsync" Nothing
+ , Paragraph
+ [ Plaintext "Eagerly"
, Whitespace
- , Plaintext "will"
+ , Plaintext "populates"
, Whitespace
- , Plaintext "be"
+ , Plaintext "the"
, Whitespace
- , Plaintext "searched."
+ , Link "quickfix"
, Whitespace
- , Plaintext "If"
+ , Plaintext "(or"
, Whitespace
- , Plaintext "no"
+ , Link "location-list"
+ , Plaintext ")"
, Whitespace
- , Plaintext "buffers"
+ , Plaintext "window"
, Whitespace
- , Plaintext "are"
+ , Plaintext "with"
, Whitespace
- , Plaintext "written"
+ , Plaintext "any"
, Whitespace
- , Plaintext "to"
+ , Plaintext "results"
, Whitespace
- , Plaintext "disk,"
+ , Plaintext "that"
, Whitespace
- , Plaintext "then"
+ , Plaintext "may"
, Whitespace
- , Link ":Back"
+ , Plaintext "have"
, Whitespace
- , Plaintext "behaves"
+ , Plaintext "been"
, Whitespace
- , Plaintext "exactly"
+ , Plaintext "produced"
, Whitespace
- , Plaintext "like"
+ , Plaintext "by"
, Whitespace
- , Link ":Ack"
+ , Plaintext "a"
, Whitespace
- , Plaintext "and"
+ , Plaintext "long-running"
, Whitespace
- , Plaintext "will"
+ , Plaintext "asynchronous"
, Whitespace
, Plaintext "search"
, Whitespace
- , Plaintext "all"
+ , Plaintext "in"
, Whitespace
- , Plaintext "files"
+ , Plaintext "progress"
, Whitespace
, Plaintext "in"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "current"
- , Whitespace
- , Plaintext "directory."
+ , Plaintext "background."
]
- , CommandAnnotation "Back!" (Just "{pattern} {options}")
+ , CommandAnnotation "Qargs" Nothing
, Paragraph
- [ Plaintext "Like"
+ [ Plaintext "This"
, Whitespace
- , Link ":Back"
- , Plaintext ","
+ , Plaintext "is"
, Whitespace
- , Plaintext "but"
+ , Plaintext "a"
, Whitespace
- , Plaintext "returns"
+ , Plaintext "utility"
, Whitespace
- , Plaintext "all"
+ , Plaintext "function"
, Whitespace
- , Plaintext "results"
+ , Plaintext "that"
, Whitespace
- , Plaintext "irrespective"
+ , Plaintext "is"
, Whitespace
- , Plaintext "of"
+ , Plaintext "used"
, Whitespace
- , Plaintext "the"
+ , Plaintext "internally"
, Whitespace
- , Plaintext "value"
+ , Plaintext "when"
, Whitespace
- , Plaintext "of"
+ , Plaintext "running"
, Whitespace
- , Link "g:FerretMaxResults"
- , Plaintext "."
- ]
- , CommandAnnotation "Black" (Just "{pattern} {options}")
- , Paragraph
- [ Plaintext "Like"
+ , Plaintext "on"
, Whitespace
- , Link ":Lack"
- , Plaintext ","
+ , Plaintext "older"
, Whitespace
- , Plaintext "but"
+ , Plaintext "versions"
, Whitespace
- , Plaintext "searches"
+ , Plaintext "of"
, Whitespace
- , Plaintext "only"
+ , Plaintext "Vim"
, Whitespace
- , Plaintext "listed"
+ , Plaintext "(prior"
, Whitespace
- , Plaintext "buffers."
+ , Plaintext "to"
, Whitespace
- , Plaintext "As"
+ , Plaintext "version"
, Whitespace
- , Plaintext "with"
+ , Plaintext "8)"
, Whitespace
- , Link ":Back"
- , Plaintext ","
+ , Plaintext "but"
, Whitespace
- , Plaintext "the"
+ , Plaintext "is"
, Whitespace
- , Plaintext "search"
+ , Plaintext "also"
, Whitespace
- , Plaintext "is"
+ , Plaintext "generally"
, Whitespace
- , Plaintext "still"
+ , Plaintext "useful"
, Whitespace
- , Plaintext "delegated"
+ , Plaintext "enough"
, Whitespace
, Plaintext "to"
, Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "underlying"
+ , Plaintext "warrant"
, Whitespace
- , Link "'grepprg'"
+ , Plaintext "being"
, Whitespace
- , Plaintext "("
- , Code "rg"
- , Plaintext ","
+ , Plaintext "exposed"
, Whitespace
- , Code "ag"
- , Plaintext ","
+ , Plaintext "publicly."
+ ]
+ , Paragraph
+ [ Plaintext "It"
, Whitespace
- , Code "ack"
+ , Plaintext "takes"
, Whitespace
- , Plaintext "or"
+ , Plaintext "the"
, Whitespace
- , Code "ack-grep"
- , Plaintext "),"
+ , Plaintext "files"
, Whitespace
- , Plaintext "which"
+ , Plaintext "currently"
, Whitespace
- , Plaintext "means"
+ , Plaintext "in"
, Whitespace
- , Plaintext "that"
+ , Plaintext "the"
, Whitespace
- , Plaintext "only"
+ , Link "quickfix"
, Whitespace
- , Plaintext "buffers"
+ , Plaintext "listing"
, Whitespace
- , Plaintext "written"
+ , Plaintext "and"
, Whitespace
- , Plaintext "to"
+ , Plaintext "sets"
, Whitespace
- , Plaintext "disk"
+ , Plaintext "them"
, Whitespace
- , Plaintext "will"
+ , Plaintext "as"
, Whitespace
- , Plaintext "be"
+ , Link ":args"
, Whitespace
- , Plaintext "searched."
+ , Plaintext "so"
, Whitespace
- , Plaintext "Likewise,"
+ , Plaintext "that"
, Whitespace
- , Plaintext "If"
+ , Plaintext "they"
, Whitespace
- , Plaintext "no"
+ , Plaintext "can"
, Whitespace
- , Plaintext "buffers"
+ , Plaintext "be"
, Whitespace
- , Plaintext "are"
+ , Plaintext "operated"
, Whitespace
- , Plaintext "written"
+ , Plaintext "on"
, Whitespace
- , Plaintext "to"
+ , Plaintext "en"
, Whitespace
- , Plaintext "disk,"
+ , Plaintext "masse"
, Whitespace
- , Plaintext "then"
+ , Plaintext "via"
, Whitespace
- , Link ":Black"
+ , Plaintext "the"
, Whitespace
- , Plaintext "behaves"
+ , Link ":argdo"
, Whitespace
- , Plaintext "exactly"
+ , Plaintext "command."
+ ]
+ , CommandAnnotation "Largs" Nothing
+ , Paragraph
+ [ Plaintext "Just"
, Whitespace
, Plaintext "like"
, Whitespace
- , Link ":Lack"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Plaintext "will"
- , Whitespace
- , Plaintext "search"
+ , Link ":Qargs"
+ , Plaintext ","
, Whitespace
- , Plaintext "all"
+ , Plaintext "but"
, Whitespace
- , Plaintext "files"
+ , Plaintext "applies"
, Whitespace
- , Plaintext "in"
+ , Plaintext "to"
, Whitespace
, Plaintext "the"
, Whitespace
, Plaintext "current"
, Whitespace
- , Plaintext "directory."
+ , Link "location-list"
+ , Plaintext "."
]
- , CommandAnnotation "Black!" (Just "{pattern} {options}")
, Paragraph
- [ Plaintext "Like"
- , Whitespace
- , Link ":Black"
- , Plaintext ","
- , Whitespace
- , Plaintext "but"
- , Whitespace
- , Plaintext "returns"
+ [ Plaintext "It"
, Whitespace
- , Plaintext "all"
+ , Plaintext "takes"
, Whitespace
- , Plaintext "results"
+ , Plaintext "the"
, Whitespace
- , Plaintext "irrespective"
+ , Plaintext "files"
, Whitespace
- , Plaintext "of"
+ , Plaintext "in"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "value"
+ , Plaintext "current"
, Whitespace
- , Plaintext "of"
+ , Link "location-list"
, Whitespace
- , Link "g:FerretMaxResults"
- , Plaintext "."
- ]
- , CommandAnnotation "Acks" (Just "/{pattern}/{replacement}/")
- , Paragraph
- [ Plaintext "Takes"
+ , Plaintext "and"
, Whitespace
- , Plaintext "all"
+ , Plaintext "sets"
, Whitespace
- , Plaintext "of"
+ , Plaintext "them"
, Whitespace
- , Plaintext "the"
+ , Plaintext "as"
, Whitespace
- , Plaintext "files"
+ , Link ":args"
, Whitespace
- , Plaintext "currently"
+ , Plaintext "so"
, Whitespace
- , Plaintext "in"
+ , Plaintext "that"
, Whitespace
- , Plaintext "the"
+ , Plaintext "they"
, Whitespace
- , Link "quickfix"
+ , Plaintext "can"
, Whitespace
- , Plaintext "listing"
+ , Plaintext "be"
, Whitespace
- , Plaintext "and"
+ , Plaintext "operated"
, Whitespace
- , Plaintext "performs"
+ , Plaintext "on"
, Whitespace
- , Plaintext "a"
+ , Plaintext "en"
, Whitespace
- , Plaintext "substitution"
+ , Plaintext "masse"
, Whitespace
- , Plaintext "of"
+ , Plaintext "via"
, Whitespace
- , Plaintext "all"
+ , Plaintext "the"
, Whitespace
- , Plaintext "instances"
+ , Link ":argdo"
, Whitespace
- , Plaintext "of"
+ , Plaintext "command."
+ ]
+ , MappingsAnnotation
+ , SubheadingAnnotation
+ "Circumstances where mappings do not get set up"
+ , Paragraph
+ [ Plaintext "Note"
, Whitespace
- , Plaintext "{pattern}"
+ , Plaintext "that"
, Whitespace
- , Plaintext "(a"
+ , Plaintext "Ferret"
, Whitespace
- , Plaintext "standard"
+ , Plaintext "will"
, Whitespace
- , Plaintext "Vim"
+ , Plaintext "not"
, Whitespace
- , Plaintext "search"
+ , Plaintext "try"
, Whitespace
- , Link "pattern"
- , Plaintext ")"
+ , Plaintext "to"
, Whitespace
- , Plaintext "by"
+ , Plaintext "set"
, Whitespace
- , Plaintext "{replacement}."
- ]
- , Paragraph
- [ Plaintext "A"
+ , Plaintext "up"
, Whitespace
- , Plaintext "typical"
+ , Plaintext "the"
, Whitespace
- , Plaintext "sequence"
+ , Plaintext "<leader>"
, Whitespace
- , Plaintext "consists"
+ , Plaintext "mappings"
, Whitespace
- , Plaintext "of"
+ , Plaintext "if"
, Whitespace
- , Plaintext "an"
+ , Plaintext "any"
, Whitespace
- , Link ":Ack"
+ , Plaintext "of"
, Whitespace
- , Plaintext "invocation"
+ , Plaintext "the"
, Whitespace
- , Plaintext "to"
+ , Plaintext "following"
, Whitespace
- , Plaintext "populate"
+ , Plaintext "are"
, Whitespace
- , Plaintext "the"
+ , Plaintext "true:"
+ ]
+ , List
+ [ ListItem
+ [ Plaintext "A"
+ , Whitespace
+ , Plaintext "mapping"
+ , Whitespace
+ , Plaintext "with"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "same"
+ , Whitespace
+ , Link "{lhs}"
+ , 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 "0"
+ , Whitespace
+ , Plaintext "in"
+ , Whitespace
+ , Plaintext "your"
+ , Whitespace
+ , Link ".vimrc"
+ , Plaintext "."
+ ]
+ ]
+ , SubheadingAnnotation "Mappings specific to the quickfix window"
+ , Paragraph
+ [ Plaintext "Additionally,"
, Whitespace
- , Link "quickfix"
+ , Plaintext "Ferret"
, Whitespace
- , Plaintext "listing"
+ , Plaintext "will"
, Whitespace
- , Plaintext "and"
+ , Plaintext "set"
, Whitespace
- , Plaintext "then"
+ , Plaintext "up"
, Whitespace
- , Link ":Acks"
+ , Plaintext "special"
, Whitespace
- , Plaintext "(mnemonic:"
+ , Plaintext "mappings"
, Whitespace
- , Plaintext "\"Ack"
+ , Plaintext "in"
, Whitespace
- , Plaintext "substitute\")"
+ , Link "quickfix"
, Whitespace
- , Plaintext "to"
+ , Plaintext "listings,"
, Whitespace
- , Plaintext "perform"
+ , Plaintext "unless"
, Whitespace
- , Plaintext "replacements."
+ , Plaintext "prevented"
, Whitespace
- , Plaintext "For"
+ , Plaintext "from"
, Whitespace
- , Plaintext "example,"
+ , Plaintext "doing"
, Whitespace
- , Plaintext "to"
+ , Plaintext "so"
, Whitespace
- , Plaintext "replace"
+ , Plaintext "by"
, Whitespace
- , Plaintext "\"foo\""
+ , 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}"
+ ]
+ ]
+ , MappingAnnotation "<Plug>(FerretAck)"
+ , Paragraph
+ [ Plaintext "Ferret"
, Whitespace
- , Plaintext "with"
+ , Plaintext "maps"
, Whitespace
- , Plaintext "\"bar\""
+ , Plaintext "<leader>a"
, Whitespace
- , Plaintext "across"
+ , Plaintext "to"
, Whitespace
- , Plaintext "all"
+ , Link "<Plug>(FerretAck)"
+ , Plaintext ","
, Whitespace
- , Plaintext "files"
+ , Plaintext "which"
, Whitespace
- , Plaintext "in"
+ , Plaintext "triggers"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "current"
+ , Link ":Ack"
, Whitespace
- , Plaintext "directory:"
- ]
- , Fenced [ ":Ack foo" , ":Acks /foo/bar/" ]
- , Paragraph
- [ Plaintext "The"
+ , Plaintext "command."
, Whitespace
- , Plaintext "pattern"
+ , Plaintext "To"
, Whitespace
- , Plaintext "and"
+ , Plaintext "use"
, Whitespace
- , Plaintext "replacement"
+ , Plaintext "an"
, Whitespace
- , Plaintext "are"
+ , Plaintext "alternative"
, Whitespace
- , Plaintext "passed"
+ , Plaintext "mapping"
, Whitespace
- , Plaintext "through"
+ , Plaintext "instead,"
, Whitespace
- , Plaintext "literally"
+ , Plaintext "create"
, Whitespace
- , Plaintext "to"
+ , Plaintext "a"
, Whitespace
- , Plaintext "Vim's"
+ , Plaintext "different"
, Whitespace
- , Link ":substitute"
+ , Plaintext "one"
, Whitespace
- , Plaintext "command,"
+ , Plaintext "in"
, Whitespace
- , Plaintext "preserving"
+ , Plaintext "your"
, Whitespace
- , Plaintext "all"
+ , Link ".vimrc"
, Whitespace
- , Plaintext "characters"
+ , Plaintext "instead"
, Whitespace
- , Plaintext "and"
+ , Plaintext "using"
, Whitespace
- , Plaintext "escapes,"
+ , Link ":nmap"
+ , Plaintext ":"
+ ]
+ , Fenced
+ [ "\" Instead of <leader>a, use <leader>x."
+ , "nmap <leader>x <Plug>(FerretAck)"
+ ]
+ , MappingAnnotation "<Plug>(FerretLack)"
+ , Paragraph
+ [ Plaintext "Ferret"
, Whitespace
- , Plaintext "including"
+ , Plaintext "maps"
, Whitespace
- , Plaintext "references"
+ , Plaintext "<leader>l"
, Whitespace
, Plaintext "to"
, Whitespace
- , Plaintext "matches"
+ , Link "<Plug>(FerretLack)"
+ , Plaintext ","
, Whitespace
- , Plaintext "in"
+ , Plaintext "which"
+ , Whitespace
+ , Plaintext "triggers"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "pattern."
+ , Link ":Lack"
, Whitespace
- , Plaintext "For"
+ , Plaintext "command."
, Whitespace
- , Plaintext "example,"
+ , Plaintext "To"
, Whitespace
- , Plaintext "the"
+ , Plaintext "use"
, Whitespace
- , Plaintext "following"
+ , Plaintext "an"
, Whitespace
- , Plaintext "could"
+ , Plaintext "alternative"
, Whitespace
- , Plaintext "be"
+ , Plaintext "mapping"
, Whitespace
- , Plaintext "used"
+ , Plaintext "instead,"
, Whitespace
- , Plaintext "to"
+ , Plaintext "create"
, Whitespace
- , Plaintext "swap"
+ , Plaintext "a"
, Whitespace
- , Plaintext "the"
+ , Plaintext "different"
, Whitespace
- , Plaintext "order"
+ , Plaintext "one"
, Whitespace
- , Plaintext "of"
+ , Plaintext "in"
, Whitespace
- , Plaintext "\"foo123\""
+ , Plaintext "your"
, Whitespace
- , Plaintext "and"
+ , Link ".vimrc"
, Whitespace
- , Plaintext "\"bar\":"
+ , Plaintext "instead"
+ , Whitespace
+ , Plaintext "using"
+ , Whitespace
+ , Link ":nmap"
+ , Plaintext ":"
]
- , Fenced [ ":Acks /\\v(foo\\d+)(bar)/\\2\\1/" ]
- , CommandAnnotation "FerretCancelAsync" Nothing
+ , Fenced
+ [ "\" Instead of <leader>l, use <leader>y."
+ , "nmap <leader>y <Plug>(FerretLack)"
+ ]
+ , MappingAnnotation "<Plug>(FerretAckWord)"
, Paragraph
- [ Plaintext "Cancels"
+ [ Plaintext "Ferret"
, Whitespace
- , Plaintext "any"
+ , Plaintext "maps"
, Whitespace
- , Plaintext "asynchronous"
+ , Plaintext "<leader>s"
, Whitespace
- , Plaintext "search"
+ , Plaintext "(mnemonix:"
, Whitespace
- , Plaintext "that"
+ , Plaintext "\"selection)"
, Whitespace
- , Plaintext "may"
+ , Plaintext "to"
, Whitespace
- , Plaintext "be"
+ , Link "<Plug>(FerretAckWord)"
+ , Plaintext ","
, Whitespace
- , Plaintext "in"
+ , Plaintext "which"
, Whitespace
- , Plaintext "progress"
+ , Plaintext "uses"
, Whitespace
- , Plaintext "in"
+ , Link ":Ack"
, Whitespace
- , Plaintext "the"
+ , Plaintext "to"
, Whitespace
- , Plaintext "background."
- ]
- , CommandAnnotation "FerretPullAsync" Nothing
- , Paragraph
- [ Plaintext "Eagerly"
+ , Plaintext "search"
, Whitespace
- , Plaintext "populates"
+ , Plaintext "for"
, Whitespace
, Plaintext "the"
, Whitespace
- , Link "quickfix"
- , Whitespace
- , Plaintext "(or"
+ , Plaintext "word"
, Whitespace
- , Link "location-list"
- , Plaintext ")"
+ , Plaintext "currently"
, Whitespace
- , Plaintext "window"
+ , Plaintext "under"
, Whitespace
- , Plaintext "with"
+ , Plaintext "the"
, Whitespace
- , Plaintext "any"
+ , Plaintext "cursor."
, Whitespace
- , Plaintext "results"
+ , Plaintext "To"
, Whitespace
- , Plaintext "that"
+ , Plaintext "use"
, Whitespace
- , Plaintext "may"
+ , Plaintext "an"
, Whitespace
- , Plaintext "have"
+ , Plaintext "alternative"
, Whitespace
- , Plaintext "been"
+ , Plaintext "mapping"
, Whitespace
- , Plaintext "produced"
+ , Plaintext "instead,"
, Whitespace
- , Plaintext "by"
+ , Plaintext "create"
, Whitespace
, Plaintext "a"
, Whitespace
- , Plaintext "long-running"
- , Whitespace
- , Plaintext "asynchronoous"
+ , Plaintext "different"
, Whitespace
- , Plaintext "search"
+ , Plaintext "one"
, Whitespace
, Plaintext "in"
, Whitespace
- , Plaintext "progress"
+ , Plaintext "your"
, Whitespace
- , Plaintext "in"
+ , Link ".vimrc"
, Whitespace
- , Plaintext "the"
+ , Plaintext "instead"
, Whitespace
- , Plaintext "background."
+ , Plaintext "using"
+ , Whitespace
+ , Link ":nmap"
+ , Plaintext ":"
]
- , CommandAnnotation "Qargs" Nothing
+ , Fenced
+ [ "\" Instead of <leader>s, use <leader>z."
+ , "nmap <leader>z <Plug>(FerretAckWord)"
+ ]
+ , MappingAnnotation "<Plug>(FerretAcks)"
, Paragraph
- [ Plaintext "This"
+ [ Plaintext "Ferret"
, Whitespace
- , Plaintext "is"
+ , Plaintext "maps"
, Whitespace
- , Plaintext "a"
+ , Plaintext "<leader>r"
, Whitespace
- , Plaintext "utility"
+ , Plaintext "(mnemonic:"
, Whitespace
- , Plaintext "function"
+ , Plaintext "\"replace\")"
, Whitespace
- , Plaintext "that"
+ , Plaintext "to"
, Whitespace
- , Plaintext "is"
+ , Link "<Plug>(FerretAcks)"
+ , Plaintext ","
, Whitespace
- , Plaintext "used"
+ , Plaintext "which"
, Whitespace
- , Plaintext "internally"
+ , Plaintext "triggers"
, Whitespace
- , Plaintext "when"
+ , Plaintext "the"
, Whitespace
- , Plaintext "running"
+ , Link ":Acks"
, Whitespace
- , Plaintext "on"
+ , Plaintext "command"
, Whitespace
- , Plaintext "older"
+ , Plaintext "and"
, Whitespace
- , Plaintext "versions"
+ , Plaintext "fills"
, Whitespace
- , Plaintext "of"
+ , Plaintext "the"
, Whitespace
- , Plaintext "Vim"
+ , Plaintext "prompt"
, Whitespace
- , Plaintext "(prior"
+ , Plaintext "with"
, Whitespace
- , Plaintext "to"
+ , Plaintext "the"
, Whitespace
- , Plaintext "version"
+ , Plaintext "last"
, Whitespace
- , Plaintext "8)"
+ , Plaintext "search"
, Whitespace
- , Plaintext "but"
+ , Plaintext "term"
, Whitespace
- , Plaintext "is"
+ , Plaintext "from"
, Whitespace
- , Plaintext "also"
+ , Plaintext "Ferret."
, Whitespace
- , Plaintext "generally"
+ , Plaintext "to"
, Whitespace
- , Plaintext "useful"
+ , Plaintext "use"
, Whitespace
- , Plaintext "enough"
+ , Plaintext "an"
, Whitespace
- , Plaintext "to"
+ , Plaintext "alternative"
, Whitespace
- , Plaintext "warrant"
+ , Plaintext "mapping"
, Whitespace
- , Plaintext "being"
+ , Plaintext "instead,"
, Whitespace
- , Plaintext "exposed"
+ , Plaintext "create"
, Whitespace
- , Plaintext "publicly."
- ]
- , Paragraph
- [ Plaintext "It"
+ , Plaintext "a"
, Whitespace
- , Plaintext "takes"
+ , Plaintext "different"
, Whitespace
- , Plaintext "the"
+ , Plaintext "one"
, Whitespace
- , Plaintext "files"
+ , 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)"
+ ]
+ , OptionsAnnotation
+ , OptionAnnotation "g:FerretNvim" "boolean" (Just "1")
+ , Paragraph
+ [ Plaintext "Controls"
, Whitespace
- , Plaintext "currently"
+ , Plaintext "whether"
, Whitespace
- , Plaintext "in"
+ , Plaintext "to"
, Whitespace
- , Plaintext "the"
+ , Plaintext "use"
, Whitespace
- , Link "quickfix"
+ , Plaintext "Neovim's"
, Whitespace
- , Plaintext "listing"
+ , Link "job-control"
, Whitespace
- , Plaintext "and"
+ , Plaintext "features,"
, Whitespace
- , Plaintext "sets"
+ , Plaintext "when"
, Whitespace
- , Plaintext "them"
+ , Plaintext "available,"
, Whitespace
- , Plaintext "as"
+ , Plaintext "to"
, Whitespace
- , Link ":args"
+ , Plaintext "run"
, Whitespace
- , Plaintext "so"
+ , Plaintext "searches"
, Whitespace
- , Plaintext "that"
+ , Plaintext "asynchronously."
, Whitespace
- , Plaintext "they"
+ , Plaintext "To"
, Whitespace
- , Plaintext "can"
+ , Plaintext "prevent"
, Whitespace
- , Plaintext "be"
+ , Plaintext "this"
, Whitespace
- , Plaintext "operated"
+ , Plaintext "from"
, Whitespace
- , Plaintext "on"
+ , Plaintext "being"
, Whitespace
- , Plaintext "en"
+ , Plaintext "used,"
, Whitespace
- , Plaintext "masse"
+ , Plaintext "set"
, Whitespace
- , Plaintext "via"
+ , Plaintext "to"
, Whitespace
- , Plaintext "the"
+ , Plaintext "0,"
, Whitespace
- , Link ":argdo"
+ , Plaintext "in"
, Whitespace
- , Plaintext "command."
- ]
- , MappingsAnnotation
- , SubheadingAnnotation
- "Circumstances where mappings do not get set up"
- , Paragraph
- [ Plaintext "Note"
+ , Plaintext "which"
, Whitespace
- , Plaintext "that"
+ , Plaintext "case"
, Whitespace
, Plaintext "Ferret"
, Whitespace
, Plaintext "will"
, Whitespace
- , Plaintext "not"
+ , Plaintext "fall"
, Whitespace
- , Plaintext "try"
+ , Plaintext "back"
, Whitespace
, Plaintext "to"
, Whitespace
- , Plaintext "set"
+ , Plaintext "the"
, Whitespace
- , Plaintext "up"
+ , Plaintext "next"
, Whitespace
- , Plaintext "the"
+ , Plaintext "method"
, Whitespace
- , Plaintext "<leader>"
+ , Plaintext "in"
, Whitespace
- , Plaintext "mappings"
+ , Plaintext "the"
, Whitespace
- , Plaintext "if"
+ , Plaintext "list"
, Whitespace
- , Plaintext "any"
+ , Plaintext "(Vim's"
, Whitespace
- , Plaintext "of"
+ , Plaintext "built-in"
, Whitespace
- , Plaintext "the"
+ , Plaintext "async"
, Whitespace
- , Plaintext "following"
+ , Plaintext "primitives"
, Whitespace
- , Plaintext "are"
+ , Plaintext "--"
, Whitespace
- , Plaintext "true:"
- ]
- , List
- [ ListItem
- [ Plaintext "A"
- , Whitespace
- , Plaintext "mapping"
- , Whitespace
- , Plaintext "with"
- , Whitespace
- , Plaintext "the"
- , Whitespace
- , Plaintext "same"
- , Whitespace
- , Link "{lhs}"
- , 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 "0"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "your"
- , Whitespace
- , Link ".vimrc"
- , Plaintext "."
- ]
- ]
- , SubheadingAnnotation "Mappings specific to the quickfix window"
- , Paragraph
- [ Plaintext "Additionally,"
+ , Plaintext "see"
, Whitespace
- , Plaintext "Ferret"
+ , Link "g:FerretJob"
, Whitespace
- , Plaintext "will"
+ , Plaintext "--"
, Whitespace
- , Plaintext "set"
+ , Plaintext "which"
, Whitespace
- , Plaintext "up"
+ , Plaintext "are"
, Whitespace
- , Plaintext "special"
+ , Plaintext "typically"
, Whitespace
- , Plaintext "mappings"
+ , Plaintext "not"
+ , Whitespace
+ , Plaintext "available"
, Whitespace
, Plaintext "in"
, Whitespace
- , Link "quickfix"
+ , Plaintext "Neovim,"
, Whitespace
- , Plaintext "listings,"
+ , Plaintext "so"
, Whitespace
- , Plaintext "unless"
+ , Plaintext "will"
, Whitespace
- , Plaintext "prevented"
+ , Plaintext "then"
, Whitespace
- , Plaintext "from"
+ , Plaintext "fall"
, Whitespace
- , Plaintext "doing"
+ , Plaintext "back"
, Whitespace
- , Plaintext "so"
+ , Plaintext "to"
, Whitespace
- , Plaintext "by"
+ , Plaintext "the"
, 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}"
- ]
+ , Plaintext "next"
+ , Whitespace
+ , Plaintext "available"
+ , Whitespace
+ , Plaintext "method)."
]
- , MappingAnnotation "<Plug>(FerretAck)"
+ , Fenced [ "let g:FerretNvim=0" ]
+ , OptionAnnotation "g:FerretJob" "boolean" (Just "1")
, Paragraph
- [ Plaintext "Ferret"
- , Whitespace
- , Plaintext "maps"
+ [ Plaintext "Controls"
, Whitespace
- , Plaintext "<leader>a"
+ , Plaintext "whether"
, Whitespace
, Plaintext "to"
, Whitespace
- , Link "<Plug>(FerretAck)"
- , Plaintext ","
+ , Plaintext "use"
, Whitespace
- , Plaintext "which"
+ , Plaintext "Vim's"
, Whitespace
- , Plaintext "triggers"
+ , Link "+job"
, Whitespace
- , Plaintext "the"
+ , Plaintext "feature,"
, Whitespace
- , Link ":Ack"
+ , Plaintext "when"
, Whitespace
- , Plaintext "command."
+ , Plaintext "available,"
, Whitespace
- , Plaintext "To"
+ , Plaintext "to"
, Whitespace
- , Plaintext "use"
+ , Plaintext "run"
, Whitespace
- , Plaintext "an"
+ , Plaintext "searches"
, Whitespace
- , Plaintext "alternative"
+ , Plaintext "asynchronously."
, Whitespace
- , Plaintext "mapping"
+ , Plaintext "To"
, Whitespace
- , Plaintext "instead,"
+ , Plaintext "prevent"
, Whitespace
- , Plaintext "create"
+ , Link "+job"
, Whitespace
- , Plaintext "a"
+ , Plaintext "from"
, Whitespace
- , Plaintext "different"
+ , Plaintext "being"
, Whitespace
- , Plaintext "one"
+ , Plaintext "used,"
+ , Whitespace
+ , Plaintext "set"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "0,"
, Whitespace
, Plaintext "in"
, Whitespace
- , Plaintext "your"
+ , Plaintext "which"
, Whitespace
- , Link ".vimrc"
+ , Plaintext "case"
, Whitespace
- , Plaintext "instead"
+ , Plaintext "Ferret"
, Whitespace
- , Plaintext "using"
+ , Plaintext "will"
, Whitespace
- , Link ":nmap"
- , Plaintext ":"
- ]
- , Fenced
- [ "\" Instead of <leader>a, use <leader>x."
- , "nmap <leader>x <Plug>(FerretAck)"
+ , Plaintext "fall"
+ , Whitespace
+ , Plaintext "back"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "next"
+ , Whitespace
+ , Plaintext "available"
+ , Whitespace
+ , Plaintext "method."
]
- , MappingAnnotation "<Plug>(FerretLack)"
+ , Fenced [ "let g:FerretJob=0" ]
+ , OptionAnnotation "g:FerretHlsearch" "boolean" Nothing
, Paragraph
- [ Plaintext "Ferret"
+ [ Plaintext "Controls"
, Whitespace
- , Plaintext "maps"
+ , Plaintext "whether"
, Whitespace
- , Plaintext "<leader>l"
+ , Plaintext "Ferret"
, Whitespace
- , Plaintext "to"
+ , Plaintext "should"
, Whitespace
- , Link "<Plug>(FerretLack)"
- , Plaintext ","
+ , Plaintext "attempt"
, Whitespace
- , Plaintext "which"
+ , Plaintext "to"
, Whitespace
- , Plaintext "triggers"
+ , Plaintext "highlight"
, Whitespace
, Plaintext "the"
, Whitespace
+ , Plaintext "search"
+ , Whitespace
+ , Plaintext "pattern"
+ , Whitespace
+ , Plaintext "when"
+ , Whitespace
+ , Plaintext "running"
+ , Whitespace
+ , Link ":Ack"
+ , Whitespace
+ , Plaintext "or"
+ , Whitespace
, Link ":Lack"
+ , Plaintext "."
, Whitespace
- , Plaintext "command."
+ , Plaintext "If"
+ , Whitespace
+ , Plaintext "left"
+ , Whitespace
+ , Plaintext "unset,"
+ , Whitespace
+ , Plaintext "Ferret"
+ , Whitespace
+ , Plaintext "will"
+ , Whitespace
+ , Plaintext "respect"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "current"
+ , Whitespace
+ , Plaintext "'hlsearch'"
+ , Whitespace
+ , Plaintext "setting."
, Whitespace
, Plaintext "To"
, Whitespace
- , Plaintext "use"
+ , Plaintext "force"
, Whitespace
- , Plaintext "an"
+ , Plaintext "highlighting"
, Whitespace
- , Plaintext "alternative"
+ , Plaintext "on"
, Whitespace
- , Plaintext "mapping"
+ , Plaintext "or"
, Whitespace
- , Plaintext "instead,"
+ , Plaintext "off"
, Whitespace
- , Plaintext "create"
+ , Plaintext "irrespective"
, Whitespace
- , Plaintext "a"
+ , Plaintext "of"
, Whitespace
- , Plaintext "different"
+ , Plaintext "'hlsearch',"
, Whitespace
- , Plaintext "one"
+ , Plaintext "set"
, Whitespace
- , Plaintext "in"
+ , Link "g:FerretHlsearch"
, Whitespace
- , Plaintext "your"
+ , Plaintext "to"
, Whitespace
- , Link ".vimrc"
+ , Plaintext "1"
, Whitespace
- , Plaintext "instead"
+ , Plaintext "(on)"
, Whitespace
- , Plaintext "using"
+ , Plaintext "or"
, Whitespace
- , Link ":nmap"
- , Plaintext ":"
- ]
- , Fenced
- [ "\" Instead of <leader>l, use <leader>y."
- , "nmap <leader>y <Plug>(FerretLack)"
+ , Plaintext "0"
+ , Whitespace
+ , Plaintext "(off):"
]
- , MappingAnnotation "<Plug>(FerretAckWord)"
+ , Fenced [ "let g:FerretHlsearch=0" ]
+ , OptionAnnotation "g:FerretAcksCommand" "string" (Just "\"cdo\"")
, Paragraph
- [ Plaintext "Ferret"
+ [ Plaintext "Controls"
, Whitespace
- , Plaintext "maps"
+ , Plaintext "the"
, Whitespace
- , Plaintext "<leader>s"
+ , Plaintext "underlying"
, Whitespace
- , Plaintext "(mnemonix:"
+ , Plaintext "Vim"
, Whitespace
- , Plaintext "\"selection)"
+ , Plaintext "command"
+ , Whitespace
+ , Plaintext "that"
+ , Whitespace
+ , Link ":Acks"
+ , Whitespace
+ , Plaintext "uses"
, Whitespace
, Plaintext "to"
, Whitespace
- , Link "<Plug>(FerretAckWord)"
- , Plaintext ","
+ , Plaintext "peform"
, Whitespace
- , Plaintext "which"
+ , Plaintext "substitutions."
, Whitespace
- , Plaintext "uses"
+ , Plaintext "On"
, Whitespace
- , Link ":Ack"
+ , Plaintext "versions"
, Whitespace
- , Plaintext "to"
+ , Plaintext "of"
, Whitespace
- , Plaintext "search"
+ , Plaintext "Vim"
, Whitespace
- , Plaintext "for"
+ , Plaintext "that"
, Whitespace
- , Plaintext "the"
+ , Plaintext "have"
, Whitespace
- , Plaintext "word"
+ , Plaintext "it,"
, Whitespace
- , Plaintext "currently"
+ , Plaintext "defaults"
, Whitespace
- , Plaintext "under"
+ , Plaintext "to"
, Whitespace
- , Plaintext "the"
+ , Link ":cdo"
+ , Plaintext ","
, Whitespace
- , Plaintext "cursor."
+ , Plaintext "which"
, Whitespace
- , Plaintext "To"
+ , Plaintext "means"
, Whitespace
- , Plaintext "use"
+ , Plaintext "that"
, Whitespace
- , Plaintext "an"
+ , Plaintext "substitutions"
, Whitespace
- , Plaintext "alternative"
+ , Plaintext "will"
, Whitespace
- , Plaintext "mapping"
+ , Plaintext "apply"
, Whitespace
- , Plaintext "instead,"
+ , Plaintext "to"
, Whitespace
- , Plaintext "create"
+ , Plaintext "the"
, Whitespace
- , Plaintext "a"
+ , Plaintext "specific"
, Whitespace
- , Plaintext "different"
+ , Plaintext "lines"
, Whitespace
- , Plaintext "one"
+ , Plaintext "currently"
, Whitespace
, Plaintext "in"
, Whitespace
- , Plaintext "your"
+ , Plaintext "the"
, Whitespace
- , Link ".vimrc"
+ , Link "quickfix"
+ , Whitespace
+ , Plaintext "listing."
+ , Whitespace
+ , Plaintext "Can"
+ , Whitespace
+ , Plaintext "be"
+ , Whitespace
+ , Plaintext "set"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "\"cfdo\""
+ , Whitespace
+ , Plaintext "to"
, Whitespace
, Plaintext "instead"
, Whitespace
- , Plaintext "using"
+ , Plaintext "use"
, Whitespace
- , Link ":nmap"
- , Plaintext ":"
- ]
- , Fenced
- [ "\" Instead of <leader>s, use <leader>z."
- , "nmap <leader>z <Plug>(FerretAckWord)"
- ]
- , MappingAnnotation "<Plug>(FerretAcks)"
- , Paragraph
- [ Plaintext "Ferret"
+ , Link ":cfdo"
, Whitespace
- , Plaintext "maps"
+ , Plaintext "(if"
, Whitespace
- , Plaintext "<leader>r"
+ , Plaintext "available),"
, Whitespace
- , Plaintext "(mnemonic:"
+ , Plaintext "which"
, Whitespace
- , Plaintext "\"replace\")"
+ , Plaintext "means"
, Whitespace
- , Plaintext "to"
+ , Plaintext "that"
, Whitespace
- , Link "<Plug>(FerretAcks)"
- , Plaintext ","
+ , Plaintext "the"
, Whitespace
- , Plaintext "which"
+ , Plaintext "substitutions"
, Whitespace
- , Plaintext "triggers"
+ , Plaintext "will"
, Whitespace
- , Plaintext "the"
+ , Plaintext "be"
, Whitespace
- , Link ":Acks"
+ , Plaintext "applied"
, Whitespace
- , Plaintext "command"
+ , Plaintext "on"
, Whitespace
- , Plaintext "and"
+ , Plaintext "a"
, Whitespace
- , Plaintext "fills"
+ , Plaintext "per-file"
, Whitespace
- , Plaintext "the"
+ , Plaintext "basis"
, Whitespace
- , Plaintext "prompt"
+ , Plaintext "to"
, Whitespace
- , Plaintext "with"
+ , Plaintext "all"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "last"
+ , Plaintext "files"
, Whitespace
- , Plaintext "search"
+ , Plaintext "in"
, Whitespace
- , Plaintext "term"
+ , Plaintext "the"
, Whitespace
- , Plaintext "from"
+ , Link "quickfix"
, Whitespace
- , Plaintext "Ferret."
+ , Plaintext "listing."
, Whitespace
- , Plaintext "to"
+ , Plaintext "This"
, Whitespace
- , Plaintext "use"
+ , Plaintext "distinction"
, Whitespace
- , Plaintext "an"
+ , Plaintext "is"
, Whitespace
- , Plaintext "alternative"
+ , Plaintext "important"
, Whitespace
- , Plaintext "mapping"
+ , Plaintext "if"
, Whitespace
- , Plaintext "instead,"
+ , Plaintext "you"
, Whitespace
- , Plaintext "create"
+ , Plaintext "have"
, Whitespace
- , Plaintext "a"
+ , Plaintext "used"
, Whitespace
- , Plaintext "different"
+ , Plaintext "Ferret's"
, Whitespace
- , Plaintext "one"
+ , Plaintext "bindings"
, Whitespace
- , Plaintext "in"
+ , Plaintext "to"
, Whitespace
- , Plaintext "your"
+ , Plaintext "delete"
, Whitespace
- , Link ".vimrc"
+ , Plaintext "entries"
, Whitespace
- , Plaintext "instead"
+ , Plaintext "from"
, Whitespace
- , Plaintext "using"
+ , Plaintext "the"
, Whitespace
- , Link ":nmap"
- , Plaintext ":"
- ]
- , Fenced
- [ "\" Instead of <leader>r, use <leader>u."
- , "nmap <leader>u <Plug>(FerretAcks)"
+ , Plaintext "listing."
]
- , OptionsAnnotation
- , OptionAnnotation "g:FerretNvim" "boolean" (Just "1")
+ , Fenced [ "let g:FerretAcksCommand='cfdo'" ]
+ , OptionAnnotation "g:FerretLacksCommand" "string" (Just "\"ldo\"")
, Paragraph
[ Plaintext "Controls"
, Whitespace
- , Plaintext "whether"
- , Whitespace
- , Plaintext "to"
+ , Plaintext "the"
, Whitespace
- , Plaintext "use"
+ , Plaintext "underlying"
, Whitespace
- , Plaintext "Neovim's"
+ , Plaintext "Vim"
, Whitespace
- , Link "job-control"
+ , Plaintext "command"
, Whitespace
- , Plaintext "features,"
+ , Plaintext "that"
, Whitespace
- , Plaintext "when"
+ , Link ":Lacks"
, Whitespace
- , Plaintext "available,"
+ , Plaintext "uses"
, Whitespace
, Plaintext "to"
, Whitespace
- , Plaintext "run"
+ , Plaintext "peform"
, Whitespace
- , Plaintext "searches"
+ , Plaintext "substitutions."
, Whitespace
- , Plaintext "asynchronously."
+ , Plaintext "On"
, Whitespace
- , Plaintext "To"
+ , Plaintext "versions"
, Whitespace
- , Plaintext "prevent"
+ , Plaintext "of"
, Whitespace
- , Plaintext "this"
+ , Plaintext "Vim"
, Whitespace
- , Plaintext "from"
+ , Plaintext "that"
, Whitespace
- , Plaintext "being"
+ , Plaintext "have"
, Whitespace
- , Plaintext "used,"
+ , Plaintext "it,"
, Whitespace
- , Plaintext "set"
+ , Plaintext "defaults"
, Whitespace
, Plaintext "to"
, Whitespace
- , Plaintext "0,"
- , Whitespace
- , Plaintext "in"
+ , Link ":ldo"
+ , Plaintext ","
, Whitespace
, Plaintext "which"
, Whitespace
- , Plaintext "case"
+ , Plaintext "means"
, Whitespace
- , Plaintext "Ferret"
+ , Plaintext "that"
, Whitespace
- , Plaintext "will"
+ , Plaintext "substitutions"
, Whitespace
- , Plaintext "fall"
+ , Plaintext "will"
, Whitespace
- , Plaintext "back"
+ , Plaintext "apply"
, Whitespace
, Plaintext "to"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "next"
+ , Plaintext "specific"
, Whitespace
- , Plaintext "method"
+ , Plaintext "lines"
+ , Whitespace
+ , Plaintext "currently"
, Whitespace
, Plaintext "in"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "list"
+ , Link "location-list"
+ , Plaintext "."
, Whitespace
- , Plaintext "(Vim's"
+ , Plaintext "Can"
, Whitespace
- , Plaintext "built-in"
+ , Plaintext "be"
, Whitespace
- , Plaintext "async"
+ , Plaintext "set"
, Whitespace
- , Plaintext "primitives"
+ , Plaintext "to"
, Whitespace
- , Plaintext "--"
+ , Plaintext "\"lfdo\""
, Whitespace
- , Plaintext "see"
+ , Plaintext "to"
, Whitespace
- , Link "g:FerretJob"
+ , Plaintext "instead"
, Whitespace
- , Plaintext "--"
+ , Plaintext "use"
, Whitespace
- , Plaintext "which"
+ , Link ":lfdo"
, Whitespace
- , Plaintext "are"
+ , Plaintext "(if"
, Whitespace
- , Plaintext "typically"
+ , Plaintext "available),"
, Whitespace
- , Plaintext "not"
+ , Plaintext "which"
, Whitespace
- , Plaintext "available"
+ , Plaintext "means"
, Whitespace
- , Plaintext "in"
+ , Plaintext "that"
, Whitespace
- , Plaintext "Neovim,"
+ , Plaintext "the"
, Whitespace
- , Plaintext "so"
+ , Plaintext "substitutions"
, Whitespace
, Plaintext "will"
, Whitespace
- , Plaintext "then"
+ , Plaintext "be"
, Whitespace
- , Plaintext "fall"
+ , Plaintext "applied"
, Whitespace
- , Plaintext "back"
+ , Plaintext "on"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Plaintext "per-file"
+ , Whitespace
+ , Plaintext "basis"
, Whitespace
, Plaintext "to"
, Whitespace
+ , Plaintext "all"
+ , Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "next"
+ , Plaintext "files"
, Whitespace
- , Plaintext "available"
+ , Plaintext "in"
, Whitespace
- , Plaintext "method)."
- ]
- , Fenced [ "let g:FerretNvim=0" ]
- , OptionAnnotation "g:FerretJob" "boolean" (Just "1")
- , Paragraph
- [ Plaintext "Controls"
+ , Plaintext "the"
, Whitespace
- , Plaintext "whether"
+ , Link "location-list"
+ , Plaintext "."
, Whitespace
- , Plaintext "to"
+ , Plaintext "This"
, Whitespace
- , Plaintext "use"
+ , Plaintext "distinction"
, Whitespace
- , Plaintext "Vim's"
+ , Plaintext "is"
, Whitespace
- , Link "+job"
+ , Plaintext "important"
, Whitespace
- , Plaintext "feature,"
+ , Plaintext "if"
, Whitespace
- , Plaintext "when"
+ , Plaintext "you"
, Whitespace
- , Plaintext "available,"
+ , Plaintext "have"
+ , Whitespace
+ , Plaintext "used"
+ , Whitespace
+ , Plaintext "Ferret's"
+ , Whitespace
+ , Plaintext "bindings"
, Whitespace
, Plaintext "to"
, Whitespace
- , Plaintext "run"
+ , Plaintext "delete"
, Whitespace
- , Plaintext "searches"
+ , Plaintext "entries"
, Whitespace
- , Plaintext "asynchronously."
+ , Plaintext "from"
, Whitespace
- , Plaintext "To"
+ , Plaintext "the"
, Whitespace
- , Plaintext "prevent"
+ , Plaintext "listing."
+ ]
+ , Fenced [ "let g:FerretLacksCommand='lfdo'" ]
+ , OptionAnnotation "g:FerretVeryMagic" "boolean" (Just "1")
+ , Paragraph
+ [ Plaintext "Controls"
, Whitespace
- , Link "+job"
+ , Plaintext "whether"
, Whitespace
- , Plaintext "from"
+ , Plaintext "the"
, Whitespace
- , Plaintext "being"
+ , Link "<Plug>(FerretAck)"
, Whitespace
- , Plaintext "used,"
+ , Plaintext "mapping"
, Whitespace
- , Plaintext "set"
+ , Plaintext "should"
, Whitespace
- , Plaintext "to"
+ , Plaintext "populate"
, Whitespace
- , Plaintext "0,"
+ , Plaintext "the"
, Whitespace
- , Plaintext "in"
+ , Plaintext "command"
, Whitespace
- , Plaintext "which"
+ , Plaintext "line"
, Whitespace
- , Plaintext "case"
+ , Plaintext "with"
, Whitespace
- , Plaintext "Ferret"
+ , Plaintext "the"
, Whitespace
- , Plaintext "will"
+ , Link "/\\v"
, Whitespace
- , Plaintext "fall"
+ , Plaintext "\"very"
, Whitespace
- , Plaintext "back"
+ , Plaintext "magic\""
, Whitespace
- , Plaintext "to"
+ , Plaintext "marker."
+ , Whitespace
+ , Plaintext "Given"
+ , Whitespace
+ , Plaintext "that"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "next"
+ , Plaintext "argument"
, Whitespace
- , Plaintext "available"
+ , Plaintext "passed"
, Whitespace
- , Plaintext "method."
- ]
- , Fenced [ "let g:FerretJob=0" ]
- , OptionAnnotation "g:FerretHlsearch" "boolean" Nothing
- , Paragraph
- [ Plaintext "Controls"
+ , Plaintext "to"
, Whitespace
- , Plaintext "whether"
+ , Link ":Acks"
, Whitespace
- , Plaintext "Ferret"
+ , Plaintext "is"
, Whitespace
- , Plaintext "should"
+ , Plaintext "handed"
, Whitespace
- , Plaintext "attempt"
+ , Plaintext "straight"
, Whitespace
, Plaintext "to"
, Whitespace
- , Plaintext "highlight"
+ , Plaintext "Vim,"
+ , Whitespace
+ , Plaintext "using"
+ , Whitespace
+ , Plaintext "\"very"
+ , Whitespace
+ , Plaintext "magic\""
+ , Whitespace
+ , Plaintext "makes"
+ , Whitespace
+ , Plaintext "it"
+ , Whitespace
+ , Plaintext "more"
+ , Whitespace
+ , Plaintext "likely"
+ , Whitespace
+ , Plaintext "that"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "search"
+ , Plaintext "(probably"
, Whitespace
- , Plaintext "pattern"
+ , Plaintext "Perl-compatible)"
, Whitespace
- , Plaintext "when"
+ , Plaintext "regular"
, Whitespace
- , Plaintext "running"
+ , Plaintext "expression"
, Whitespace
- , Link ":Ack"
+ , Plaintext "used"
, Whitespace
- , Plaintext "or"
+ , Plaintext "in"
, Whitespace
- , Link ":Lack"
- , Plaintext "."
+ , Plaintext "the"
, Whitespace
- , Plaintext "If"
+ , Plaintext "initial"
, Whitespace
- , Plaintext "left"
+ , Plaintext "search"
, Whitespace
- , Plaintext "unset,"
+ , Plaintext "can"
, Whitespace
- , Plaintext "Ferret"
+ , Plaintext "be"
, Whitespace
- , Plaintext "will"
+ , Plaintext "used"
, Whitespace
- , Plaintext "respect"
+ , Plaintext "directly"
, Whitespace
- , Plaintext "the"
+ , Plaintext "with"
, Whitespace
- , Plaintext "current"
+ , Plaintext "Vim's"
, Whitespace
- , Plaintext "'hlsearch'"
+ , Plaintext "(famously"
, Whitespace
- , Plaintext "setting."
+ , Plaintext "not-Perl-compatible)"
, Whitespace
- , Plaintext "To"
+ , Plaintext "regular"
, Whitespace
- , Plaintext "force"
+ , Plaintext "expression"
, Whitespace
- , Plaintext "highlighting"
+ , Plaintext "engine."
+ ]
+ , Paragraph
+ [ Plaintext "To"
, Whitespace
- , Plaintext "on"
+ , Plaintext "prevent"
, Whitespace
- , Plaintext "or"
+ , Plaintext "the"
, Whitespace
- , Plaintext "off"
+ , Plaintext "automatic"
, Whitespace
- , Plaintext "irrespective"
+ , Plaintext "use"
, Whitespace
, Plaintext "of"
, Whitespace
- , Plaintext "'hlsearch',"
+ , Link "/\\v"
+ , Plaintext ","
, Whitespace
, Plaintext "set"
, Whitespace
- , Link "g:FerretHlsearch"
- , Whitespace
- , Plaintext "to"
- , Whitespace
- , Plaintext "1"
- , Whitespace
- , Plaintext "(on)"
+ , Plaintext "this"
, Whitespace
- , Plaintext "or"
+ , Plaintext "option"
, Whitespace
- , Plaintext "0"
+ , Plaintext "to"
, Whitespace
- , Plaintext "(off):"
+ , Plaintext "0:"
]
- , Fenced [ "let g:FerretHlsearch=0" ]
+ , Fenced [ "let g:FerretVeryMagic=0" ]
, OptionAnnotation
"g:FerretExecutable" "string" (Just "\"rg,ag,ack,ack-grep\"")
, Paragraph
, Whitespace
, Plaintext "window"
, Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Link "location-list"
+ , Whitespace
, Plaintext "for"
, Whitespace
, Plaintext "deleting"
, Plaintext "during"
, Whitespace
, Link ":Acks"
+ , Whitespace
+ , Plaintext "or"
+ , Whitespace
+ , Link ":Lacks"
, Plaintext ":"
]
, List
, Whitespace
, Plaintext "2009"
, Whitespace
- , Plaintext "(https://rfr.to/h)."
+ , Plaintext "(https://wincent.com/h)."
]
, Paragraph
[ Plaintext "So,"
[ ListItem
[ Plaintext "Perform"
, Whitespace
- , Plaintext "final"
+ , Plaintext "final"
+ , Whitespace
+ , Plaintext "sanity"
+ , Whitespace
+ , Plaintext "checks"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "manual"
+ , Whitespace
+ , Plaintext "testing"
+ ]
+ , ListItem
+ [ Plaintext "Update"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "ferret-history"
+ , Whitespace
+ , Plaintext "section"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "documentation"
+ ]
+ , ListItem
+ [ Plaintext "Verify"
+ , Whitespace
+ , Plaintext "clean"
+ , Whitespace
+ , Plaintext "work"
+ , Whitespace
+ , Plaintext "tree:"
+ ]
+ ]
+ , Fenced [ "git status" ]
+ , List
+ [ ListItem
+ [ Plaintext "Tag"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "release:"
+ ]
+ ]
+ , Fenced [ "git tag -s -m \"$VERSION release\" $VERSION" ]
+ , List
+ [ ListItem
+ [ Plaintext "Publish"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "code:"
+ ]
+ ]
+ , Fenced
+ [ "git push origin master --follow-tags"
+ , "git push github master --follow-tags"
+ ]
+ , List
+ [ ListItem
+ [ Plaintext "Produce"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "release"
+ , Whitespace
+ , Plaintext "archive:"
+ ]
+ ]
+ , Fenced [ "git archive -o ferret-$VERSION.zip HEAD -- ." ]
+ , List
+ [ ListItem
+ [ Plaintext "Upload"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "http://www.vim.org/scripts/script.php?script_id=5220"
+ ]
+ ]
+ , HeadingAnnotation "Authors"
+ , Paragraph
+ [ Plaintext "Ferret"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "written"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "maintained"
+ , Whitespace
+ , Plaintext "by"
+ , Whitespace
+ , Plaintext "Greg"
+ , Whitespace
+ , Plaintext "Hurrell"
+ , Whitespace
+ , Plaintext "<greg@hurrell.net>."
+ ]
+ , Paragraph
+ [ Plaintext "Other"
+ , Whitespace
+ , Plaintext "contributors"
+ , Whitespace
+ , Plaintext "that"
+ , Whitespace
+ , Plaintext "have"
+ , Whitespace
+ , Plaintext "submitted"
+ , Whitespace
+ , Plaintext "patches"
+ , Whitespace
+ , Plaintext "include"
+ , Whitespace
+ , Plaintext "(in"
+ , Whitespace
+ , Plaintext "alphabetical"
+ , Whitespace
+ , Plaintext "order):"
+ ]
+ , List
+ [ ListItem [ Plaintext "Daniel" , Whitespace , Plaintext "Silva" ]
+ , ListItem
+ [ Plaintext "Filip" , Whitespace , Plaintext "Szyma\324ski" ]
+ , ListItem [ Plaintext "Joe" , Whitespace , Plaintext "Lencioni" ]
+ , ListItem [ Plaintext "Jon" , Whitespace , Plaintext "Parise" ]
+ , ListItem
+ [ Plaintext "Nelo-Thara" , Whitespace , Plaintext "Wallus" ]
+ , ListItem [ Plaintext "Tom" , Whitespace , Plaintext "Dooner" ]
+ , ListItem [ Plaintext "Vaibhav" , Whitespace , Plaintext "Sagar" ]
+ ]
+ , HeadingAnnotation "History"
+ , SubheadingAnnotation "5.0 (8 June 2019)"
+ , List
+ [ ListItem
+ [ Plaintext "The"
+ , Whitespace
+ , Link "<Plug>(FerretAcks)"
+ , Whitespace
+ , Plaintext "mapping"
+ , Whitespace
+ , Plaintext "now"
+ , Whitespace
+ , Plaintext "uses"
+ , Whitespace
+ , Link "/\\v"
+ , Whitespace
+ , Plaintext "\"very"
+ , Whitespace
+ , Plaintext "magic\""
+ , Whitespace
+ , Plaintext "mode"
+ , Whitespace
+ , Plaintext "by"
+ , Whitespace
+ , Plaintext "default."
+ , Whitespace
+ , Plaintext "This"
+ , Whitespace
+ , Plaintext "default"
+ , Whitespace
+ , Plaintext "can"
+ , Whitespace
+ , Plaintext "be"
+ , Whitespace
+ , Plaintext "changed"
+ , Whitespace
+ , Plaintext "using"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "g:FerretVeryMagic"
+ , Whitespace
+ , Plaintext "option."
+ ]
+ , ListItem
+ [ Link ":Acks"
+ , Whitespace
+ , Plaintext "now"
+ , Whitespace
+ , Plaintext "preferentially"
+ , Whitespace
+ , Plaintext "uses"
+ , Whitespace
+ , Link ":cdo"
+ , Whitespace
+ , Plaintext "(rather"
+ , Whitespace
+ , Plaintext "than"
+ , Whitespace
+ , Link ":cfdo"
+ , Plaintext ")"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "make"
+ , Whitespace
+ , Plaintext "replacements,"
+ , Whitespace
+ , Plaintext "which"
+ , Whitespace
+ , Plaintext "means"
+ , Whitespace
+ , Plaintext "that"
+ , Whitespace
+ , Plaintext "it"
+ , Whitespace
+ , Plaintext "no"
+ , Whitespace
+ , Plaintext "longer"
+ , Whitespace
+ , Plaintext "operates"
+ , Whitespace
+ , Plaintext "on"
+ , Whitespace
+ , Plaintext "a"
, Whitespace
- , Plaintext "sanity"
+ , Plaintext "per-file"
, Whitespace
- , Plaintext "checks"
+ , Plaintext "level"
, Whitespace
, Plaintext "and"
, Whitespace
- , Plaintext "manual"
+ , Plaintext "instead"
, Whitespace
- , Plaintext "testing"
+ , Plaintext "targets"
+ , Whitespace
+ , Plaintext "individual"
+ , Whitespace
+ , Plaintext "entries"
+ , Whitespace
+ , Plaintext "within"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "quickfix"
+ , Whitespace
+ , Plaintext "window."
+ , Whitespace
+ , Plaintext "This"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "relevant"
+ , Whitespace
+ , Plaintext "if"
+ , Whitespace
+ , Plaintext "you've"
+ , Whitespace
+ , Plaintext "used"
+ , Whitespace
+ , Plaintext "Ferrets"
+ , Whitespace
+ , Plaintext "mappings"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "delete"
+ , Whitespace
+ , Plaintext "entries"
+ , Whitespace
+ , Plaintext "from"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "window."
+ , Whitespace
+ , Plaintext "The"
+ , Whitespace
+ , Plaintext "old"
+ , Whitespace
+ , Plaintext "behavior"
+ , Whitespace
+ , Plaintext "can"
+ , Whitespace
+ , Plaintext "be"
+ , Whitespace
+ , Plaintext "restored"
+ , Whitespace
+ , Plaintext "with"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "g:FerretAcksCommand"
+ , Whitespace
+ , Plaintext "option."
]
, ListItem
- [ Plaintext "Update"
+ [ Plaintext "Ferret"
+ , Whitespace
+ , Plaintext "now"
+ , Whitespace
+ , Plaintext "has"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Link ":Lacks"
+ , Whitespace
+ , Plaintext "command,"
+ , Whitespace
+ , Plaintext "an"
+ , Whitespace
+ , Plaintext "analog"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Link ":Acks"
+ , Whitespace
+ , Plaintext "which"
+ , Whitespace
+ , Plaintext "applies"
+ , Whitespace
+ , Plaintext "to"
, Whitespace
, Plaintext "the"
, Whitespace
- , Link "ferret-history"
+ , Link "location-list"
+ , Plaintext "."
+ ]
+ , ListItem
+ [ Plaintext "Likewise,"
, Whitespace
- , Plaintext "section"
+ , Plaintext "Ferret"
+ , Whitespace
+ , Plaintext "now"
+ , Whitespace
+ , Plaintext "has"
+ , Whitespace
+ , Plaintext "a"
+ , Whitespace
+ , Link ":Largs"
+ , Whitespace
+ , Plaintext "command,"
+ , Whitespace
+ , Plaintext "analogous"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Link ":Qargs"
+ , Plaintext ","
+ , Whitespace
+ , Plaintext "which"
+ , Whitespace
+ , Plaintext "applies"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "location-list"
+ , Whitespace
+ , Plaintext "instead"
, Whitespace
, Plaintext "of"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "documentation"
+ , Link "quickfix"
+ , Whitespace
+ , Plaintext "window."
]
, ListItem
- [ Plaintext "Verify"
+ [ Plaintext "The"
, Whitespace
- , Plaintext "clean"
+ , Plaintext "Ferret"
, Whitespace
- , Plaintext "work"
+ , Plaintext "bindings"
, Whitespace
- , Plaintext "tree:"
- ]
- ]
- , Fenced [ "git status" ]
- , List
- [ ListItem
- [ Plaintext "Tag"
+ , Plaintext "that"
+ , Whitespace
+ , Plaintext "are"
+ , Whitespace
+ , Plaintext "set-up"
+ , Whitespace
+ , Plaintext "in"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "release:"
- ]
- ]
- , Fenced [ "git tag -s -m \"$VERSION release\" $VERSION" ]
- , List
- [ ListItem
- [ Plaintext "Publish"
+ , Link "quickfix"
+ , Whitespace
+ , Plaintext "window"
+ , Whitespace
+ , Plaintext "when"
+ , Whitespace
+ , Link "g:FerretQFMap"
+ , Whitespace
+ , Plaintext "is"
+ , Whitespace
+ , Plaintext "enabled"
+ , Whitespace
+ , Plaintext "now"
+ , Whitespace
+ , Plaintext "also"
+ , Whitespace
+ , Plaintext "apply"
+ , Whitespace
+ , Plaintext "to"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "code:"
+ , Link "location-list"
+ , Plaintext "."
]
]
- , Fenced
- [ "git push origin master --follow-tags"
- , "git push github master --follow-tags"
- ]
+ , SubheadingAnnotation "4.1 (31 January 2019)"
, List
[ ListItem
- [ Plaintext "Produce"
+ [ Plaintext "Added"
+ , Whitespace
+ , Link ":Quack"
+ , Whitespace
+ , Plaintext "command,"
+ , Whitespace
+ , Plaintext "analogous"
+ , Whitespace
+ , Plaintext "to"
+ , Whitespace
+ , Link ":Ack"
+ , Whitespace
+ , Plaintext "but"
+ , Whitespace
+ , Plaintext "scoped"
+ , Whitespace
+ , Plaintext "to"
, Whitespace
, Plaintext "the"
, Whitespace
- , Plaintext "release"
+ , Plaintext "files"
, Whitespace
- , Plaintext "archive:"
+ , Plaintext "currently"
+ , Whitespace
+ , Plaintext "listed"
+ , Whitespace
+ , Plaintext "in"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "quickfix"
+ , Whitespace
+ , Plaintext "window."
+ ]
+ , ListItem
+ [ Plaintext "Fixed"
+ , Whitespace
+ , Plaintext "option"
+ , Whitespace
+ , Plaintext "autocompletion."
]
]
- , Fenced [ "git archive -o ferret-$VERSION.zip HEAD -- ." ]
+ , SubheadingAnnotation "4.0.2 (11 January 2019)"
, List
[ ListItem
- [ Plaintext "Upload"
+ [ Plaintext "Restore"
+ , Whitespace
+ , Plaintext "compatibility"
+ , Whitespace
+ , Plaintext "with"
+ , Whitespace
+ , Plaintext "versions"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Code "rg"
+ , Whitespace
+ , Plaintext "prior"
, Whitespace
, Plaintext "to"
, Whitespace
- , Plaintext "http://www.vim.org/scripts/script.php?script_id=5220"
+ , Plaintext "v0.8"
+ , Whitespace
+ , Plaintext "(https://github.com/wincent/ferret/issues/59)."
]
]
- , HeadingAnnotation "Authors"
- , Paragraph
- [ Plaintext "Ferret"
- , Whitespace
- , Plaintext "is"
- , Whitespace
- , Plaintext "written"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Plaintext "maintained"
- , Whitespace
- , Plaintext "by"
- , Whitespace
- , Plaintext "Greg"
- , Whitespace
- , Plaintext "Hurrell"
- , Whitespace
- , Plaintext "<greg@hurrell.net>."
- ]
- , Paragraph
- [ Plaintext "Other"
- , Whitespace
- , Plaintext "contributors"
- , Whitespace
- , Plaintext "that"
- , Whitespace
- , Plaintext "have"
- , Whitespace
- , Plaintext "submitted"
- , Whitespace
- , Plaintext "patches"
- , Whitespace
- , Plaintext "include"
- , Whitespace
- , Plaintext "(in"
- , Whitespace
- , Plaintext "alphabetical"
- , Whitespace
- , Plaintext "order):"
- ]
+ , SubheadingAnnotation "4.0.1 (8 January 2019)"
, List
- [ ListItem [ Plaintext "Daniel" , Whitespace , Plaintext "Silva" ]
- , ListItem
- [ Plaintext "Filip" , Whitespace , Plaintext "Szyma\324ski" ]
- , ListItem [ Plaintext "Joe" , Whitespace , Plaintext "Lencioni" ]
- , ListItem [ Plaintext "Jon" , Whitespace , Plaintext "Parise" ]
- , ListItem
- [ Plaintext "Nelo-Thara" , Whitespace , Plaintext "Wallus" ]
- , ListItem [ Plaintext "Tom" , Whitespace , Plaintext "Dooner" ]
- , ListItem [ Plaintext "Vaibhav" , Whitespace , Plaintext "Sagar" ]
+ [ ListItem
+ [ Plaintext "Make"
+ , Whitespace
+ , Link ":Acks"
+ , Whitespace
+ , Plaintext "behavior"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Plaintext "same"
+ , Whitespace
+ , Plaintext "irrespective"
+ , Whitespace
+ , Plaintext "of"
+ , Whitespace
+ , Plaintext "the"
+ , Whitespace
+ , Link "'gdefault'"
+ , Whitespace
+ , Plaintext "setting."
+ ]
]
- , HeadingAnnotation "History"
- , SubheadingAnnotation "master (not yet released)"
+ , SubheadingAnnotation "4.0 (25 December 2018)"
, List
[ ListItem
[ Plaintext "Try"
+<p align="center">
+ <img src="https://raw.githubusercontent.com/wincent/ferret/media/ferret.jpg" />
+</p>
+<p align="center">
+ <img src="https://raw.githubusercontent.com/wincent/ferret/media/ferret.gif" />
+</p>
# ferret<a name="ferret-ferret" href="#user-content-ferret-ferret"></a>
Results are normally displayed in the <strong>`quickfix`</strong> window, but Ferret also provides a <strong>[`:Lack`](#user-content-lack)</strong> command that behaves like <strong>[`:Ack`](#user-content-ack)</strong> but uses the <strong>`location-list`</strong> instead, and a <leader>l mapping as a shortcut to <strong>[`:Lack`](#user-content-lack)</strong>.
-<strong>[`:Back`](#user-content-back)</strong> and <strong>[`:Black`](#user-content-black)</strong> are analogous to <strong>[`:Ack`](#user-content-ack)</strong> and <strong>[`:Lack`](#user-content-lack)</strong>, but scoped to search within currently open buffers only.
+<strong>[`:Back`](#user-content-back)</strong> and <strong>[`:Black`](#user-content-black)</strong> are analogous to <strong>[`:Ack`](#user-content-ack)</strong> and <strong>[`:Lack`](#user-content-lack)</strong>, but scoped to search within currently open buffers only. <strong>[`:Quack`](#user-content-quack)</strong> is scoped to search among the files currently in the <strong>`quickfix`</strong> list.
### 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> (or <strong>[`:Back`](#user-content-back)</strong>).
+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> (or <strong>[`:Back`](#user-content-back)</strong>, or <strong>[`:Quack`](#user-content-quack)</strong>).
+
+Correspondingly, results obtained by <strong>[`:Lack`](#user-content-lack)</strong> can be targeted for replacement with <strong>[`:Lacks`](#user-content-lacks)</strong>.
### 3. Quickfix listing enhancements<a name="ferret-3-quickfix-listing-enhancements" href="#user-content-ferret-3-quickfix-listing-enhancements"></a>
### 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 on older versions of Vim by <strong>[`:Acks`](#user-content-acks)</strong> to do its work (on newer versions the built-in <strong>`:cfdo`</strong> is used instead).
+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 on older versions of Vim by <strong>[`:Acks`](#user-content-acks)</strong> to do its work (on newer versions the built-in <strong>`:cdo`</strong> or <strong>`:cfdo`</strong> are used instead).
+
+Ferret also provides a <strong>[`:Largs`](#user-content-largs)</strong> command, which is a <strong>`location-list`</strong> analog for <strong>[`:Qargs`](#user-content-qargs)</strong>.
## Installation<a name="ferret-installation" href="#user-content-ferret-installation"></a>
Like <strong>[`:Black`](#user-content-black)</strong>, but returns all results irrespective of the value of <strong>[`g:FerretMaxResults`](#user-content-gferretmaxresults)</strong>.
+<p align="right"><a name="quack" href="#user-content-quack"><code>:Quack</code></a></p>
+
+### `:Quack {pattern} {options}`<a name="ferret-quack-pattern-options" href="#user-content-ferret-quack-pattern-options"></a>
+
+Like <strong>[`:Ack`](#user-content-ack)</strong>, but searches only among files currently in the <strong>`quickfix`</strong> listing. Note that the search is still delegated to the underlying <strong>`'grepprg'`</strong> (`rg`, `ag`, `ack` or `ack-grep`), which means that only buffers written to disk will be searched. If no buffers are written to disk, then <strong>[`:Quack`](#user-content-quack)</strong> behaves exactly like <strong>[`:Ack`](#user-content-ack)</strong> and will search all files in the current directory.
+
+<p align="right"><a name="quack" href="#user-content-quack"><code>:Quack!</code></a></p>
+
+### `:Quack! {pattern} {options}`<a name="ferret-quack-pattern-options" href="#user-content-ferret-quack-pattern-options"></a>
+
+Like <strong>[`:Quack`](#user-content-quack)</strong>, but returns all results irrespective of the value of <strong>[`g:FerretMaxResults`](#user-content-gferretmaxresults)</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>
:Acks /\v(foo\d+)(bar)/\2\1/
```
+<p align="right"><a name="lacks" href="#user-content-lacks"><code>:Lacks</code></a></p>
+
+### `:Lacks /{pattern}/{replacement}/`<a name="ferret-lacks-patternreplacement" href="#user-content-ferret-lacks-patternreplacement"></a>
+
+Takes all of the files in the current <strong>`location-list`</strong> and performs a substitution of all instances of {pattern} by {replacement}. This is an analog of the <strong>[`:Acks`](#user-content-acks)</strong> command, but operates on the <strong>`location-list`</strong> instead of the <strong>`quickfix`</strong> listing.
+
<p align="right"><a name="ferretcancelasync" href="#user-content-ferretcancelasync"><code>:FerretCancelAsync</code></a></p>
### `:FerretCancelAsync`<a name="ferret-ferretcancelasync" href="#user-content-ferret-ferretcancelasync"></a>
### `:FerretPullAsync`<a name="ferret-ferretpullasync" href="#user-content-ferret-ferretpullasync"></a>
-Eagerly populates the <strong>`quickfix`</strong> (or <strong>`location-list`</strong>) window with any results that may have been produced by a long-running asynchronoous search in progress in the background.
+Eagerly populates the <strong>`quickfix`</strong> (or <strong>`location-list`</strong>) window with any results that may have been produced by a long-running asynchronous search in progress in the background.
<p align="right"><a name="qargs" href="#user-content-qargs"><code>:Qargs</code></a></p>
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.
+<p align="right"><a name="largs" href="#user-content-largs"><code>:Largs</code></a></p>
+
+### `:Largs`<a name="ferret-largs" href="#user-content-ferret-largs"></a>
+
+Just like <strong>[`:Qargs`](#user-content-qargs)</strong>, but applies to the current <strong>`location-list`</strong>.
+
+It takes the files in the current <strong>`location-list`</strong> 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>
let g:FerretHlsearch=0
```
+<p align="right"><a name="gferretackscommand" href="#user-content-gferretackscommand"><code>g:FerretAcksCommand</code></a></p>
+
+### `g:FerretAcksCommand` (string, default: "cdo")<a name="ferret-gferretackscommand-string-default-cdo" href="#user-content-ferret-gferretackscommand-string-default-cdo"></a>
+
+Controls the underlying Vim command that <strong>[`:Acks`](#user-content-acks)</strong> uses to peform substitutions. On versions of Vim that have it, defaults to <strong>`:cdo`</strong>, which means that substitutions will apply to the specific lines currently in the <strong>`quickfix`</strong> listing. Can be set to "cfdo" to instead use <strong>`:cfdo`</strong> (if available), which means that the substitutions will be applied on a per-file basis to all the files in the <strong>`quickfix`</strong> listing. This distinction is important if you have used Ferret's bindings to delete entries from the listing.
+
+```
+let g:FerretAcksCommand='cfdo'
+```
+
+<p align="right"><a name="gferretlackscommand" href="#user-content-gferretlackscommand"><code>g:FerretLacksCommand</code></a></p>
+
+### `g:FerretLacksCommand` (string, default: "ldo")<a name="ferret-gferretlackscommand-string-default-ldo" href="#user-content-ferret-gferretlackscommand-string-default-ldo"></a>
+
+Controls the underlying Vim command that <strong>[`:Lacks`](#user-content-lacks)</strong> uses to peform substitutions. On versions of Vim that have it, defaults to <strong>`:ldo`</strong>, which means that substitutions will apply to the specific lines currently in the <strong>`location-list`</strong>. Can be set to "lfdo" to instead use <strong>`:lfdo`</strong> (if available), which means that the substitutions will be applied on a per-file basis to all the files in the <strong>`location-list`</strong>. This distinction is important if you have used Ferret's bindings to delete entries from the listing.
+
+```
+let g:FerretLacksCommand='lfdo'
+```
+
+<p align="right"><a name="gferretverymagic" href="#user-content-gferretverymagic"><code>g:FerretVeryMagic</code></a></p>
+
+### `g:FerretVeryMagic` (boolean, default: 1)<a name="ferret-gferretverymagic-boolean-default-1" href="#user-content-ferret-gferretverymagic-boolean-default-1"></a>
+
+Controls whether the <strong>[`<Plug>(FerretAck)`](#user-content-plugferretack)</strong> mapping should populate the command line with the <strong>`/\v`</strong> "very magic" marker. Given that the argument passed to <strong>[`:Acks`](#user-content-acks)</strong> is handed straight to Vim, using "very magic" makes it more likely that the (probably Perl-compatible) regular expression used in the initial search can be used directly with Vim's (famously not-Perl-compatible) regular expression engine.
+
+To prevent the automatic use of <strong>`/\v`</strong>, set this option to 0:
+
+```
+let g:FerretVeryMagic=0
+```
+
<p align="right"><a name="gferretexecutable" href="#user-content-gferretexecutable"><code>g:FerretExecutable</code></a></p>
### `g:FerretExecutable` (string, default: "rg,ag,ack,ack-grep")<a name="ferret-gferretexecutable-string-default-rgagackack-grep" href="#user-content-ferret-gferretexecutable-string-default-rgagackack-grep"></a>
### `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:
+Controls whether to set up mappings in the <strong>`quickfix`</strong> results window and <strong>`location-list`</strong> for deleting results. The mappings include:
- `d` (<strong>`visual-mode`</strong>): delete visual selection
- `dd` (<strong>`Normal-mode`</strong>): delete current line
## 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>
-For maximum compatibility with other plug-ins, Ferret runs the following "User" autocommands before and after running the file writing operations during <strong>[`:Acks`](#user-content-acks)</strong>:
+For maximum compatibility with other plug-ins, Ferret runs the following "User" autocommands before and after running the file writing operations during <strong>[`:Acks`](#user-content-acks)</strong> or <strong>[`:Lacks`](#user-content-lacks)</strong>:
- FerretWillWrite
- FerretDidWrite
### 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://rfr.to/h).
+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://wincent.com/h).
So, even though Ferret has a new name now and actually prefers `rg` then `ag` over `ack`/`ack-grep` when available, I prefer to keep the command names intact and benefit from years of accumulated muscle-memory.
## History<a name="ferret-history" href="#user-content-ferret-history"></a>
-### master (not yet released)<a name="ferret-master-not-yet-released" href="#user-content-ferret-master-not-yet-released"></a>
+### 5.0 (8 June 2019)<a name="ferret-50-8-june-2019" href="#user-content-ferret-50-8-june-2019"></a>
+
+- The <strong>[`<Plug>(FerretAcks)`](#user-content-plugferretacks)</strong> mapping now uses <strong>`/\v`</strong> "very magic" mode by default. This default can be changed using the <strong>[`g:FerretVeryMagic`](#user-content-gferretverymagic)</strong> option.
+- <strong>[`:Acks`](#user-content-acks)</strong> now preferentially uses <strong>`:cdo`</strong> (rather than <strong>`:cfdo`</strong>) to make replacements, which means that it no longer operates on a per-file level and instead targets individual entries within the <strong>`quickfix`</strong> window. This is relevant if you've used Ferrets mappings to delete entries from the window. The old behavior can be restored with the <strong>[`g:FerretAcksCommand`](#user-content-gferretackscommand)</strong> option.
+- Ferret now has a <strong>[`:Lacks`](#user-content-lacks)</strong> command, an analog to <strong>[`:Acks`](#user-content-acks)</strong> which applies to the <strong>`location-list`</strong>.
+- Likewise, Ferret now has a <strong>[`:Largs`](#user-content-largs)</strong> command, analogous to <strong>[`:Qargs`](#user-content-qargs)</strong>, which applies to the <strong>`location-list`</strong> instead of the <strong>`quickfix`</strong> window.
+- The Ferret bindings that are set-up in the <strong>`quickfix`</strong> window when <strong>[`g:FerretQFMap`](#user-content-gferretqfmap)</strong> is enabled now also apply to the <strong>`location-list`</strong>.
+
+
+### 4.1 (31 January 2019)<a name="ferret-41-31-january-2019" href="#user-content-ferret-41-31-january-2019"></a>
+
+- Added <strong>[`:Quack`](#user-content-quack)</strong> command, analogous to <strong>[`:Ack`](#user-content-ack)</strong> but scoped to the files currently listed in the <strong>`quickfix`</strong> window.
+- Fixed option autocompletion.
+
+
+### 4.0.2 (11 January 2019)<a name="ferret-402-11-january-2019" href="#user-content-ferret-402-11-january-2019"></a>
+
+- Restore compatibility with versions of `rg` prior to v0.8 (https://github.com/wincent/ferret/issues/59).
+
+
+### 4.0.1 (8 January 2019)<a name="ferret-401-8-january-2019" href="#user-content-ferret-401-8-january-2019"></a>
+
+- Make <strong>[`:Acks`](#user-content-acks)</strong> behavior the same irrespective of the <strong>`'gdefault'`</strong> setting.
+
+
+### 4.0 (25 December 2018)<a name="ferret-40-25-december-2018" href="#user-content-ferret-40-25-december-2018"></a>
- Try to avoid "press ENTER to continue" prompts.
- Put search term in <strong>`w:quickfix_title`</strong> for use in statuslines (https://github.com/wincent/ferret/pull/57).
instead, and a <leader>l mapping as a shortcut to |:Lack|.
|:Back| and |:Black| are analogous to |:Ack| and |:Lack|, but scoped to search
-within currently open buffers only.
+within currently open buffers only. |:Quack| is scoped to search among the
+files currently in the |quickfix| list.
2. Streamlined multi-file replace ~
The companion to |:Ack| is |:Acks| (mnemonic: "Ack substitute", accessible via
shortcut <leader>r), which allows you to run a multi-file replace across all
the files placed in the |quickfix| window by a previous invocation of |:Ack| (or
-|:Back|).
+|:Back|, or |:Quack|).
+
+Correspondingly, results obtained by |:Lack| can be targeted for replacement
+with |:Lacks|.
3. Quickfix listing enhancements ~
Finally, Ferret provides a |:Qargs| command that puts the files currently in
the |quickfix| listing into the |:args| list, where they can be operated on in
bulk via the |:argdo| command. This is what's used under the covers on older
-versions of Vim by |:Acks| to do its work (on newer versions the built-in
-|:cfdo| is used instead).
+versions of Vim by |:Acks| to do its work (on newer versions the built-in |:cdo|
+or |:cfdo| are used instead).
+
+Ferret also provides a |:Largs| command, which is a |location-list| analog for
+|:Qargs|.
INSTALLATION *ferret-installation*
:Black! {pattern} {options} ~
Like |:Black|, but returns all results irrespective of the value of
+|g:FerretMaxResults|.
+
+ *:Quack*
+:Quack {pattern} {options} ~
+
+Like |:Ack|, but searches only among files currently in the |quickfix| listing.
+Note that the search is still delegated to the underlying |'grepprg'| (`rg`, `ag`,
+`ack` or `ack-grep`), which means that only buffers written to disk will be
+searched. If no buffers are written to disk, then |:Quack| behaves exactly
+like |:Ack| and will search all files in the current directory.
+
+ *:Quack!*
+:Quack! {pattern} {options} ~
+
+Like |:Quack|, but returns all results irrespective of the value of
|g:FerretMaxResults|.
*:Acks*
>
:Acks /\v(foo\d+)(bar)/\2\1/
<
+ *:Lacks*
+:Lacks /{pattern}/{replacement}/ ~
+
+Takes all of the files in the current |location-list| and performs a
+substitution of all instances of {pattern} by {replacement}. This is an
+analog of the |:Acks| command, but operates on the |location-list| instead of
+the |quickfix| listing.
+
*:FerretCancelAsync*
:FerretCancelAsync ~
:FerretPullAsync ~
Eagerly populates the |quickfix| (or |location-list|) window with any results
-that may have been produced by a long-running asynchronoous search in
+that may have been produced by a long-running asynchronous search in
progress in the background.
*:Qargs*
It takes the files currently in the |quickfix| listing and sets them as |:args|
so that they can be operated on en masse via the |:argdo| command.
+ *:Largs*
+:Largs ~
+
+Just like |:Qargs|, but applies to the current |location-list|.
+
+It takes the files in the current |location-list| and sets them as |:args| so
+that they can be operated on en masse via the |:argdo| command.
+
MAPPINGS *ferret-mappings*
Circumstances where mappings do not get set up ~
let g:FerretHlsearch=0
<
+ *g:FerretAcksCommand*
+|g:FerretAcksCommand| string (default: "cdo")
+
+Controls the underlying Vim command that |:Acks| uses to peform substitutions.
+On versions of Vim that have it, defaults to |:cdo|, which means that
+substitutions will apply to the specific lines currently in the |quickfix|
+listing. Can be set to "cfdo" to instead use |:cfdo| (if available), which
+means that the substitutions will be applied on a per-file basis to all the
+files in the |quickfix| listing. This distinction is important if you have
+used Ferret's bindings to delete entries from the listing.
+>
+ let g:FerretAcksCommand='cfdo'
+<
+
+ *g:FerretLacksCommand*
+|g:FerretLacksCommand| string (default: "ldo")
+
+Controls the underlying Vim command that |:Lacks| uses to peform
+substitutions. On versions of Vim that have it, defaults to |:ldo|, which
+means that substitutions will apply to the specific lines currently in the
+|location-list|. Can be set to "lfdo" to instead use |:lfdo| (if available),
+which means that the substitutions will be applied on a per-file basis to
+all the files in the |location-list|. This distinction is important if you
+have used Ferret's bindings to delete entries from the listing.
+>
+ let g:FerretLacksCommand='lfdo'
+<
+
+ *g:FerretVeryMagic*
+|g:FerretVeryMagic| boolean (default: 1)
+
+Controls whether the |<Plug>(FerretAck)| mapping should populate the command
+line with the |/\v| "very magic" marker. Given that the argument passed to
+|:Acks| is handed straight to Vim, using "very magic" makes it more likely
+that the (probably Perl-compatible) regular expression used in the initial
+search can be used directly with Vim's (famously not-Perl-compatible)
+regular expression engine.
+
+To prevent the automatic use of |/\v|, set this option to 0:
+>
+ let g:FerretVeryMagic=0
+<
+
*g:FerretExecutable*
|g:FerretExecutable| string (default: "rg,ag,ack,ack-grep")
*g:FerretQFMap*
|g:FerretQFMap| boolean (default: 1)
-Controls whether to set up mappings in the |quickfix| results window for
-deleting results. The mappings include:
+Controls whether to set up mappings in the |quickfix| results window and
+|location-list| for deleting results. The mappings include:
- `d` (|visual-mode|): delete visual selection
- `dd` (|Normal-mode|): delete current line
*FerretDidWrite* *FerretWillWrite*
For maximum compatibility with other plug-ins, Ferret runs the following
"User" autocommands before and after running the file writing operations
-during |:Acks|:
+during |:Acks| or |:Lacks|:
- FerretWillWrite
- FerretDidWrite
Ferret was originally the thinnest of wrappers (7 lines of code in my
|.vimrc|) around `ack`. The earliest traces of it can be seen in the initial
-commit to my dotfiles repo in May, 2009 (https://rfr.to/h).
+commit to my dotfiles repo in May, 2009 (https://wincent.com/h).
So, even though Ferret has a new name now and actually prefers `rg` then `ag`
over `ack`/`ack-grep` when available, I prefer to keep the command names intact
HISTORY *ferret-history*
-master (not yet released) ~
+5.0 (8 June 2019) ~
+
+- The |<Plug>(FerretAcks)| mapping now uses |/\v| "very magic" mode by default.
+ This default can be changed using the |g:FerretVeryMagic| option.
+- |:Acks| now preferentially uses |:cdo| (rather than |:cfdo|) to make
+ replacements, which means that it no longer operates on a per-file level
+ and instead targets individual entries within the |quickfix| window. This is
+ relevant if you've used Ferrets mappings to delete entries from the
+ window. The old behavior can be restored with the |g:FerretAcksCommand|
+ option.
+- Ferret now has a |:Lacks| command, an analog to |:Acks| which applies to the
+ |location-list|.
+- Likewise, Ferret now has a |:Largs| command, analogous to |:Qargs|, which
+ applies to the |location-list| instead of the |quickfix| window.
+- The Ferret bindings that are set-up in the |quickfix| window when
+ |g:FerretQFMap| is enabled now also apply to the |location-list|.
+
+4.1 (31 January 2019) ~
+
+- Added |:Quack| command, analogous to |:Ack| but scoped to the files currently
+ listed in the |quickfix| window.
+- Fixed option autocompletion.
+
+4.0.2 (11 January 2019) ~
+
+- Restore compatibility with versions of `rg` prior to v0.8
+ (https://github.com/wincent/ferret/issues/59).
+
+4.0.1 (8 January 2019) ~
+
+- Make |:Acks| behavior the same irrespective of the |'gdefault'| setting.
+
+4.0 (25 December 2018) ~
- Try to avoid "press ENTER to continue" prompts.
- Put search term in |w:quickfix_title| for use in statuslines
" Copyright 2015-present Greg Hurrell. All rights reserved.
" Licensed under the terms of the BSD 2-clause license.
+function! s:is_quickfix()
+ if exists('*getwininfo')
+ let l:info=getwininfo(win_getid())[0]
+ return l:info.quickfix && !l:info.loclist
+ else
+ " On old Vim, degrade such that we at least handle the common case (ie.
+ " quickfix windows).
+ return 1
+ endif
+endfunction
+
" Remove lines a:first through a:last from the quickfix listing.
function! s:delete(first, last)
- let l:list=getqflist()
+ let l:type=s:is_quickfix() ? 'qf' : 'location'
+ let l:list=l:type == 'qf' ? getqflist() : getloclist(0)
let l:line=a:first
while l:line >= a:first && l:line <= a:last
let l:list[l:line - 1]=0
let l:line=l:line + 1
endwhile
- call setqflist(l:list, 'r')
- " Go to next entry.
- execute 'cc ' . a:first
+ " Update listing and go to next entry.
+ if l:type ==# 'qf'
+ call setqflist(l:list, 'r')
+ execute 'cc ' . a:first
+ else
+ call setloclist(0, l:list, 'r')
+ execute 'll ' . a:first
+ endif
- " Move focus back to quickfix listing.
+ " Move focus back to listing.
execute "normal \<C-W>\<C-P>"
endfunction
call call('ferret#private#lack', [a:bang, a:args . ' ' . ferret#private#buflist()])
endfunction
+function! ferret#private#quack(bang, args) abort
+ if s:qfsize('qf') == 0
+ call ferret#private#error('Cannot search in empty quickfix list')
+ else
+ call call('ferret#private#ack', [a:bang, a:args . ' ' . ferret#private#args('qf')])
+ endif
+endfunction
+
function! ferret#private#installprompt() abort
call ferret#private#error(
\ 'Unable to find suitable executable; install rg, ag, ack or ack-grep'
"
" :Ack foo
" :Qargs
-" :argdo %s/foo/bar/ge | update
+" :argdo %substitute/foo/bar/ge | update
"
" and the following on Vim 8 or after:
"
" :Ack foo
-" :cfdo %s/foo/bar/ge | update
+" :cdo substitute/foo/bar/ge | update
+"
+" Note that if |g:FerretAcksCommand| is set to "cfdo" then this will be used
+" instead:
+"
+" :Ack foo
+" :cfdo %substitute/foo/bar/ge | update
"
" (Note: there's nothing specific to Ack in this function; it's just named this
" way for mnemonics, as it will most often be preceded by an :Ack invocation.)
-function! ferret#private#acks(command) abort
+function! ferret#private#acks(command, type) abort
" Accept any pattern allowed by E146 (crude sanity check).
let l:matches=matchlist(a:command, '\v\C^(([^|"\\a-zA-Z0-9]).+\2.*\2)([cgeiI]*)$')
if !len(l:matches)
endif
" Pass through options `c`, `i`/`I` to `:substitute`.
- " Add options `e` and `g` if not already present.
+ " Add options `e`, and `g` (if appropriate), if not already present.
let l:pattern=l:matches[1]
let l:options=l:matches[3]
if l:options !~# 'e'
- let l:options .= 'e'
+ let l:options.='e'
endif
- if l:options !~# 'g'
- let l:options .= 'g'
+ if !&gdefault
+ if l:options !~# 'g'
+ let l:options.='g'
+ else
+ " Make sure there is exactly one 'g' flag present, otherwise an even
+ " number of 'g' flags will actually cancel each other out.
+ let l:options=substitute(l:options, 'g', '', 'g') . 'g'
+ endif
+ elseif &gdefault && l:options =~# 'g'
+ " 'gdefault' inverts the meaning of the 'g' flag, so we must strip it.
+ let l:options=substitute(l:options, 'g', '', 'g')
endif
- let l:cfdo=has('listcmds') && exists(':cfdo') == 2
- if !l:cfdo
- let l:filenames=ferret#private#qargs()
+ let l:cdo=has('listcmds') && exists(':cdo') == 2
+ if !l:cdo
+ let l:filenames=ferret#private#args(a:type)
if l:filenames ==# ''
call ferret#private#error(
\ 'Ferret: Quickfix filenames must be present, but there are none ' .
endif
call ferret#private#autocmd('FerretWillWrite')
- if l:cfdo
- execute 'cfdo' '%s' . l:pattern . l:options . ' | update'
+
+ if l:cdo
+ if a:type == 'qf'
+ ""
+ " @option g:FerretAcksCommand string "cdo"
+ "
+ " Controls the underlying Vim command that |:Acks| uses to peform
+ " substitutions. On versions of Vim that have it, defaults to |:cdo|, which
+ " means that substitutions will apply to the specific lines currently in the
+ " |quickfix| listing. Can be set to "cfdo" to instead use |:cfdo| (if
+ " available), which means that the substitutions will be applied on a
+ " per-file basis to all the files in the |quickfix| listing. This
+ " distinction is important if you have used Ferret's bindings to delete
+ " entries from the listing.
+ "
+ " ```
+ " let g:FerretAcksCommand='cfdo'
+ " ```
+ "
+ if get(g:, 'FerretAcksCommand', 'cdo') == 'cfdo'
+ let l:command='cfdo'
+ let l:substitute='%substitute'
+ else
+ let l:command='cdo'
+ let l:substitute='substitute'
+ endif
+ else
+ ""
+ " @option g:FerretLacksCommand string "ldo"
+ "
+ " Controls the underlying Vim command that |:Lacks| uses to peform
+ " substitutions. On versions of Vim that have it, defaults to |:ldo|, which
+ " means that substitutions will apply to the specific lines currently in the
+ " |location-list|. Can be set to "lfdo" to instead use |:lfdo| (if
+ " available), which means that the substitutions will be applied on a
+ " per-file basis to all the files in the |location-list|. This
+ " distinction is important if you have used Ferret's bindings to delete
+ " entries from the listing.
+ "
+ " ```
+ " let g:FerretLacksCommand='lfdo'
+ " ```
+ "
+ if get(g:, 'FerretLacksCommand', 'ldo') == 'lfdo'
+ let l:command='lfdo'
+ let l:substitute='%substitute'
+ else
+ let l:command='ldo'
+ let l:substitute='substitute'
+ endif
+ endif
else
- execute 'argdo' '%s' . l:pattern . l:options . ' | update'
+ let l:command='argdo'
+ let l:substitute='%substitute'
endif
+
+ execute l:command l:substitute . l:pattern . l:options . ' | update'
+
call ferret#private#autocmd('FerretDidWrite')
endfunction
+""
+" @option g:FerretVeryMagic boolean 1
+"
+" Controls whether the |<Plug>(FerretAck)| mapping should populate the command
+" line with the |/\v| "very magic" marker. Given that the argument passed to
+" |:Acks| is handed straight to Vim, using "very magic" makes it more likely
+" that the (probably Perl-compatible) regular expression used in the initial
+" search can be used directly with Vim's (famously not-Perl-compatible) regular
+" expression engine.
+"
+" To prevent the automatic use of |/\v|, set this option to 0:
+"
+" ```
+" let g:FerretVeryMagic=0
+" ```
+function! ferret#private#acks_prompt() abort
+ let l:magic=get(g:, 'FerretVeryMagic', 1)
+ let l:mode=l:magic ? '\v' : ''
+ if exists('g:ferret_lastsearch')
+ return '/' . l:mode . g:ferret_lastsearch . '// '
+ else
+ return '/' . l:mode . '//'
+ endif
+endfunction
+
function! ferret#private#autocmd(cmd) abort
if v:version > 703 || v:version == 703 && has('patch438')
execute 'silent doautocmd <nomodeline> User ' . a:cmd
endfunction
function! ferret#private#backcomplete(arglead, cmdline, cursorpos) abort
- return ferret#private#complete('Lack', a:arglead, a:cmdline, a:cursorpos, 0)
+ return ferret#private#complete('Back', a:arglead, a:cmdline, a:cursorpos, 0)
endfunction
function! ferret#private#blackcomplete(arglead, cmdline, cursorpos) abort
- return ferret#private#complete('Lack', a:arglead, a:cmdline, a:cursorpos, 0)
+ return ferret#private#complete('Black', a:arglead, a:cmdline, a:cursorpos, 0)
endfunction
function! ferret#private#lackcomplete(arglead, cmdline, cursorpos) abort
return ferret#private#complete('Lack', a:arglead, a:cmdline, a:cursorpos, 1)
endfunction
+function! ferret#private#quackcomplete(arglead, cmdline, cursorpos) abort
+ return ferret#private#complete('Quack', a:arglead, a:cmdline, a:cursorpos, 0)
+endfunction
+
" Return first word (the name of the binary) of the executable string.
function! ferret#private#executable_name()
let l:executable=ferret#private#executable()
- let l:binary=matchstr(l:executable, '\v\w+')
+ return matchstr(l:executable, '\v\w+')
endfunction
let s:options={
return a:str =~# '^-'
endfunction
-" Populate the :args list with the filenames currently in the quickfix window.
-function! ferret#private#qargs() abort
+" Populate the :args list with the filenames currently in the quickfix window or
+" location list.
+function! ferret#private#args(type) abort
let l:buffer_numbers={}
- for l:item in getqflist()
- let l:buffer_numbers[l:item['bufnr']]=bufname(l:item['bufnr'])
+ let l:items=a:type == 'qf' ? getqflist() : getloclist(0)
+ for l:item in l:items
+ let l:number=l:item['bufnr']
+ if !has_key(l:buffer_numbers, l:number)
+ let l:buffer_numbers[l:number]=bufname(l:number)
+ endif
endfor
return join(map(values(l:buffer_numbers), 'fnameescape(v:val)'))
endfunction
" Base set of default arguments for each executable; these get extended by
" ferret#private#init() upon startup.
let s:executables={
- \ 'rg': '--vimgrep --no-config --no-heading',
+ \ 'rg': '--vimgrep --no-heading',
\ 'ag': '',
\ 'ack': '--column --with-filename',
\ 'ack-grep': '--column --with-filename'
return
endif
- if executable('rg') && match(system('rg --help'), '--max-columns') != -1
- let s:executables['rg'].=' --max-columns 4096'
+ if executable('rg')
+ let l:rg_help=system('rg --help')
+ if match(l:rg_help, '--no-config') != -1
+ let s:executables['rg'].=' --no-config'
+ endif
+ if match(l:rg_help, '--max-columns') != -1
+ let s:executables['rg'].=' --max-columns 4096'
+ endif
endif
if executable('ag')
setlocal nowrap
setlocal number
- " Want to set scrolloff only for the qf window, but it is a global option.
- let s:original_scrolloff=&scrolloff
+ " Want to set scrolloff only for the qf window, but it is a
+ " unavoidably global option for which `setlocal` behaves just like `set`.
+ if !exists('s:original_scrolloff')
+ let s:original_scrolloff=&scrolloff
+ endif
set scrolloff=0
if has('autocmd')
""
" @option g:FerretQFMap boolean 1
"
-" Controls whether to set up mappings in the |quickfix| results window for
-" deleting results. The mappings include:
+" Controls whether to set up mappings in the |quickfix| results window and
+" |location-list| for deleting results. The mappings include:
"
" - `d` (|visual-mode|): delete visual selection
" - `dd` (|Normal-mode|): delete current line
" ```
let s:map=get(g:, 'FerretQFMap', 1)
if s:map
- " Make it easy to remove entries from the quickfix listing.
- " TODO: distinguish between quickfix and location list
+ " Make it easy to remove entries from the quickfix listing or location-list.
nnoremap <buffer> <silent> d :set operatorfunc=ferret#private#qf_delete_motion<CR>g@
nnoremap <buffer> <silent> dd :call ferret#private#qf_delete()<CR>
vnoremap <buffer> <silent> d :call ferret#private#qf_delete()<CR>
" Copyright 2015-present Greg Hurrell. All rights reserved.
" Licensed under the terms of the BSD 2-clause license.
+""
+" @header
+"
+" @image https://raw.githubusercontent.com/wincent/ferret/media/ferret.jpg center
+" @image https://raw.githubusercontent.com/wincent/ferret/media/ferret.gif center
+"
+
""
" @plugin ferret Ferret plug-in for Vim
"
" |location-list| instead, and a <leader>l mapping as a shortcut to |:Lack|.
"
" |:Back| and |:Black| are analogous to |:Ack| and |:Lack|, but scoped to search
-" within currently open buffers only.
+" within currently open buffers only. |:Quack| is scoped to search among the
+" files currently in the |quickfix| list.
"
" ## 2. Streamlined multi-file replace
"
" The companion to |:Ack| is |:Acks| (mnemonic: "Ack substitute", accessible via
" shortcut <leader>r), which allows you to run a multi-file replace across all
" the files placed in the |quickfix| window by a previous invocation of |:Ack|
-" (or |:Back|).
+" (or |:Back|, or |:Quack|).
+"
+" Correspondingly, results obtained by |:Lack| can be targeted for replacement
+" with |:Lacks|.
"
" ## 3. Quickfix listing enhancements
"
" the |quickfix| listing into the |:args| list, where they can be operated on in
" bulk via the |:argdo| command. This is what's used under the covers on older
" versions of Vim by |:Acks| to do its work (on newer versions the built-in
-" |:cfdo| is used instead).
+" |:cdo| or |:cfdo| are used instead).
"
+" Ferret also provides a |:Largs| command, which is a |location-list| analog
+" for |:Qargs|.
"
" # Installation
"
" *FerretWillWrite* *FerretDidWrite*
" For maximum compatibility with other plug-ins, Ferret runs the following
" "User" autocommands before and after running the file writing operations
-" during |:Acks|:
+" during |:Acks| or |:Lacks|:
"
" - FerretWillWrite
" - FerretDidWrite
"
" Ferret was originally the thinnest of wrappers (7 lines of code in my
" |.vimrc|) around `ack`. The earliest traces of it can be seen in the initial
-" commit to my dotfiles repo in May, 2009 (https://rfr.to/h).
+" commit to my dotfiles repo in May, 2009 (https://wincent.com/h).
"
" So, even though Ferret has a new name now and actually prefers `rg` then `ag`
" over `ack`/`ack-grep` when available, I prefer to keep the command names
"
" # History
"
-" ## master (not yet released)
+" ## 5.0 (8 June 2019)
+"
+" - The |<Plug>(FerretAcks)| mapping now uses |/\v| "very magic" mode by
+" default. This default can be changed using the |g:FerretVeryMagic| option.
+" - |:Acks| now preferentially uses |:cdo| (rather than |:cfdo|) to make
+" replacements, which means that it no longer operates on a per-file level and
+" instead targets individual entries within the |quickfix| window. This is
+" relevant if you've used Ferrets mappings to delete entries from the window.
+" The old behavior can be restored with the |g:FerretAcksCommand| option.
+" - Ferret now has a |:Lacks| command, an analog to |:Acks| which applies to the
+" |location-list|.
+" - Likewise, Ferret now has a |:Largs| command, analogous to |:Qargs|, which
+" applies to the |location-list| instead of the |quickfix| window.
+" - The Ferret bindings that are set-up in the |quickfix| window when
+" |g:FerretQFMap| is enabled now also apply to the |location-list|.
+"
+" ## 4.1 (31 January 2019)
+"
+" - Added |:Quack| command, analogous to |:Ack| but scoped to the files
+" currently listed in the |quickfix| window.
+" - Fixed option autocompletion.
+"
+" ## 4.0.2 (11 January 2019)
+"
+" - Restore compatibility with versions of `rg` prior to v0.8
+" (https://github.com/wincent/ferret/issues/59).
+"
+" ## 4.0.1 (8 January 2019)
+"
+" - Make |:Acks| behavior the same irrespective of the |'gdefault'| setting.
+"
+" ## 4.0 (25 December 2018)
"
" - Try to avoid "press ENTER to continue" prompts.
" - Put search term in |w:quickfix_title| for use in statuslines
"
command! -bang -nargs=1 -complete=customlist,ferret#private#blackcomplete Black call ferret#private#black(<bang>0, <q-args>)
+""
+" @command :Quack {pattern} {options}
+"
+" Like |:Ack|, but searches only among files currently in the |quickfix|
+" listing. Note that the search is still delegated to the underlying
+" |'grepprg'| (`rg`, `ag`, `ack` or `ack-grep`), which means that only
+" buffers written to disk will be searched. If no buffers are written
+" to disk, then |:Quack| behaves exactly like |:Ack| and will search all
+" files in the current directory.
+"
+" @command :Quack! {pattern} {options}
+"
+" Like |:Quack|, but returns all results irrespective of the value of
+" |g:FerretMaxResults|.
+"
+command! -bang -nargs=1 -complete=customlist,ferret#private#quackcomplete Quack call ferret#private#quack(<bang>0, <q-args>)
+
""
" @command :Acks /{pattern}/{replacement}/
"
" ```
" :Acks /\v(foo\d+)(bar)/\2\1/
" ```
-command! -nargs=1 Acks call ferret#private#acks(<q-args>)
+command! -nargs=1 Acks call ferret#private#acks(<q-args>, 'qf')
+
+""
+" @command :Lacks /{pattern}/{replacement}/
+"
+" Takes all of the files in the current |location-list| and performs a
+" substitution of all instances of {pattern} by {replacement}. This is an analog
+" of the |:Acks| command, but operates on the |location-list| instead of the
+" |quickfix| listing.
+"
+command! -nargs=1 Lacks call ferret#private#acks(<q-args>, 'location')
""
" @command :FerretCancelAsync
" @command :FerretPullAsync
"
" Eagerly populates the |quickfix| (or |location-list|) window with any results
-" that may have been produced by a long-running asynchronoous search in progress
+" that may have been produced by a long-running asynchronous search in progress
" in the background.
"
command! FerretPullAsync call ferret#private#async#pull()
nnoremap <Plug>(FerretAck) :Ack<space>
nnoremap <Plug>(FerretLack) :Lack<space>
nnoremap <Plug>(FerretAckWord) :Ack <C-r><C-w><CR>
-nnoremap <Plug>(FerretAcks)
- \ :Acks <c-r>=(exists('g:ferret_lastsearch') ? '/' . g:ferret_lastsearch . '//' : ' ')<CR><Left>
+nnoremap <Plug>(FerretAcks) :Acks <c-r>=(ferret#private#acks_prompt())<CR><Left><Left>
""
" @option g:FerretMap boolean 1
"
" It takes the files currently in the |quickfix| listing and sets them as
" |:args| so that they can be operated on en masse via the |:argdo| command.
-command! -bar Qargs execute 'args' ferret#private#qargs()
+command! -bar Qargs execute 'args' ferret#private#args('qf')
+
+""
+" @command :Largs
+"
+" Just like |:Qargs|, but applies to the current |location-list|.
+"
+" It takes the files in the current |location-list| and sets them as
+" |:args| so that they can be operated on en masse via the |:argdo| command.
+command! -bar Largs execute 'args' ferret#private#args('location')
""
" @option g:FerretQFCommands boolean 1
Project
- [ DocBlock
- [ PluginAnnotation "loupe" "Loupe plug-in for Vim"
- , TOC
- [ "Intro"
- , "Installation"
- , "Mappings"
- , "Options"
- , "Functions"
- , "Overrides"
- , "Related"
- , "Website"
- , "License"
- , "Development"
- , "Authors"
- , "History"
+ [ Project
+ [ Unit
+ [ FunctionDeclaration
+ { functionBang = True
+ , functionName = "loupe#hlmatch"
+ , functionArguments = ArgumentList []
+ , functionAttributes = [ "abort" ]
+ , functionBody =
+ [ Empty
+ , LetStatement
+ { letLexpr = "l:highlight"
+ , letValue = "get(g:, 'LoupeHighlightGroup', 'IncSearch')"
+ }
+ , GenericStatement "if empty(l:highlight)"
+ , GenericStatement "return"
+ , GenericStatement "endif"
+ , GenericStatement "if has('autocmd')"
+ , GenericStatement "augroup LoupeHightlightMatch"
+ , GenericStatement "autocmd!"
+ , GenericStatement "augroup END"
+ , GenericStatement "endif"
+ , GenericStatement "call loupe#private#clear_highlight()"
+ , LetStatement
+ { letLexpr = "l:pattern" , letValue = "'\\c\\%#' . @/" }
+ , GenericStatement "if exists('*matchadd')"
+ , LetStatement
+ { letLexpr = "w:loupe_hlmatch"
+ , letValue = "matchadd(l:highlight, l:pattern)"
+ }
+ , GenericStatement "endif"
+ ]
+ }
]
- ]
- , HeadingAnnotation "Intro"
- , Blockquote
- [ Paragraph
- [ Plaintext "\"loupe"
- , Whitespace
- , Plaintext "(noun)"
- , BreakTag
- , Plaintext "a"
- , Whitespace
- , Plaintext "small"
- , Whitespace
- , Plaintext "magnifying"
- , Whitespace
- , Plaintext "glass"
- , Whitespace
- , Plaintext "used"
- , Whitespace
- , Plaintext "by"
- , Whitespace
- , Plaintext "jewelers"
- , Whitespace
- , Plaintext "and"
- , Whitespace
- , Plaintext "watchmakers.\""
+ , Unit
+ [ FunctionDeclaration
+ { functionBang = True
+ , functionName = "loupe#private#very_magic_slash"
+ , functionArguments = ArgumentList [ Argument "slash" ]
+ , functionAttributes = [ "abort" ]
+ , functionBody =
+ [ GenericStatement "if getcmdtype() != ':'"
+ , GenericStatement "return a:slash"
+ , GenericStatement "endif"
+ , LetStatement { letLexpr = "l:pos" , letValue = "getcmdpos()" }
+ , LetStatement { letLexpr = "l:cmd" , letValue = "getcmdline()" }
+ , GenericStatement "if len(l:cmd) + 1 != l:pos"
+ , GenericStatement "return a:slash"
+ , GenericStatement "endif"
+ , GenericStatement "while 1"
+ , LetStatement
+ { letLexpr = "l:stripped" , letValue = "s:strip_ranges(l:cmd)" }
+ , GenericStatement "if l:stripped ==# l:cmd"
+ , GenericStatement "break"
+ , GenericStatement "else"
+ , LetStatement { letLexpr = "l:cmd" , letValue = "l:stripped" }
+ , GenericStatement "endif"
+ , GenericStatement "endwhile"
+ , GenericStatement "if index(['g', 's', 'v'], l:cmd) != -1"
+ , GenericStatement
+ "return loupe#private#prepare_highlight(a:slash . '\\v')"
+ , GenericStatement "endif"
+ , GenericStatement "return a:slash"
+ ]
+ }
+ , FunctionDeclaration
+ { functionBang = True
+ , functionName = "s:strip_ranges"
+ , functionArguments = ArgumentList [ Argument "cmdline" ]
+ , functionAttributes = []
+ , functionBody =
+ [ LetStatement { letLexpr = "l:cmdline" , letValue = "a:cmdline" }
+ , LetStatement
+ { letLexpr = "l:modifier" , letValue = "'\\([+-]\\d*\\)*'" }
+ , LetStatement
+ { letLexpr = "l:cmdline"
+ , letValue =
+ "substitute(l:cmdline, '^\\d\\+' . l:modifier, '', '') \" line number"
+ }
+ , LetStatement
+ { letLexpr = "l:cmdline"
+ , letValue =
+ "substitute(l:cmdline, '^\\.' . l:modifier, '', '') \" current line"
+ }
+ , LetStatement
+ { letLexpr = "l:cmdline"
+ , letValue =
+ "substitute(l:cmdline, '^$' . l:modifier, '', '') \" last line in file"
+ }
+ , LetStatement
+ { letLexpr = "l:cmdline"
+ , letValue =
+ "substitute(l:cmdline, '^%' . l:modifier, '', '') \" entire file"
+ }
+ , LetStatement
+ { letLexpr = "l:cmdline"
+ , letValue =
+ "substitute(l:cmdline, \"^'[a-z]\\\\c\" . l:modifier, '', '') \" mark t (or T)"
+ }
+ , LetStatement
+ { letLexpr = "l:cmdline"
+ , letValue =
+ "substitute(l:cmdline, \"^'[<>]\" . l:modifier, '', '') \" visual selection marks"
+ }
+ , LetStatement
+ { letLexpr = "l:cmdline"
+ , letValue =
+ "substitute(l:cmdline, '^/[^/]\\+/' . l:modifier, '', '') \" /{pattern}/"
+ }
+ , LetStatement
+ { letLexpr = "l:cmdline"
+ , letValue =
+ "substitute(l:cmdline, '^?[^?]\\+?' . l:modifier, '', '') \" ?{pattern}?"
+ }
+ , LetStatement
+ { letLexpr = "l:cmdline"
+ , letValue =
+ "substitute(l:cmdline, '^\\\\/' . l:modifier, '', '') \" \\/ (next match of previous pattern)"
+ }
+ , LetStatement
+ { letLexpr = "l:cmdline"
+ , letValue =
+ "substitute(l:cmdline, '^\\\\?' . l:modifier, '', '') \" \\? (last match of previous pattern)"
+ }
+ , LetStatement
+ { letLexpr = "l:cmdline"
+ , letValue =
+ "substitute(l:cmdline, '^\\\\&' . l:modifier, '', '') \" \\& (last match of previous substitution)"
+ }
+ , LetStatement
+ { letLexpr = "l:cmdline"
+ , letValue = "substitute(l:cmdline, '^,', '', '') \" , (separator)"
+ }
+ , LetStatement
+ { letLexpr = "l:cmdline"
+ , letValue = "substitute(l:cmdline, '^;', '', '') \" ; (separator)"
+ }
+ , GenericStatement "return l:cmdline"
+ ]
+ }
+ , FunctionDeclaration
+ { functionBang = True
+ , functionName = "loupe#private#prepare_highlight"
+ , functionArguments = ArgumentList [ Argument "result" ]
+ , functionAttributes = [ "abort" ]
+ , functionBody =
+ [ GenericStatement "if has('autocmd')"
+ , GenericStatement "augroup LoupeHightlightMatch"
+ , GenericStatement "autocmd!"
+ , GenericStatement "autocmd CursorMoved * :call loupe#hlmatch()"
+ , GenericStatement "augroup END"
+ , GenericStatement "endif"
+ , GenericStatement "return a:result"
+ ]
+ }
+ , FunctionDeclaration
+ { functionBang = True
+ , functionName = "loupe#private#clear_highlight"
+ , functionArguments = ArgumentList []
+ , functionAttributes = [ "abort" ]
+ , functionBody =
+ [ GenericStatement "if exists('w:loupe_hlmatch')"
+ , GenericStatement "try"
+ , GenericStatement "call matchdelete(w:loupe_hlmatch)"
+ , GenericStatement "catch /\\v<(E802|E803)>/"
+ , GenericStatement "finally"
+ , UnletStatement
+ { unletBang = False , unletBody = "w:loupe_hlmatch" }
+ , GenericStatement "endtry"
+ , GenericStatement "endif"
+ ]
+ }
+ , FunctionDeclaration
+ { functionBang = True
+ , functionName = "loupe#private#cleanup"
+ , functionArguments = ArgumentList []
+ , functionAttributes = [ "abort" ]
+ , functionBody =
+ [ GenericStatement "if !exists('v:hlsearch') || !v:hlsearch"
+ , GenericStatement "call loupe#private#clear_highlight()"
+ , GenericStatement "endif"
+ ]
+ }
]
- ]
- , LinkTargets [ "loupe-features" ]
- , Paragraph
- [ Plaintext "Loupe"
- , Whitespace
- , Plaintext "enhances"
- , Whitespace
- , Plaintext "Vim's"
- , Whitespace
- , Link "search-commands"
- , Whitespace
- , Plaintext "in"
- , Whitespace
- , Plaintext "four"
- , Whitespace
- , Plaintext "ways:"
- ]
- , SubheadingAnnotation
- "1. Makes the currently selected match easier to see"
- , Paragraph
- [ Plaintext "When"
- , Whitespace
- , Plaintext "searching"
- , Whitespace
- , Plaintext "using"
- , Whitespace
- , Link "/"
- , Plaintext ","
- , Whitespace
- , Link "?"
- , Plaintext ","
- , Whitespace
- , Link "star"
- , Plaintext ","
- , Whitespace
- , Link "#"
- , Plaintext ","
+ , Unit
+ [ GenericStatement
+ "if exists('g:LoupeLoaded') || &compatible || v:version < 700"
+ , GenericStatement "finish"
+ , GenericStatement "endif"
+ , LetStatement { letLexpr = "g:LoupeLoaded" , letValue = "1" }
+ , LetStatement
+ { letLexpr = "s:cpoptions" , letValue = "&cpoptions" }
+ , GenericStatement "set cpoptions&vim"
+ , GenericStatement "if &history < 1000"
+ , GenericStatement
+ "set history=1000 \" Longer search and command history (default is 50)."
+ , GenericStatement "endif"
+ , GenericStatement "if has('extra_search')"
+ , GenericStatement "set hlsearch \" Highlight search strings."
+ , GenericStatement
+ "set incsearch \" Incremental search (\"find as you type\")."
+ , GenericStatement "endif"
+ , GenericStatement "set ignorecase \" Ignore case when searching."
+ , GenericStatement
+ "set shortmess+=s \" Don't echo search wrap messages."
+ , GenericStatement
+ "set smartcase \" Case-sensitive search if search string includes a capital letter."
+ , LetStatement
+ { letLexpr = "s:clear"
+ , letValue = "get(g:, 'LoupeClearHighlightMap', 1)"
+ }
+ , GenericStatement "if s:clear"
+ , GenericStatement
+ "if !hasmapto('<Plug>(LoupeClearHighlight)') && maparg('<leader>n', 'n') ==# ''"
+ , GenericStatement
+ "nmap <silent> <unique> <leader>n <Plug>(LoupeClearHighlight)"
+ , GenericStatement "endif"
+ , GenericStatement "endif"
+ , GenericStatement
+ "nnoremap <silent> <Plug>(LoupeClearHighlight) :nohlsearch<bar> call loupe#private#clear_highlight()<CR>"
+ , GenericStatement
+ "cnoreabbrev <silent> <expr> noh (getcmdtype() == ':' && getcmdpos() == 4 ? 'noh <bar> call loupe#private#clear_highlight()' : 'noh')"
+ , GenericStatement
+ "cnoreabbrev <silent> <expr> nohl (getcmdtype() == ':' && getcmdpos() == 5 ? 'nohl <bar> call loupe#private#clear_highlight()' : 'nohl')"
+ , GenericStatement
+ "cnoreabbrev <silent> <expr> nohls (getcmdtype() == ':' && getcmdpos() == 6 ? 'nohls <bar> call loupe#private#clear_highlight()' : 'nohls')"
+ , GenericStatement
+ "cnoreabbrev <silent> <expr> nohlse (getcmdtype() == ':' && getcmdpos() == 7 ? 'nohlse <bar> call loupe#private#clear_highlight()' : 'nohlse')"
+ , GenericStatement
+ "cnoreabbrev <silent> <expr> nohlsea (getcmdtype() == ':' && getcmdpos() == 8 ? 'nohlsea <bar> call loupe#private#clear_highlight()' : 'nohlsea')"
+ , GenericStatement
+ "cnoreabbrev <silent> <expr> nohlsear (getcmdtype() == ':' && getcmdpos() == 9 ? 'nohlsear <bar> call loupe#private#clear_highlight()' : 'nohlsear')"
+ , GenericStatement
+ "cnoreabbrev <silent> <expr> nohlsearc (getcmdtype() == ':' && getcmdpos() == 10 ? 'nohlsearc <bar> call loupe#private#clear_highlight()' : 'nohlsearc')"
+ , GenericStatement
+ "cnoreabbrev <silent> <expr> nohlsearch (getcmdtype() == ':' && getcmdpos() == 11 ? 'nohlsearch <bar> call loupe#private#clear_highlight()' : 'nohlsearch')"
+ , FunctionDeclaration
+ { functionBang = False
+ , functionName = "s:MagicString"
+ , functionArguments = ArgumentList []
+ , functionAttributes = []
+ , functionBody =
+ [ LetStatement
+ { letLexpr = "s:magic"
+ , letValue = "get(g:, 'LoupeVeryMagic', 1)"
+ }
+ , GenericStatement "return s:magic ? '\\v' : ''"
+ ]
+ }
+ , GenericStatement
+ "nnoremap <expr> / loupe#private#prepare_highlight('/' . <SID>MagicString())"
+ , GenericStatement
+ "nnoremap <expr> ? loupe#private#prepare_highlight('?' . <SID>MagicString())"
+ , GenericStatement
+ "xnoremap <expr> / loupe#private#prepare_highlight('/' . <SID>MagicString())"
+ , GenericStatement
+ "xnoremap <expr> ? loupe#private#prepare_highlight('?' . <SID>MagicString())"
+ , GenericStatement "if !empty(s:MagicString())"
+ , GenericStatement
+ "cnoremap <expr> ! loupe#private#very_magic_slash('!')"
+ , GenericStatement
+ "cnoremap <expr> # loupe#private#very_magic_slash('#')"
+ , GenericStatement
+ "cnoremap <expr> $ loupe#private#very_magic_slash('$')"
+ , GenericStatement
+ "cnoremap <expr> % loupe#private#very_magic_slash('%')"
+ , GenericStatement
+ "cnoremap <expr> & loupe#private#very_magic_slash('&')"
+ , GenericStatement
+ "cnoremap <expr> ' loupe#private#very_magic_slash(\"'\")"
+ , GenericStatement
+ "cnoremap <expr> ( loupe#private#very_magic_slash('(')"
+ , GenericStatement
+ "cnoremap <expr> ) loupe#private#very_magic_slash(')')"
+ , GenericStatement
+ "cnoremap <expr> * loupe#private#very_magic_slash('*')"
+ , GenericStatement
+ "cnoremap <expr> + loupe#private#very_magic_slash('+')"
+ , GenericStatement
+ "cnoremap <expr> , loupe#private#very_magic_slash(',')"
+ , GenericStatement
+ "cnoremap <expr> - loupe#private#very_magic_slash('-')"
+ , GenericStatement
+ "cnoremap <expr> . loupe#private#very_magic_slash('.')"
+ , GenericStatement
+ "cnoremap <expr> / loupe#private#very_magic_slash('/')"
+ , GenericStatement
+ "cnoremap <expr> : loupe#private#very_magic_slash(':')"
+ , GenericStatement
+ "cnoremap <expr> ; loupe#private#very_magic_slash(';')"
+ , GenericStatement
+ "cnoremap <expr> < loupe#private#very_magic_slash('<')"
+ , GenericStatement
+ "cnoremap <expr> = loupe#private#very_magic_slash('=')"
+ , GenericStatement
+ "cnoremap <expr> > loupe#private#very_magic_slash('>')"
+ , GenericStatement
+ "cnoremap <expr> ? loupe#private#very_magic_slash('?')"
+ , GenericStatement
+ "cnoremap <expr> @ loupe#private#very_magic_slash('@')"
+ , GenericStatement
+ "cnoremap <expr> [ loupe#private#very_magic_slash('[')"
+ , GenericStatement
+ "cnoremap <expr> ] loupe#private#very_magic_slash(']')"
+ , GenericStatement
+ "cnoremap <expr> ^ loupe#private#very_magic_slash('^')"
+ , GenericStatement
+ "cnoremap <expr> _ loupe#private#very_magic_slash('_')"
+ , GenericStatement
+ "cnoremap <expr> ` loupe#private#very_magic_slash('`')"
+ , GenericStatement
+ "cnoremap <expr> { loupe#private#very_magic_slash('{')"
+ , GenericStatement
+ "cnoremap <expr> } loupe#private#very_magic_slash('}')"
+ , GenericStatement
+ "cnoremap <expr> ~ loupe#private#very_magic_slash('~')"
+ , GenericStatement "endif"
+ , FunctionDeclaration
+ { functionBang = True
+ , functionName = "s:map"
+ , functionArguments =
+ ArgumentList [ Argument "keys" , Argument "name" ]
+ , functionAttributes = []
+ , functionBody =
+ [ Empty
+ , LetStatement
+ { letLexpr = "s:center"
+ , letValue = "get(g:, 'LoupeCenterResults', 1)"
+ }
+ , LetStatement
+ { letLexpr = "s:center_string"
+ , letValue = "s:center ? 'zz' : ''"
+ }
+ , GenericStatement "if !hasmapto('<Plug>(Loupe' . a:name . ')')"
+ , GenericStatement
+ "execute 'nmap <silent> ' . a:keys . ' <Plug>(Loupe' . a:name . ')'"
+ , GenericStatement "endif"
+ , GenericStatement
+ "execute 'nnoremap <silent> <Plug>(Loupe' . a:name . ')' . ' ' . a:keys . s:center_string . ':call loupe#hlmatch()<CR>'"
+ ]
+ }
+ , GenericStatement "call s:map('#', 'Octothorpe')"
+ , GenericStatement "call s:map('*', 'Star')"
+ , GenericStatement "call s:map('N', 'N')"
+ , GenericStatement "call s:map('g#', 'GOctothorpe')"
+ , GenericStatement "call s:map('g*', 'GStar')"
+ , GenericStatement "call s:map('n', 'n')"
+ , GenericStatement "if has('autocmd') && has('extra_search')"
+ , GenericStatement "augroup LoupeCleanUp"
+ , GenericStatement "autocmd!"
+ , GenericStatement
+ "autocmd WinEnter * :call loupe#private#cleanup()"
+ , GenericStatement "augroup END"
+ , GenericStatement "endif"
+ , LetStatement
+ { letLexpr = "&cpoptions" , letValue = "s:cpoptions" }
+ , UnletStatement { unletBang = False , unletBody = "s:cpoptions" }
+ ]
+ ]
+ , DocBlock
+ [ PluginAnnotation "loupe" "Loupe plug-in for Vim"
+ , TOC
+ [ "Intro"
+ , "Installation"
+ , "Mappings"
+ , "Options"
+ , "Functions"
+ , "Overrides"
+ , "Related"
+ , "Website"
+ , "License"
+ , "Development"
+ , "Authors"
+ , "History"
+ ]
+ ]
+ , HeadingAnnotation "Intro"
+ , Blockquote
+ [ Paragraph
+ [ Plaintext "\"loupe"
+ , Whitespace
+ , Plaintext "(noun)"
+ , BreakTag
+ , Plaintext "a"
+ , Whitespace
+ , Plaintext "small"
+ , Whitespace
+ , Plaintext "magnifying"
+ , Whitespace
+ , Plaintext "glass"
+ , Whitespace
+ , Plaintext "used"
+ , Whitespace
+ , Plaintext "by"
+ , Whitespace
+ , Plaintext "jewelers"
+ , Whitespace
+ , Plaintext "and"
+ , Whitespace
+ , Plaintext "watchmakers.\""
+ ]
+ ]
+ , LinkTargets [ "loupe-features" ]
+ , Paragraph
+ [ Plaintext "Loupe"
+ , Whitespace
+ , Plaintext "enhances"
+ , Whitespace
+ , Plaintext "Vim's"
+ , Whitespace
+ , Link "search-commands"
+ , Whitespace
+ , Plaintext "in"
+ , Whitespace
+ , Plaintext "four"
+ , Whitespace
+ , Plaintext "ways:"
+ ]
+ , SubheadingAnnotation
+ "1. Makes the currently selected match easier to see"
+ , Paragraph
+ [ Plaintext "When"
+ , Whitespace
+ , Plaintext "searching"
+ , Whitespace
+ , Plaintext "using"
+ , Whitespace
+ , Link "/"
+ , Plaintext ","
+ , Whitespace
+ , Link "?"
+ , Plaintext ","
+ , Whitespace
+ , Link "star"
+ , Plaintext ","
+ , Whitespace
+ , Link "#"
+ , Plaintext ","
, Whitespace
, Link "n"
, Plaintext ","
, Plaintext "with:"
]
, Fenced [ ":call pathogen#helptags()" ]
- , Project
- [ Unit
- [ FunctionDeclaration
- { functionBang = True
- , functionName = "loupe#hlmatch"
- , functionArguments = ArgumentList []
- , functionAttributes = [ "abort" ]
- , functionBody =
- [ Empty
- , LetStatement
- { letLexpr = "l:highlight"
- , letValue = "get(g:, 'LoupeHighlightGroup', 'IncSearch')"
- }
- , GenericStatement "if empty(l:highlight)"
- , GenericStatement "return"
- , GenericStatement "endif"
- , GenericStatement "if has('autocmd')"
- , GenericStatement "augroup LoupeHightlightMatch"
- , GenericStatement "autocmd!"
- , GenericStatement "augroup END"
- , GenericStatement "endif"
- , GenericStatement "call loupe#private#clear_highlight()"
- , LetStatement
- { letLexpr = "l:pattern" , letValue = "'\\c\\%#' . @/" }
- , GenericStatement "if exists('*matchadd')"
- , LetStatement
- { letLexpr = "w:loupe_hlmatch"
- , letValue = "matchadd(l:highlight, l:pattern)"
- }
- , GenericStatement "endif"
- ]
- }
- ]
- , Unit
- [ FunctionDeclaration
- { functionBang = True
- , functionName = "loupe#private#very_magic_slash"
- , functionArguments = ArgumentList [ Argument "slash" ]
- , functionAttributes = [ "abort" ]
- , functionBody =
- [ GenericStatement "if getcmdtype() != ':'"
- , GenericStatement "return a:slash"
- , GenericStatement "endif"
- , LetStatement { letLexpr = "l:pos" , letValue = "getcmdpos()" }
- , LetStatement { letLexpr = "l:cmd" , letValue = "getcmdline()" }
- , GenericStatement "if len(l:cmd) + 1 != l:pos"
- , GenericStatement "return a:slash"
- , GenericStatement "endif"
- , GenericStatement "while 1"
- , LetStatement
- { letLexpr = "l:stripped" , letValue = "s:strip_ranges(l:cmd)" }
- , GenericStatement "if l:stripped ==# l:cmd"
- , GenericStatement "break"
- , GenericStatement "else"
- , LetStatement { letLexpr = "l:cmd" , letValue = "l:stripped" }
- , GenericStatement "endif"
- , GenericStatement "endwhile"
- , GenericStatement "if index(['g', 's', 'v'], l:cmd) != -1"
- , GenericStatement
- "return loupe#private#prepare_highlight(a:slash . '\\v')"
- , GenericStatement "endif"
- , GenericStatement "return a:slash"
- ]
- }
- , FunctionDeclaration
- { functionBang = True
- , functionName = "s:strip_ranges"
- , functionArguments = ArgumentList [ Argument "cmdline" ]
- , functionAttributes = []
- , functionBody =
- [ LetStatement { letLexpr = "l:cmdline" , letValue = "a:cmdline" }
- , LetStatement
- { letLexpr = "l:modifier" , letValue = "'\\([+-]\\d*\\)*'" }
- , LetStatement
- { letLexpr = "l:cmdline"
- , letValue =
- "substitute(l:cmdline, '^\\d\\+' . l:modifier, '', '') \" line number"
- }
- , LetStatement
- { letLexpr = "l:cmdline"
- , letValue =
- "substitute(l:cmdline, '^\\.' . l:modifier, '', '') \" current line"
- }
- , LetStatement
- { letLexpr = "l:cmdline"
- , letValue =
- "substitute(l:cmdline, '^$' . l:modifier, '', '') \" last line in file"
- }
- , LetStatement
- { letLexpr = "l:cmdline"
- , letValue =
- "substitute(l:cmdline, '^%' . l:modifier, '', '') \" entire file"
- }
- , LetStatement
- { letLexpr = "l:cmdline"
- , letValue =
- "substitute(l:cmdline, \"^'[a-z]\\\\c\" . l:modifier, '', '') \" mark t (or T)"
- }
- , LetStatement
- { letLexpr = "l:cmdline"
- , letValue =
- "substitute(l:cmdline, \"^'[<>]\" . l:modifier, '', '') \" visual selection marks"
- }
- , LetStatement
- { letLexpr = "l:cmdline"
- , letValue =
- "substitute(l:cmdline, '^/[^/]\\+/' . l:modifier, '', '') \" /{pattern}/"
- }
- , LetStatement
- { letLexpr = "l:cmdline"
- , letValue =
- "substitute(l:cmdline, '^?[^?]\\+?' . l:modifier, '', '') \" ?{pattern}?"
- }
- , LetStatement
- { letLexpr = "l:cmdline"
- , letValue =
- "substitute(l:cmdline, '^\\\\/' . l:modifier, '', '') \" \\/ (next match of previous pattern)"
- }
- , LetStatement
- { letLexpr = "l:cmdline"
- , letValue =
- "substitute(l:cmdline, '^\\\\?' . l:modifier, '', '') \" \\? (last match of previous pattern)"
- }
- , LetStatement
- { letLexpr = "l:cmdline"
- , letValue =
- "substitute(l:cmdline, '^\\\\&' . l:modifier, '', '') \" \\& (last match of previous substitution)"
- }
- , LetStatement
- { letLexpr = "l:cmdline"
- , letValue = "substitute(l:cmdline, '^,', '', '') \" , (separator)"
- }
- , LetStatement
- { letLexpr = "l:cmdline"
- , letValue = "substitute(l:cmdline, '^;', '', '') \" ; (separator)"
- }
- , GenericStatement "return l:cmdline"
- ]
- }
- , FunctionDeclaration
- { functionBang = True
- , functionName = "loupe#private#prepare_highlight"
- , functionArguments = ArgumentList [ Argument "result" ]
- , functionAttributes = [ "abort" ]
- , functionBody =
- [ GenericStatement "if has('autocmd')"
- , GenericStatement "augroup LoupeHightlightMatch"
- , GenericStatement "autocmd!"
- , GenericStatement "autocmd CursorMoved * :call loupe#hlmatch()"
- , GenericStatement "augroup END"
- , GenericStatement "endif"
- , GenericStatement "return a:result"
- ]
- }
-