-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
select file at startup for staging/etc #3788
Comments
As much as I love |
EDIT: nevermind, gitgutter is the same deal. it allows you to stage a hunk, and then delete the bits you dont want to stage, just like |
You can just use I'll stop with the digression now. |
yes, i did mention automating doing
!!! did not know this, will try it out right now and see if it replaces lazygit for me. thanks! |
hmm, line-by-line staging with a quick internet search did not turn up anyone getting functionality in vim similar to the staging ui from lazygit or git-gui, but maybe someone does have this? (all i want, really, is a terminal based, keyboard driven app that shows a nice, hunk-ed, unified diff of a single file against the index, AND allows easily staging a single +LINE or -LINE from within that diff.) but like you say, this is a tangent, and lazygit could use this feature with or without vim |
This looks pretty close to In any case, this is a discussion better suited for the |
Is your feature request related to a problem? Please describe.
my primary use of lazygit is for line-by-line staging of single files. selecting a file to start staging on the command line would be useful, instead of scrolling through the
Files
panel.also, in addition to invoking lazygit in a terminal, i currently sometimes use a shortcut in vim to switch to lazygit, stage some lines, and commit them. it would be nice if the file i am currently editing was selected in lazygit.
Describe the solution you'd like
lazygit --select-file src/file.cpp
Files
tab of panel[2], if that file's path (relative to the root of the repo) matchessrc/file.cpp
, select that modified or unstaged file, as if selecting that row inFiles
with the kb or mouse (expanding dirs in the filetree as necessary)Describe alternatives you've considered
xdotool key '/'
,xdotool type $FILENAME
,xdotool key Return
(this is awful, non-portable, and possibly subject to race conditions)Additional context
none
EDIT: edited to make it clear that this feature request is not related to vim, though it would play nicely with ANY programmer-friendly text editor.
The text was updated successfully, but these errors were encountered: