Creates custom function for intuitive, frame-specific buffer switching

This commit is contained in:
William Carroll 2017-05-31 23:07:27 -04:00
parent a4f87fe53c
commit 39b0e5056b

View file

@ -346,6 +346,12 @@
(evil-window-down 1)) (evil-window-down 1))
(defun wc/switch-to-mru-buffer ()
"Switches to the most recently used buffer, including visible buffers."
(interactive)
(switch-to-buffer (other-buffer (current-buffer) t (selected-frame))))
;; Evil Leader Settings ;; Evil Leader Settings
(use-package evil-leader (use-package evil-leader
:ensure t :ensure t
@ -355,7 +361,7 @@
(evil-leader/set-key (evil-leader/set-key
"w" 'toggle-truncate-lines "w" 'toggle-truncate-lines
"x" 'helm-M-x "x" 'helm-M-x
"<SPC>" 'mode-line-other-buffer "<SPC>" 'wc/switch-to-mru-buffer
"a" 'ace-delete-window "a" 'ace-delete-window
"s" 'ace-swap-window "s" 'ace-swap-window
"n" 'neotree-toggle-project-dir "n" 'neotree-toggle-project-dir