管道少于Emacs [英] Pipe less to Emacs

查看:138
本文介绍了管道少于Emacs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当将管道输出查看为Less时,有时我希望能够在Emacs中查看它,以获得语法高亮,并使用emacs命令进行搜索,标记,复制等。



我看到Less有一个 v 命令,可用于打开 $ EDITOR 。不幸的是,在查看管道输入时,这不起作用。



此外,我不知道如何让Emacs将stdin显示为只读文档。 >

所以,是否可以像 v 这样设置Less,但是将当前缓冲区泵入Emacs作为read-只有文件?



谢谢。

解决方案

http://www.emacswiki.org/emacs/GnuClient ,你会来标题为将数据配置到Emacs缓冲区的部分可能是相关的。或者您可以 hack up一个涉及emacsclient和临时文件的解决方案。(link dead)。



在找到死链接的副本时,我发现了另一种变体: 管道到一个emacs缓冲区emacsclient ,它指向存储在github上的代码


When viewing piped output to Less, sometimes I'd like to be able to view it in Emacs in order to get syntax highlighting and use emacs commands for searching, marking, copying, etc.

I see that Less has a v command that can be used to open the currently viewed file in $EDITOR. Unfortunately this doesn't work when viewing piped input.

Also, I don't know how to get Emacs to display stdin as a read-only document.

So, is it possible to set up Less with something like v but that pumps the current buffer into Emacs as a read-only file?

Thanks.

解决方案

If you scroll down in http://www.emacswiki.org/emacs/GnuClient, you'll come to a section titled "Piping data to an Emacs buffer" which may be relevant. Or you can hack up a solution involving emacsclient and temporary files. (link dead).

I found another variant while looking for a duplicate of the dead link: Piping to an emacs buffer with emacsclient which points at code stored on github.

这篇关于管道少于Emacs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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