command :: Node -> Env
command (CommandAnnotation name params) = do
- lhs <- append $ concat [":", name, " ", fromMaybe "" params]
- ws <- append " "
target' <- linkTargets [":" ++ name] False
- trailing <- append "\n"
- return $ concat [lhs, ws, target', trailing]
+ lhs <- append $ concat [":", name, " ", fromMaybe "" params]
+ trailing <- append " ~\n\n"
+ return $ concat [target', lhs, trailing]
-- TODO indent what follows until next annotation...
-- will require us to hoist it up inside CommandAnnotation
-- (and do similar for other sections)
function :: Node -> Env
function (FunctionAnnotation name) = do
- lhs <- append $ name ++ "()"
- ws <- append " "
target' <- linkTargets [name ++ "()"] False
- trailing <- append "\n"
- return $ concat [lhs, ws, target', trailing]
+ lhs <- append $ name ++ "()"
+ trailing <- append " ~\n\n"
+ return $ concat [target', lhs, trailing]
-- TODO indent what follows
function _ = invalidNode
<
COMMANDS *ferret-commands*
-:Ack {pattern} {options} *:Ack*
+ *:Ack*
+:Ack {pattern} {options} ~
Searches for {pattern} in all the files under the current directory (see
|:pwd|), unless otherwise overridden via {options}, and displays the results
(|<Plug>(FerretAckWord)|) is a shortcut for running |:Ack| with the word
currently under the cursor.
-:Ack! {pattern} {options} *:Ack!*
+ *:Ack!*
+:Ack! {pattern} {options} ~
Like |:Ack|, but returns all results irrespective of the value of
|g:FerretMaxResults|.
-:Lack {pattern} {options} *:Lack*
+ *:Lack*
+:Lack {pattern} {options} ~
Just like |:Ack|, but instead of using the |quickfix| listing, which is global
across an entire Vim instance, it uses the |location-list|, which is a
Note that |:Lack| always runs synchronously via |:cexpr|, because dispatch.vim
doesn't currently support the |location-list|.
-:Lack! {pattern} {options} *:Lack!*
+ *:Lack!*
+:Lack! {pattern} {options} ~
Like |:Lack|, but returns all results irrespective of the value of
|g:FerretMaxResults|.
-:Back {pattern} {options} *:Back*
+ *:Back*
+:Back {pattern} {options} ~
Like |:Ack|, but searches only listed buffers. Note that the search is still
delegated to the underlying |'grepprg'| (`rg`, `ag`, `ack` or `ack-grep`), which means
written to disk, then |:Back| behaves exactly like |:Ack| and will search all
files in the current directory.
-:Back! {pattern} {options} *:Back!*
+ *:Back!*
+:Back! {pattern} {options} ~
Like |:Back|, but returns all results irrespective of the value of
|g:FerretMaxResults|.
-:Black {pattern} {options} *:Black*
+ *:Black*
+:Black {pattern} {options} ~
Like |:Lack|, but searches only listed buffers. As with |:Back|, the search is
still delegated to the underlying |'grepprg'| (`rg`, `ag`, `ack` or `ack-grep`), which
buffers are written to disk, then |:Black| behaves exactly like |:Lack| and will
search all files in the current directory.
-:Black! {pattern} {options} *:Black!*
+ *:Black!*
+:Black! {pattern} {options} ~
Like |:Black|, but returns all results irrespective of the value of
|g:FerretMaxResults|.
-:Acks /{pattern}/{replacement}/ *:Acks*
+ *:Acks*
+:Acks /{pattern}/{replacement}/ ~
Takes all of the files currently in the |quickfix| listing and performs a
substitution of all instances of {pattern} (a standard Vim search |pattern|)
:Ack foo
:Acks /foo/bar/
<
-:Qargs *:Qargs*
+ *:Qargs*
+:Qargs ~
This is a utility function that is used internally when running on older
versions of Vim (prior to version 8) but is also generally useful enough to