~edwargix/emacs.d

4b92a5de32af1e17362b3fd11465e9087046787d — David Florness 1 year, 8 months ago 8840f27
keys: use C-c C-s for switching to scratch buffer

sometimes the <f8> key is unavailable when it serves some OS-defined
purpose (e.g. music player on macOS)
1 files changed, 8 insertions(+), 3 deletions(-)

M lisp/keys.el
M lisp/keys.el => lisp/keys.el +8 -3
@@ 123,6 123,11 @@
                               (call-interactively 'compile)))
(global-set-key (kbd "<f6>") #'shell)
(global-set-key (kbd "<f7>") #'eshell)
(global-set-key (kbd "<f8>") (lambda ()
                               (interactive)
                               (switch-to-buffer "*scratch*")))

(defun switch-to-scratch ()
  "Switch to the *scratch* buffer"
  (interactive)
  (switch-to-buffer "*scratch*"))

(global-set-key (kbd "C-c C-s") #'switch-to-scratch)
(global-set-key (kbd "<f8>") #'switch-to-scratch)