Copy Vim version information to clipboard

I am using gvim 7.3 for Windows 7 64-bit Professional. Inside vim, I can type: version to get information about my vim installation. How to copy this information to the clipboard?

+4
source share
2 answers
:redir @+> | version | redir END 

Unlike @Gareth McCaughan's solution, it will send the output :version directly to the clipboard register.

+8
source
 :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 this automatically in a Vim script, you can force Vim to read the file into the buffer and copy the contents to the + register. However, this is a lot of work, and I suspect that you want this to be a one-time appointment for which doing it manually would be sufficient.

+1
source

Source: https://habr.com/ru/post/1346955/


All Articles