SuperBo / fugit2.nvim

Neovim git GUI powered by libgit2
MIT License
352 stars 7 forks source link

feature: Mark all changes in a directory for a commit #28

Closed sboesebeck closed 1 month ago

sboesebeck commented 4 months ago

Did you check the docs?

Is your feature request related to a problem? Please describe.

When opening Fugit2 and you have a lot of changes it would be great, if hitting space on a directory would add all changes in that directory to the commit (similar as lazygit does it)

Describe the solution you'd like

see above

Describe alternatives you've considered

not sure about alternatives though. Maybe another keybinding.

Additional context

No response

SuperBo commented 4 months ago

Tips: You can toggle visual mode, select all file under one directory, then press "-", "space" or "s" for staging.

This way is more vim-like motion and you can see what file you have selected. And you don't have to move all the way up to the parent directory to stage it.

https://github.com/SuperBo/fugit2.nvim/assets/2666479/e25510ab-fd55-4527-98d6-6ae7e037b781

sboesebeck commented 4 months ago

Ah. yes, this is cool But not really what I meant: In your video, it would be a lot easier to just hit space fugit2 and all changes in that directory would be added. But visual mode is of course also helpful, as vimmotions work.

SuperBo commented 4 months ago

@sboesebeck, I got your point, I think I can reuse the same visual staging code for this feature, please wait for my update

SuperBo commented 1 month ago

@sboesebeck, implemented this feature on latest changes. Please test :D.