diff .elisp/settings/90.keybindings.el @ 398:1cda3348f36b

emacs f4 dwim: bind rust files to running tests with cargo
author Augie Fackler <raf@durin42.com>
date Mon, 25 Jul 2016 23:12:48 -0400
parents b9c8655f12f0
children 11fdb5a60eee
line wrap: on
line diff
--- a/.elisp/settings/90.keybindings.el
+++ b/.elisp/settings/90.keybindings.el
@@ -23,7 +23,10 @@
 (defun af-dwim-f4 () (interactive)
   (cond ((string-match "\\.t$" buffer-file-name)
          (textmate-start-compile-in-root
-          (concat "make " (file-name-nondirectory buffer-file-name))))))
+          (concat "make " (file-name-nondirectory buffer-file-name))))
+        ((string-match "\\.rs$" buffer-file-name)
+         (textmate-start-compile-in-root "cargo test"))
+        ))
 (global-set-key [f4] 'af-dwim-f4)
 (global-set-key [f5] 'diff-apply-hunk)