Question
I want to have basically the same as :read ![external command]
, but instead the external command I want to read the output from an internal command.
Example
Shells echo / external command:
:read !echo 0x539
-> output: 0x539
Vims echo / internal command:
:read echo 0x539
-> output: 1337
More explanation
The second example will obviously fail, because thats not vim syntax. But is there an equivalent how I can archive this in vim/neovim? I know that you can generally output the result from vimscript commands in the "=
register. (In case you don't know, you can press CTRL-R
and then =
while being in insert mode to get into the expression register). But I don't know how to use echo
with it.
So if you have any ideas, I would be glad to hear them :)