I am using gvim 7.3 on Windows 7 64 bit Professional. Within vim I can type :version to get information about my vim installation. How can I copy this version information to the clipboard?
:redir @+> | version | redir END
Unlike @Gareth McCaughan solution this will send :version
output directly to clipboard register.
:redir > C:\path\to\my\file.txt
:version
:redir END
and then open the file and copy the data from there. If you need to do it automagically in a Vim script, you can make Vim read the file into a buffer and copy the contents into the +
register. That's more work, though, and I suspect you want this for a one-off purpose for which doing it manually will suffice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With