Skip to content

Instantly share code, notes, and snippets.

@gregghz
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregghz/cfadc194192b3bfd2f83 to your computer and use it in GitHub Desktop.
Save gregghz/cfadc194192b3bfd2f83 to your computer and use it in GitHub Desktop.
;; .emacs: (add-hook 'ensime-mode-hook 'ensime-aux-mode)
(defun ensime-aux-sbt-do-reload ()
(interactive)
(sbt-command "reload"))
(defun ensime-aux-sbt-do-scoverage ()
(interactive)
(sbt-command "scoverage:test"))
(defun ensime-aux-sbt-reload-clean-update-compile ()
(interactive)
(sbt-command "reload")
(sbt-command "clean")
(sbt-command "update")
(sbt-command "compile"))
(define-minor-mode ensime-aux-mode
"Things to make ensime even better (mostly just helpful shortcut keys)."
:lighter " eaux"
:keymap (let ((map (make-keymap)))
(define-key map (kbd "C-c C-b l") 'ensime-aux-sbt-do-reload)
(define-key map (kbd "C-c C-b C") 'ensime-aux-sbt-do-scoverage)
(define-key map (kbd "C-C C-b Z") 'ensime-aux-sbt-reload-clean-update-compile)
map))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment