summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
authorAlan Pearce2014-07-16 21:16:03 +0100
committerAlan Pearce2014-07-16 21:17:27 +0100
commitca46939b2e1e12aa4d03a181bbb092cb22b2d0af (patch)
treebbf2c394039d858ed44abfbef96a78ded37f35cf /tag-emacs
parent471467186284bf2e39b26c79d98b2d01510d6ee0 (diff)
downloadnixfiles-ca46939b2e1e12aa4d03a181bbb092cb22b2d0af.tar.lz
nixfiles-ca46939b2e1e12aa4d03a181bbb092cb22b2d0af.tar.zst
nixfiles-ca46939b2e1e12aa4d03a181bbb092cb22b2d0af.zip
Emacs: Add command switch-to-dotfiles (s-,)
Runs via projectile-persp, which means it should switch nicely when the
perspective has been opened.
Diffstat (limited to 'tag-emacs')
-rw-r--r--tag-emacs/emacs.d/init.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el
index a4ac789e..495de5d9 100644
--- a/tag-emacs/emacs.d/init.el
+++ b/tag-emacs/emacs.d/init.el
@@ -490,7 +490,10 @@
 
 (bind-key "s-x" (define-prefix-command 'super-x-map))
 
-(bind-key "s-," #'init-imenu)
+(defun switch-to-dotfiles ()
+  (interactive)
+  (projectile-persp-switch-project (expand-file-name "dotfiles" home-project-directory)))
+(bind-key "s-," #'switch-to-dotfiles)
 (set-register ?e `(file . ,*init-file*))
 (set-register ?z `(file . ,(expand-file-name ".config/zsh/zshrc" "~")))