闻心阁

一蓑烟雨看苍生,半壶浊酒笑红尘

Copy the Command Output of Vim

2016-08-06 约 2 分钟读完 搬砖秘籍

When we excute the system command in the Vim(via :!command), sometimes we want to copy the output content, but it's difficult.

Copy it!

In the Vim, you can copy it by this function redir, just like this:

:redir @* | (Vim Command) | redir END

And then the output is in the clipboard, just use it as you want.

发表评论

jQuery $.ajax Method Ignored the Undefined Values Solve Vim Error Unkonwn Option File (Win7 x64)