开发者

Copy Vim Version Information to Clipboard

开发者 https://www.devze.com 2023-02-22 18:44 出处:网络
I am using gvim 7.3 on Windows 7 开发者_Python百科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 clipb

I am using gvim 7.3 on Windows 7 开发者_Python百科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.

0

精彩评论

暂无评论...
验证码 换一张
取 消