From 789a65dffe299179a00dec2b7e22692f3eae9f0e Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 21 Dec 2020 22:51:11 -0600 Subject: Configure window stuff --- config.org | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'config.org') diff --git a/config.org b/config.org index 61e5342..1bbd02e 100644 --- a/config.org +++ b/config.org @@ -312,6 +312,51 @@ from [[https://stackoverflow.com/questions/23659909/reverse-evaluation-order-of- (winner-mode +1)) #+end_src +*** Windmove + + #+begin_src emacs-lisp + (cuss windmove-create-window t + "Create windows in a direction if they don't exist.") + (cuss windomove-wrap-around t + "Wrap window movements around frame edges.") + + (windmove-default-keybindings) + #+end_src + +*** Pop some buffers up in the same window + +from [[https://github.com/link0ff/emacs-init][link0ff]]. + +#+begin_src emacs-lisp + (push `(,(rx bos + "*" + (or "Help" "Apropos" "Colors" "Buffer List" "Command History" + "Dictionary" "Locate" "Messages" "Proced" "eww" "snd" + (and "gud-" (+ (any "a-z0-9"))) + "compilation" "grep" "erlang" "haskell" + ;; Handle both "*shell*" and e.g. "*emacs-shell*" + ;; generated by `project-shell': + (and (? (* nonl) "-") "shell") + "Shell Command Output" + (and "SQL: " (+ (any "A-za-z"))) + "Diff" "vc-dir" "vc-log" "vc-search-log") + "*" + ;; Uniquifed buffer name with optional suffix in angle brackets + (? (and "<" (+ (not (any ">"))) ">")) + eos) + display-buffer-same-window + (inhibit-same-window . nil)) + display-buffer-alist) + + (defun display-buffer-from-help-p (_buffer-name _action) + (unless current-prefix-arg + (with-current-buffer (window-buffer) + (eq major-mode 'help-mode)))) + + (push '(display-buffer-from-help-p display-buffer-same-window) + display-buffer-alist) +#+end_src + ** Startup #+begin_src emacs-lisp -- cgit 1.4.1-21-gabe81