Mic*_*zyk 16
您可以C-c C-k在切换到REPL之前使用SLIME slime-compile-and-load-file.如果您还没有,它会提示您保存文件.完成后,您重新定义的内容应该在新版本的SLIME REPL中提供.然后你可以用来调C-c C-z出REPL(C-x 0当你不再需要它时关闭它).
Jür*_*zel 13
在.emacs中设置一个钩子:
(defun clojure-slime-maybe-compile-and-load-file ()
"Call function `slime-compile-and-load-file' if current buffer is connected to a swank server.
Meant to be used in `after-save-hook'."
(when (and (eq major-mode 'clojure-mode) (slime-connected-p))
(slime-compile-and-load-file)))
(add-hook 'after-save-hook 'clojure-slime-maybe-compile-and-load-file)
Run Code Online (Sandbox Code Playgroud)
与之前的答案一样,我使用相同的键击但将它们记录到宏中并将其绑定到键.这样,它只是保存,编译和切换到REPL的一个按键.它最终看起来像这样:
(fset 'compile-and-goto-repl
"\C-x\C-s\C-c\C-k\C-c\C-z")
(global-set-key [f6] 'compile-and-goto-repl)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2654 次 |
| 最近记录: |