Created
March 4, 2016 23:01
-
-
Save juxtin/0d558ff47acd86b1a5d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun abclj--other-ns (ns) | |
"If `ns' ends in `-test', strip that off. Otherwise, add `-test'." | |
(if (string-match-p "-test$" ns) | |
(string-remove-suffix "-test" ns) | |
(concat ns "-test"))) | |
(defun abclj-jump-to-test-ns-or-back (&optional arg) | |
"If the point is in `project.namespace', jump to `project.namespace-test'. If | |
the point is in `project.namespace-test', jump to `project.namespace'." | |
(interactive "P") | |
(let ((target-ns (abclj--other-ns (cider-current-ns)))) | |
(cider-find-ns arg target-ns))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment