【问题标题】:Run selection and replace [duplicate]运行选择并替换[重复]
【发布时间】:2013-10-30 03:29:00
【问题描述】:

如果我可以运行 Emacs 文本的选定区域作为 c 或 c++ 程序的输入,那就太好了。然后程序的输出可以覆盖选定的文本。有这样的功能吗?

【问题讨论】:

  • 开枪,我不会想到使用“过滤器”这个词...

标签: emacs


【解决方案1】:
shell-command-on-region is an interactive compiled Lisp function in
`simple.el'.

It is bound to <s-kp-bar>, s-|, M-|, <menu-bar> <tools>
<shell-on-region>.

(shell-command-on-region START END COMMAND &optional OUTPUT-BUFFER
REPLACE ERROR-BUFFER DISPLAY-ERROR-BUFFER)

Execute string COMMAND in inferior shell with region as input.
Normally display output (if any) in temp buffer `*Shell Command Output*';
Prefix arg means replace the region with it.  Return the exit code of
COMMAND.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-11-29
    • 2015-07-30
    • 1970-01-01
    • 1970-01-01
    • 2021-09-17
    • 2019-01-31
    • 2014-08-13
    • 1970-01-01
    相关资源
    最近更新 更多