diff options
Diffstat (limited to '.emacs.d/lisp/init-project.el')
-rw-r--r-- | .emacs.d/lisp/init-project.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-project.el b/.emacs.d/lisp/init-project.el index 2229eeb..3e847da 100644 --- a/.emacs.d/lisp/init-project.el +++ b/.emacs.d/lisp/init-project.el @@ -102,6 +102,11 @@ mode as the current buffer (or do nothing)." "Variant of persp-previous-buffer-same-mode, which opens in other window." (interactive) (persp-previous-buffer-same-mode #'switch-to-buffer-other-window)) + ;; Inspired by crux-switch-to-previous-buffer + (defun persp-switch-to-previous-buffer () + "Switch to the previous buffer in the current perspective." + (interactive) + (switch-to-buffer (persp-other-buffer (current-buffer) 1))) (defun persp-current-project-root () "Return the current project root, falling back to finding it by the perpsective" (if-let (project (project-current)) @@ -131,6 +136,7 @@ mode as the current buffer (or do nothing)." :bind ("C-x p p" . switch-project) + ("C-c C-M-j" . persp-switch-to-previous-buffer) ("C-x C-b" . persp-previous-buffer-same-mode) ("C-x 4 C-b" . persp-previous-buffer-same-mode-other-window) ("C-x C-S-b" . persp-switch-buffer-same-mode) |