如何将 stdout 输出重定向到新的 Vim 选项卡? [英] How to redirect stdout output to a new Vim tab?

查看:29
本文介绍了如何将 stdout 输出重定向到新的 Vim 选项卡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Vim 中编辑一个 XML 文件,然后我想用 xsltproc 将它转换为纯文本文件,默认情况下它会输出到标准输出(类似于:!xsltproc TXTRULE.XSL %).是否可以在不创建任何中间文件的情况下将该 xsltproc 输出重定向到 Vim 中的新选项卡?

I'm editing an XML file in Vim, and then I want to transform it a plain-text file with xsltproc, which by default outputs to a stdout (something like : !xsltproc TXTRULE.XSL %). Is it possible to redirect that xsltproc output to a new tab in Vim without creating any intermediate files?

(我尝试阅读 :help redir 和 一些维基笔记,但仍然无法理解.对于某种简单的例子来说会很棒.)

(I've tried to read :help redir and some wiki notes, but still can't get it. would be greateful for some kind of simple example.)

推荐答案

您可以使用 阅读如下:

:read !ls

显然你应该用你的命令改变ls.如果你想打开一个新选项卡,在 tabnew 前面加上一个栏到命令喜欢:

Obviously you should change ls with your command. If you want to open a new tab prepend tabnew with a bar to the command like:

:tabnew|read !ls

这篇关于如何将 stdout 输出重定向到新的 Vim 选项卡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆