Add binding to switch to most recent buffer
This commit is contained in:
parent
2c95b17866
commit
c690a853e8
@ -6,7 +6,15 @@
|
|||||||
(interactive)
|
(interactive)
|
||||||
(mapc 'kill-buffer (delq (current-buffer) (buffer-list))))
|
(mapc 'kill-buffer (delq (current-buffer) (buffer-list))))
|
||||||
|
|
||||||
|
(defun switch-to-previous-buffer ()
|
||||||
|
"Switch to previously open buffer.
|
||||||
|
Repeated invocations toggle between the two most recently open buffers."
|
||||||
|
(interactive)
|
||||||
|
(switch-to-buffer (other-buffer (current-buffer) 1)))
|
||||||
|
|
||||||
|
|
||||||
(leader-def-key
|
(leader-def-key
|
||||||
|
"TAB" #'switch-to-previous-buffer
|
||||||
"b" '(nil :which-key "buffer")
|
"b" '(nil :which-key "buffer")
|
||||||
"bb" #'switch-to-buffer
|
"bb" #'switch-to-buffer
|
||||||
"bd" #'kill-buffer
|
"bd" #'kill-buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user