wishlist
wishlist copied to clipboard
Edit `git commit` and `git rebase -i` inside neovim
What?
Something similar to :Git commit and :Git rebase -i commands in vim-fugitive
Why?
All the neovim plugins I found are git interfaces that does a lot of things like neogit and lazygit.nvim. I just want to git commit inside neovim and not see double status bars.
Potential existing implementations: vim-fugitive
Potential pitfalls: I don't know how it works and vim-fugitive is not a small code base to read.
It's not a lua plugin, but I think it's worth mentioning that if you use vim-floaterm, those commands will open a buffer in your current neovim instance, it works very well for me.
-
Personally I had problems with using git inside the in-build terminal for inserting text on commits. And without terminal support the solution will not be flexible enough as indicated by vim-fugitive. Fixing git inside terminal inside neovim would be needed.
-
~~Personally I think a spawned git shell with common useful abbreviations
gp,gpush,gb,gba,grbium,grbiuMbeing usable as shell import would have a much bigger impact (being usable outside neovim and is less effort to write). I did not do that yet due to point 1., but it should be <100 LOC or directly configurable inside shell solutions (be it floating window, harpoon, termux integration etc). See my aliases_git file for ideas what aliases to load for the shell.~~ -
~~For interactive rebase there is git interactive rebase tool. Its very minimalistic and the only real downsides are missing indexes for direct jumps and multi-steps, so too big or frequent rebasing might get annoying.~~ For some reasons Rust tools are not sufficiently active to update their git bindings.
-
However, if one uses big or frequent rebases one should learn the git features for dealing with that.
I think replacinig rebase -i in all use cases will be tricky, because fugitive combines diffview.nvim with efficient merge conflict resolving and there is no lua plugin to resolve merge conflicts yet.
If you only have a few simple use cases, then you would need to fallback to the shell anyway. So it doesnt have a big value, if you cant do it in the shell then.
BTW: You can now also use git commit and git rebase -i inside the inbuild shell (for example with vim) and it doesnt have cluttered symbols.
I use this every day in harpoon.
diffview.nvim has now https://github.com/sindrets/diffview.nvim#merge-tool, which offers 3-way, 4-way and and single window merge layout:
In addition to the normal :h copy-diffs mappings, there are default mappings provided for jumping between conflict markers, obtaining a hunk directly from any of the diff buffers, and accepting any one, all, or none of the versions of a file given by a conflict region.
I think having additionally gitsigns for quick file-local actions and visualizations of markers makes it a very complete solution that is nothing short of fugitive.
Except more configuration to get short command lengths (fugitive defaults to :Git subcommand for any command action`.
Please let me know, if this can be closed or what you think is missing.
You can now also use
git commitandgit rebase -iinside the inbuild shell (for example with vim) and it doesnt have cluttered symbols.
is this with diffview? because i used the built in term:// and it gives me double status line, double buffer line, and all the hotkeys are kinda wonky
what I'm missing is editing the git commit files in a native buffer instead of inside another instance of nvim in the terminal