Live data from Hacker News

A work-in-progress Magit clone for Neovim

github.com

61–70 of 80 posts

Re: A work-in-progress Magit clone for Neovim

#61
post #8
post #4

Earlier quoted context omitted.

https://magit.vc/ Magit is the git layer/plugin for Emacs. I don't know about others but personally magit changed the way I think about git and version control.

Yeah for me magit was one of those "magical" Emacs apps that really keeps me sticking with Emacs despite how slow it can be when you load it up with many extensions (compared to VSCode). I hope the native comp in Emacs 28 helps somewhat in the speed aspect. The ports over to Deno and other JS stuff look interesting too [0] https://emacs-ng.github.io/emacs-ng/

You probably know this already, but Doom Emacs loads for me in less than a second.

Re: A work-in-progress Magit clone for Neovim

#62
post #43
post #40

Earlier quoted context omitted.

> Commiting hunks on command line is tedious afaik. You would have to specify row numbers. Not necessarily tedious - you can just use "git add -p" to stage hunks individually.

In Magit you can easily select arbitrary regions of code to stage (or chunks as you would via the command line). I haven't seen any git interface that is as intuitive for this task.

I actually use the git-gutter.el package alongside magit to do the arbitrary region work, and find it to fill the last gap between magit and the built-in version control commands.

Re: A work-in-progress Magit clone for Neovim

#63

Although I'm a heavy Emacs user, I never understood why is magit so praised. IMHO, source control just doesn't belong to IDE. Why learn how to use git with Emacs/magit, vim, IntelliJ IDEA, Eclipse, Visual Studio / Code, ... when you can just master the official command line client and forget about the rest? It's available and usable everywhere, while each of these IDE plugins is different and one need to learn and ge…

You can still use git cli of course. There are still a lot of things I don't know how to do in Magit (though I'm confident I could if I wanted). Magit for staging, committing, fetching, and pushing though is so easy I don't know why you would want to switch to or open a terminal window and type commands rather than just use hotkeys. Try it!

Magit is actually one of the best pieces of software I've ever used.

Re: A work-in-progress Magit clone for Neovim

#64

Very early on in my vim journey, I used to use fugitive[1], which is sort of a lighter equivalent of magit for vim. However, I found that too overkill and unwieldy. I never really found any benefits to forcing myself to stay inside vim to run some git command. These days, I just use git in a tmux split rather than trying to force vim to show some arbitrary git UI. For a nice interactive git UI, I use tig[1]. Tig is e…

Fugitive is really useful for a lot of stuff, though I don't use anywhere near all of its functionality. For example, I never rebase within vim. But blaming and especially staging/committing is a far better experience with fugitive than in plain terminal.

Also `blame` and `grep`

Re: A work-in-progress Magit clone for Neovim

#65
post #23
post #5

Does anyone know how Vim Fugitive compares to Magit?

Completely different. Magit is basically a full git IDE, while fugitive is basically just a thin wrapper around the git command line.

I think what makes magit so cool, and much better than any IDE git integration I've ever seen, is that it's both of those things. It's interactive, easy to use, and efficient, but it also maps very directly to git commands you would otherwise be typing. It doesn't hide anything, it just makes everything more convenient.

Re: A work-in-progress Magit clone for Neovim

#66
post #64

Earlier quoted context omitted.

Fugitive is really useful for a lot of stuff, though I don't use anywhere near all of its functionality. For example, I never rebase within vim. But blaming and especially staging/committing is a far better experience with fugitive than in plain terminal.

Also `blame` and `grep`

I mentioned blame! :)

I also make heavy use of :Gedit for easily looking at files on other branches.

Re: A work-in-progress Magit clone for Neovim

#67

Very early on in my vim journey, I used to use fugitive[1], which is sort of a lighter equivalent of magit for vim. However, I found that too overkill and unwieldy. I never really found any benefits to forcing myself to stay inside vim to run some git command. These days, I just use git in a tmux split rather than trying to force vim to show some arbitrary git UI. For a nice interactive git UI, I use tig[1]. Tig is e…

I'm not sure what I did wrong but your mapping didn't work for me on Neovim - it either immediately closed the terminal or didn't know what means.

Eventually I moved to https://github.com/codeindulgence/vim-tig which does the same via `:Tig` and `:Tig!`.

I added those mappings to achieve something similar:

  nnoremap gb :Tig! blame
  nnoremap g0 :Tig! status
Thank you for inspiration! Tig FTW!

Re: A work-in-progress Magit clone for Neovim

#68
post #55

Earlier quoted context omitted.

Try pressing `S` in `tig`. Works like magit but is much faster(when I say faster I'm also including interface lag). I realize that you won't switch, nor do you need to, but the general things people suggest of why magit is superior exist elsewhere as well.

Thanks for the tip, I haven't tried tig yet. That might actually be useful on remote systems in situations where I don't have access to my personally configured emacs.

Why just not use TRAMP to use your personal emacs to edit files on remote systems?

Re: A work-in-progress Magit clone for Neovim

#69
This is a little confusing to me. Isn't the main reason why people use (neo)vi(m) that they reject the Emacs approach of merging everything into the editor (i.e. integration over separation)? So, if you're going to give up on your desire for disintegration, why not just switch to Emacs and use Evil to get emulation of the vim modal interface? Then, you're getting the original, fully-functional, non-WIP Magit, plus a more featureful extension ecosystem and a more robust scripting language besides.

Am I missing something?

Post reply on HN