On 04/10/2011 05:39 PM, Spiros Bousbouras wrote:
On Apr 9, 6:29 pm, Tim Chase<[email protected]> wrote:
On 04/09/2011 12:11 PM, Spiros Bousbouras wrote:
How can you insert the output of an Ex command into the
buffer at the place where the cursor is?
1) use :redir to a register and paste the register
contents:
Strange that there isn't a simpler method built-in.
I'm not sure it's *that* strange -- using ":redir" is the
canonical way to access the messages Vim produces, and Vim gives
plenty of options for redirection (files/registers/variables, and
appending/overwriting). I could see adding a hist-names (":help
hist-names") entry for messages to allow access to the
message-history list which would then allow you to insert it via
something like ^R=histget('messages')
That said, I could count on one hand[*] the number of times in 10
years of using Vim that I've wanted to include the output of a
vim command in my text, and
And of course if there is already a redirect going on this
will mess things up.
exactly 0 of those times have I been using :redir for something
else at the same time.
-tim
[*] okay, it might be cheating that I often count in binary on my
fingers, but that's still less than 32 :)
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php