about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--config.org31
1 files changed, 31 insertions, 0 deletions
diff --git a/config.org b/config.org index 09f37ae..b50b5e4 100644 --- a/config.org +++ b/config.org
@@ -277,6 +277,37 @@ become unique.")
277 "Empty *scratch* buffer.") 277 "Empty *scratch* buffer.")
278#+END_SRC 278#+END_SRC
279 279
280**** COMMENT Focus and move buffers directionally
281
282Commented 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.
283
284#+begin_src emacs-lisp
285 ;; change focus
286 ;; for more on `ignore-error-wrapper', see
287 ;; https://www.emacswiki.org/emacs/WindMove#h5o-3
288 (defun ignore-error-wrapper (fn)
289 "Funtion return new function that ignore errors.
290 The function wraps a function with `ignore-errors' macro."
291 (lexical-let ((fn fn))
292 (lambda ()
293 (interactive)
294 (ignore-errors
295 (funcall fn)))))
296
297 (global-set-key [S-left] (ignore-error-wrapper 'windmove-left))
298 (global-set-key [S-right] (ignore-error-wrapper 'windmove-right))
299 (global-set-key [S-up] (ignore-error-wrapper 'windmove-up))
300 (global-set-key [S-down] (ignore-error-wrapper 'windmove-down))
301
302 ;; shift buffers
303 (straight-use-package 'buffer-move)
304
305 (global-set-key (kbd "<C-S-up>") 'buf-move-up)
306 (global-set-key (kbd "<C-S-down>") 'buf-move-down)
307 (global-set-key (kbd "<C-S-left>") 'buf-move-left)
308 (global-set-key (kbd "<C-S-right>") 'buf-move-right)
309#+end_src
310
280*** Modeline 311*** Modeline
281 312
282**** Smart mode line 313**** Smart mode line