Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hi. Hardcore 10+ year vim zealot here.

Magit on emacs is hands down the greatest interface to git that has ever been conceived. Vim + Fugitive doesn't even come close (sorry, tpope, I still love you).

So much so that I started using emacs with evil-mode, so that I can use my vim muscle memory and have access to magit. That is how good magit is. It literally converted me to the light (dark?) side.



Care to explain what you think is so good about it? I used emacs with evil a couple times but never understood the hype around magit


Magit's user interface has a status screen, from which you can perform the git commands.

In short, I think it's got the best of both a GUI or a CLI interface:

If you're unfamiliar with which magit commands you want to run, its interface is highly discoverable: it can list all the commands you can run, and for each of these it lists the most common options. (Some more advanced options are hidden but can be configured to show).

Once you're familiar with the commands you want to run, they can be run by typing the sequences of keys directly. (e.g. `c c` to commit, `c w` to reword, `r -i e` to start an interactive rebase onto another branch, etc.). -- This is the speed of having two letter aliases on the CLI, but without having to set them up.

This combined with the other dynamics that you get from having its interface in a text editor: With a CLI, I'd have to type out a commit's hash (3 or 4 letters) to operate on it; with magit, I can operate with a commit by having my cursor on it. When choosing a branch, emacs' narrowing tools are better integrated than what you get out of the box with CLI. Because it's part of the Emacs editor, you can write custom convenience functions which build on top of the functionality if you want.


With a simmering case of emacs chord key induced RSI I recently tried to make the switch to vim. The big thing I missed was magit, vim's port left me wanting, and the other tools just seemed like git cli embellishments. Just when I thought I was out, magit drew me back in.

Anyway, the screenshots from the OP make this project look like a very worthwhile undertaking. I can see why, perhaps frustratingly for the present project's author, this provoked a discussion on magit.


Off topic, but have you transposed left Ctrl and caps lock? That saved me from real pain, not kidding.


Thanks for the suggestion I will give this a try. I currently have Esc + <some key> bound to some of my most common actions. For me the 80/20 rule seems to apply to emacs shortcut keys, so making just a couple of them easier has a big impact.


an alternative route (what i've been doing for the past 5 years or so) is to switch left Ctrl with left Alt. My emacs life was never the same after.


Not a heavy magit user (or git, for that matter), so I can't say. However, you may want to look on Youtube for ideas:

https://www.youtube.com/watch?v=7ywEgcbaiys

https://www.youtube.com/watch?v=j-k-lkilbEs

The second (long) one is from John Wiegley[1] whose various packages have a fairly high impact, so I expect the video will be very educational.

https://github.com/jwiegley


I do believe it is the most well thought out porcelain to git that I have ever come across, in any editor that I've seen. The ability to integrate nearly all the various git CLI tools (not to mention forge, the magit plugin that integrates with github/gitlab) into one cohesive interface is incredible.

Many blog posts have been written about the features of magit, so I wont attempt to enumerate them here.


Did you try vimagit? If so, what's wrong/missing with it?

https://github.com/jreybert/vimagit


Many things. It's great, but it doesn't hold a candle to magit.

The README lists out several things that are missing that not only exist in magit, they aren't even notable features!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: