开发者

Copy Vim Version Information to Clipboard

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜