Replies: 2 comments
-
+1 here. Same scenario how i arrived at this question since i'm using the lazyvim preset, but setting a default view mode would be very nice to have in general. Thanks for mentioning the |
Beta Was this translation helpful? Give feedback.
-
Hi @jesseduffield, I hope you don't mind me pinging you here. I've started work on a change to introduce a Would it be possible for you to take a quick look and provide any guidance on whether you'd be willing to accept a PR for this change, am I going in the right direction or would you prefer another, etc? Regarding testing, what would you want to see in a PR? I did have a look at doing integration tests but wasn't sure how to validate the resulting screen mode in lazygit matched what was provided on the command line. I'll keep looking through the existing tests to see if I can work it out in the meantime. In general, it's a very early cut but wanted to get some early feedback so I'd really appreciate any that you have, good or bad :) Thanks |
Beta Was this translation helpful? Give feedback.
-
if I go to the Commits panel, do ctrl+s and find a file, the view that appears is "Commits / Reflog" on the left and "Patch" on the right (showing the commit patch preview for the file I selected in the filter); I think this the "half" view mode but I might have that wrong.
If I do
lazygit -f <file>
, then instead of the "half" view mode like above I get the mode where only the commit history is shown. I can obviously cycle through the view modes with+
but it would be nice if I could shortcut that in some way.Is it possible to specify the view mode when using
-f
?The context to me wanting to do this is that I use Lazygit inside Lazyvim. LV uses the
-f
flag to open up the file history view. I'd like to be able to say use "half" view mode by default.Thinking more generally, I can see how using
lazygit -f <file
from the command line outside of lazyvim and have it open the view in "half" mode would also be nice (I didn't know about-f
until today :) ). I now especially likelazygit -f **<tab>
to openfzf
to find the file I want to view the history of :)If the functionality doesn't exist today then some ideas could be...
Any other ideas?
I could give contributing a PR a go if there's a consensus on how it should be done.
Beta Was this translation helpful? Give feedback.
All reactions