在Emacs中最贴近测试运行器的东西应该就是 compilation buffer 了。 它会运行一个外部的命令行进程然后将输出结果显示在buffer中。 这就很适合于运行像编译程序或测试运行器这一类的程序了。 它甚至还有高亮错误与跳转到出错位置的能力。只需要像下面这样运行 M-x compile 就好了:这种用法比较适用于执行那些固定不变的静态编译命令(默
(global-set-key[f9] 'compile-file);;一键编译(弄Devcpp留下来的习惯)(global-set-key(kbd"C-a") 'mark-whole-buffer);;全选(Like Windows)(global-set-key(kbd"RET") 'newline-and-indent);;换行时自动缩进(defuncompile-file()(interactive) (save-buffer) (compile(format"g++ -o '%s' '%s' -...
'(compilation-scroll-output (quote first-error)) '(compile-command "./makemake 5010 clean && ./makemake 5010 all -j 8 && ./makemake 5010 program") '(completion-show-help t) '(dabbrev-case-distinction t) '(dabbrev-case-replace t) '(doc-view-continuous t) '(doc-view-image-width 850...
(defun fib-na (n) (cond ((= n 0) 0) ((= n 1) 1) (t (+ (fib-na (1- n)) (fib-na (- n 2))) (byte-compile 'fib-by) (native-compile 'fib-na) (dolist (a '(fib-el fib-by fib-na)) (let ((ti (float-time))) (fib-el 35) (message "%s" (- (float-time)...
(buffer-name)) ;(setq filename_non_suffix (substring filename 0 (string-match (regexp-quote ".") filename))) (local-set-key [f7] '(lambda() (interactive) (compile (concat "g++ " (filename_non_suffix) ".cpp -o " (filename_non_suffix) ".exe -g -Wall && start " (filename...
调用Emacs的compile命令 occur Emacs的occur的别名 printnl 打印各个参数,每个参数一行 su / sudo Uses TRAMP’s su or sudo method to run a command via su or sudo(即是说,当目录为远程目录时,该命令作用于登录远程系统的用户) whoami 返回当前用户,如果是在远程目录时执行该命令,则返回登录远程系统的用户 ...
(defun du-onekey-compile () "Save buffers and start compile" (interactive) (save-some-buffers t) (switch-to-buffer-other-window "*compilation*") (compile compile-command)) (global-set-key [C-f5] 'compile) (global-set-key [f5] 'du-onekey-compile) ;; C-f5, 设置编译命令; f5, ...
quickrun-compile-only-select Likequickrun-compile-onlycommand but select the backend before the execution. quickrun-replace-region Replace region of code with its output. quickrun-autorun-mode Minor mode which executesquickrunafter saving buffer. ...
multi-compile - Multi target interface to compile. fancy-compilation - Output enhancements to compilation-mode (including color support). quickrun - Implements run button used in many IDE. compile-angel.el - A package that ensures all `.el` files are both byte-compiled and native-compiled, ...
Used by hydra in dired buffer Tutorial (OPTIONAL) Knowledge of Linux/Unix is required. At least you should know the meanings of “environment variable”, “shell”, “stdin”, “stdout”, “man”, “info”. Basic tutorial Please read this tutorial at least for once. ...