From aac35cb96c337037a00c3677405c132b9e71e10d Mon Sep 17 00:00:00 2001 From: noa@gaiwan.org Date: Sat, 15 Jun 2024 17:19:57 +0000 Subject: Prefer columnar splits over a stack --- emacs/init.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/emacs/init.el b/emacs/init.el index 76db306..5c6c293 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -877,6 +877,14 @@ The misspelled word is taken from OVERLAY. WORD is the corrected word." (global-set-key [remap query-replace] 'anzu-query-replace) (global-set-key [remap query-replace-regexp] 'anzu-query-replace-regexp) +;; My computer has a small screen, so i find that it's more beneficial for me to split the frame into columns, so i get more context. However, splitting in this way only gives me a (window-width) of 61, so emacs will always split into vertically stacked windows. By setting this to 80, the first split should always be vertical. +(setopt split-width-threshold 80) + +;; Define a handy function that allows me to do a full text search of every file in my home directory. For the most part, this works well; ripgrep avoids binary files. However, in some files with embedded images, it can add a lot of junk to the output. +(defun noa/consult-rg-home () + (interactive) + (consult-ripgrep "~/")) +(global-set-key (kbd "") #'noa/consult-rg-home) ;; Switch to new window on creation (defun noa/split-and-follow-horizontally () @@ -928,10 +936,5 @@ The misspelled word is taken from OVERLAY. WORD is the corrected word." (comment-region (mark) (point)) (buffer-substring (mark) (point))) "\n\n")) -;; Define a handy function that allows me to do a full text search of every file in my home directory. For the most part, this works well; ripgrep avoids binary files. However, in some files with embedded images, it can add a lot of junk to the output. -(defun noa/consult-rg-home () - (interactive) - (consult-ripgrep "~/")) -(global-set-key (kbd "") #'noa/consult-rg-home) (use-package i-ching :ensure t) -- cgit 1.4.1-2-gfad0