Emacs:以 shell 脚本模式执行代码

标签 emacs

在 Emacs 的 sh-mode 中,我一直在寻找一种直接在当前缓冲区中执行 shell 脚本的方法,就像 Python 模式中的 C-c C-c 一样。使用 M-!真的很累。任何数量的谷歌搜索都无济于事。这可能吗?

最佳答案

M-|shell-command-on-region
所以如果你想执行整个缓冲区,C-x h M-|或者你可以重新绑定(bind)到更方便的东西。

关于Emacs:以 shell 脚本模式执行代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1871970/

相关文章:

emacs - Guile和Emacs?

emacs - 在 emacs 中,如何绑定(bind) C-l 以清除粘液中的屏幕?

emacs - repl 不起作用(clojure 框)

Emacs 24.5 的 Prelude 在联系主机 melpa.org 时卡住

emacs/aquamacs - 将当前行或选择发送到事件终端

shell - 如何让 rlwrap 在 Emacs 的 shell/eshell 中工作?

python - Emacs Jedi python 工具无法加载 "error searching for program: permission denied, python"?

macos - 为什么 Shift+箭头绑定(bind)在 emacs 终端中的 clojure 模式下不起作用?

emacs - 显示结果时 CIDER REPL 中的多余滚动

Emacs 颜色主题设置