feat(editor): :read reads the output of an Ex command into the buffer

This commit is contained in:
Brian Walshe 2024-12-16 10:17:51 +00:00
parent c792dbc013
commit 5b410d1e49
2 changed files with 5 additions and 5 deletions

View File

@ -2017,13 +2017,13 @@ NOTE: These commands cannot be used with |:global| or |:vglobal|.
save the output of the command, which can be set to save the output of the command, which can be set to
include stderr or not. {cmd} is executed like with include stderr or not. {cmd} is executed like with
":!{cmd}", any '!' is replaced with the previous ":!{cmd}", any '!' is replaced with the previous
command |:!|. See |++opt| for the possible values of command |:!|.
[++opt]. See |++opt| for the possible values of [++opt].
*:r:* *:read:* *:r:* *:read:*
:[range]r[ead] :{cmd} :[range]r[ead] :{cmd}
Execute Ex command {cmd} and insert its output below Execute Ex command {cmd} and insert its output below
the cursor or the specified line the cursor or the specified line.
These commands insert the contents of a file, or the output of a command, These commands insert the contents of a file, or the output of a command,
into the buffer. They can be undone. They cannot be repeated with the "." into the buffer. They can be undone. They cannot be repeated with the "."

View File

@ -212,8 +212,8 @@ EDITOR
"~/" are now expanded to the user's profile directory, not a relative path "~/" are now expanded to the user's profile directory, not a relative path
to a literal "~" directory. to a literal "~" directory.
• |hl-PmenuMatch| and |hl-PmenuMatchSel| show matched text in completion popup. • |hl-PmenuMatch| and |hl-PmenuMatchSel| show matched text in completion popup.
• |:read:| reads the output of an Ex command into the buffer. Example:> :read • |:read:| reads the output of an Ex command into the buffer. Example:>
:ls :read :ls
EVENTS EVENTS