Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have the search results buffer split the window vertically #181

Open
jman-schief opened this issue Nov 16, 2024 · 2 comments
Open

Have the search results buffer split the window vertically #181

jman-schief opened this issue Nov 16, 2024 · 2 comments

Comments

@jman-schief
Copy link

jman-schief commented Nov 16, 2024

Hello, I'm trying to configure rg.el so that the search results buffer (a new window, AFAIU) is always opened in the lower half of the frame, splitting vertically by default, instead of horizontally.

Any suggestion?

Thanks

@dajva
Copy link
Owner

dajva commented Nov 17, 2024

Not sure. I think you should look into display-buffer-alist. There are some discussions in #87 that you could look at although not the same issue.

@jman-schief
Copy link
Author

Thanks @dajva , your suggestion gave me a path to follow. After some digging, I propose the following solution:

(add-to-list 'display-buffer-alist
             '("\\*rg\\*"
               (display-buffer-below-selected display-buffer-at-bottom)))

which optionally could be fine tuned:

(add-to-list 'display-buffer-alist
             '("\\*rg\\*"
               (display-buffer-below-selected display-buffer-at-bottom)
               (inhibit-same-window . t)
               (window-height . balance-windows)))

Any suggestion?

My wish would be this to become a setting in rg.el, what do you think? (I'm not good enough to work on a patch, though)

@jman-schief jman-schief changed the title Have the search results buffer split the window horizontally Have the search results buffer split the window vertically Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants