From 1769732191f1290822be3354023231d89fd185bb Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 1 Jan 2021 10:54:53 -0600 Subject: Add (commented) buffer focus and shifting keys I need to figure out what binds I want to use. --- config.org | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/config.org b/config.org index 09f37ae..b50b5e4 100644 --- a/config.org +++ b/config.org @@ -277,6 +277,37 @@ become unique.") "Empty *scratch* buffer.") #+END_SRC +**** COMMENT Focus and move buffers directionally + +Commented for now because I really need to figure out the keybindings I want to use for this. The real issue is the collisions between Org-mode, Windows, and Emacs’ normal bindings. + +#+begin_src emacs-lisp + ;; change focus + ;; for more on `ignore-error-wrapper', see + ;; https://www.emacswiki.org/emacs/WindMove#h5o-3 + (defun ignore-error-wrapper (fn) + "Funtion return new function that ignore errors. + The function wraps a function with `ignore-errors' macro." + (lexical-let ((fn fn)) + (lambda () + (interactive) + (ignore-errors + (funcall fn))))) + + (global-set-key [S-left] (ignore-error-wrapper 'windmove-left)) + (global-set-key [S-right] (ignore-error-wrapper 'windmove-right)) + (global-set-key [S-up] (ignore-error-wrapper 'windmove-up)) + (global-set-key [S-down] (ignore-error-wrapper 'windmove-down)) + + ;; shift buffers + (straight-use-package 'buffer-move) + + (global-set-key (kbd "") 'buf-move-up) + (global-set-key (kbd "") 'buf-move-down) + (global-set-key (kbd "") 'buf-move-left) + (global-set-key (kbd "") 'buf-move-right) +#+end_src + *** Modeline **** Smart mode line -- cgit 1.4.1-21-gabe81