[Feature Request] [QoL] Add an option to split horizontally instead of vertically if the window height is greater than the width
Closed this issue · 1 comments
Currently, when creating a new split in Nvim using gen.nvim, the plugin defaults to opening a vertical split such that the conversation with the LLM is on the left, and the previously opened file is on the right.
This behavior is fine when there is more horizontal space than vertical, as is the case on most landscape orientation monitors. However when working from a CLI it is often desirable to have windows arranged tall and thin, rather than short and wide.
The proposed behavior is to dynamically check the height and width of the terminal window when creating a new nvim split and if the height is greater than the width (perhaps by 20% or more) then the split should be made below the previously opened file, thus preserving the horizontal space (which is in limited supply compared to the vertical space)
Current behavior: *------------------------------------------------------------------------------* | | | | | | | | | | gen.nvim | source code | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *------------------------------------------------------------------------------*
Proposed behavior: *------------------------------------------------------------------------------* | | | | | | | | | source code | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *------------------------------------------------------------------------------* | | | | | | | | | gen.nvim | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *------------------------------------------------------------------------------*
I believe this behavior would allow for less disruption to the currently viewed source-code, which is often structured around the width of the document rather than the height. Many style guides restrict code to a length of 80, 100, or 120 characters and altering the width of the code can make it difficult to maintain a sense of cohesion when working in tandem with the LLM agent.
Thanks for this nice feature request, @gabrilend 👍 You can now use display_mode = 'horizontal-split'
.