在Emacs中,我如何粘贴到多个术语 [英] In Emacs, how can I paste into multi-term

查看:125
本文介绍了在Emacs中,我如何粘贴到多个术语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在emacs中使用多项运行终端时,我希望能够将命令粘贴到多项目窗口中,然后运行它。目前,当我这样做时,粘贴的项目确实出现在多项输入窗口中,但是如果我按Enter,则忽略该命令。它也没有出现在终端的历史。例如,我正在粘贴

When using multi-term to run a terminal within emacs, I would like to be able to paste a command into the multi-term window, and then run it. Currently, when I do so, the pasted item does appear in the multi-term input window, however, if I hit enter, the command is ignored. It also doesn't show up in the terminal's history. For example, I'm pasting

echohello

它看起来像是有效的 - 我看到提示后面的文字。但是当我输入它不执行。我正在使用多个术语: http://www.emacswiki.org/emacs/MultiTerm

It looks like it worked--I see the text following the prompt. But when I hit enter it doesn't execute. I'm using multi-term: http://www.emacswiki.org/emacs/MultiTerm

推荐答案

默认函数 yank 不适用于多项或更多
精确与术语模式因为yank不是真的插入。
要粘贴,您必须使用默认值绑定到
S-insert 的函数术语粘贴 。当然,您可以绑定 Cy
术语模式中使用它

The default function yank doesn't work with multi-term or more precisely with term-mode because the yank isn't « really » inserted. To paste, you've to use the function term-paste which is bound to S-insert by default. Of course, you can bind C-y to use it in term-mode

(add-hook 'term-mode-hook (lambda ()
                            (define-key term-raw-map (kbd "C-y") 'term-paste)))

这篇关于在Emacs中,我如何粘贴到多个术语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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