- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前将编译绑定(bind)到 C-x c。我知道我可以使用 C-u C-x c 在 comint 模式下运行编译,但我更愿意直接将它绑定(bind)到 C-x c。如果不从 compile.el 复制整个编译函数,调整它并绑定(bind)它,我无法理解如何做到这一点。有没有更好的办法?
编辑:为了澄清我草率的语言,我不希望在 comint 模式下绑定(bind) C-x c。我希望使 C-x c 运行“使用 comint 模式编译”。我目前将 C-x 绑定(bind)到“编译”。我可以通过输入 C-u C-x c 来做我想做的事,但我更愿意只输入 C-x c 来做到这一点。
最佳答案
我认为这可行...
(defun c-w-c ()
(interactive)
(call-interactively 'compile t (vector 21 (this-command-keys-vector))))
(global-set-key (kbd "C-x c") 'c-w-c)
添加到向量中的 '21' 是 ctrl-u 前缀键,它似乎让编译函数误以为它是用 C-u C-x c 调用的。
编辑:
它没有用,但是这样做:
(defun c-w-c ()
(interactive)
(setq current-prefix-arg '(4))
(call-interactively 'compile))
关于emacs - 如何使用 comint 将编译绑定(bind)到组合键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3610114/
我通常尝试使用如下命令启动 CLI(可能未正确定义它): (make-comint-in-buffer "PUTTY" nil "./plink.exe" nil "dbserver") (make-
我正在尝试使用 comint erlang-shell 打开一个后台缓冲区,一旦启动,就在 emacs 中运行一个函数调用(使用 distel 将其二进制文件发送到 erlang 节点)。 即: ..
有时在 comint 模式下,点位于缓冲区中的任意位置,我错误地按了 Return。这会将文本发送到底层进程,这可能非常危险。此文本通常包含很多行,并且无论是否偶然,其中一行可能是有效命令。 有什么方
我要解决的具体问题是 向正在运行的 telnet 发送命令 session 使用 message 回显命令的结果 但一般问题是将命令发送到下级(comint)进程 并等待输出返回并出现新的提示,然后返
我经常同时打开几个 comint 缓冲区,例如,我将向数据库打开一个 SQLi 缓冲区,并在不同的地方打开一组 shell 缓冲区。有时,我无缘无故地检测到,所有这些缓冲区开始共享一个公共(publi
在 Ubuntu Lucid 上使用 Emacs 23.2.1,任何基于 Comint 的模式都会偶尔插入换行符以获得更大的输出(参见下面的示例 Shell 和 SQL 模式输出)。我在 SQL 模式
我在 Emacs 中有一个 shell,但是 major-mode 只给我 comint-mode。 有没有办法确定哪种类型的外壳? 也许调用了什么 Emacs 函数来启动它? 或者至少解释器的可执行
我目前将编译绑定(bind)到 C-x c。我知道我可以使用 C-u C-x c 在 comint 模式下运行编译,但我更愿意直接将它绑定(bind)到 C-x c。如果不从 compile.el 复
我有一个简单的 mpi 程序来演示我的问题: #include #include int main(int argc, char *argv[]) { int rank, csize;
我想在 comint 启动的进程完成后读取缓冲区的输出。 (comint-redirect-send-command-to-process command-strin
例如,我有以下命令来运行我的项目: java -cp "lib/*:src:resources" clojure.main -m etl-proxy.proxy.core 所以我尝试使用以下命令创建
我在 Emacs 24 上安装了 js-comint 模式。现在当我尝试执行 run-js 时,它会抛出以下错误: Exception in thread "main" java.lang.NoCla
我想在切换到我通常运行命令的缓冲区后,通过搜索来导航历史记录,而不是在缓冲区末尾一次导航一个命令(例如 C-p )。 基本上,我想在缓冲区末尾“反向搜索”命令历史记录,而不是搜索缓冲区。 有人编写了可
编辑 Bash 脚本我想为变量分配文件名。 例如输入文件=foo.txt 与标准。 settings 如果不先在“=”后插入一个空格,我就无法完成文件名。 有什么解决办法吗? 最佳答案 首先,自 Em
我正在为 python 脚本编写一个 comint 模式。 脚本可以启动: /usr/bin/python3.3 tool-name arg0 我正在使用 comint-mode,因为此调用会在运行前
我使用 Emacs 24.2。我已经从 MELPA 安装了 js-comint 和 js-mode ,执行了 run-js,现在在 REPL 而不是 > 符号我有这个乱码: ^[[1G> ^[[0K^
我是一名优秀的程序员,十分优秀!