5 ms·
If you're an emacs user, I can't recommend magit [1] enough. I was a diehard CLI user and had flags and aliases out the wazoo, and it was still a step change in
by nickbarnwell 8y ago
If you're an emacs user, I can't recommend magit [1] enough. I was a diehard CLI user and had flags and aliases out the wazoo, and it was still a step change in usabilty and power for me. Staging hunks, rebasing, and stashing are all vastly easier. Amending or editing a commit is a breeze, and it's tied in to all of the other emacs tools you already use, e.g. org-mode to boot!
It's easier to see it in action than explain it. If you've two minutes to spare, check out this emacsrocks screencast [2], or Howard Abram's longer presentation from the PDX Emacs Hackers meetup [3].
[1]: https://magit.vc/ https://magit.vc/
[2]: https://www.youtube.com/watch?v=rzQEIRRJ2T0 https://www.youtube.com/watch?v=rzQEIRRJ2T0
[3]: https://www.youtube.com/watch?v=vQO7F2Q9DwA https://www.youtube.com/watch?v=vQO7F2Q9DwA
- sbjs 8y agoBased on those videos, lazygit looks like it does the same things as magit, but with a little more "chrome" (boxes around lists). How do the two projects compare? Could they be merged, or do they have fundamentally different philosophies?
- nickbarnwell 8y agoThe videos touch upon a fraction of magit’s capabilities; if nothing else, it’s a far more mature project. But the real power is integration with the rest of emacs/being written in elisp. If I want to change or script behaviour, I have easy access to all the internals, and I can integrate it with other parts of my emacs workflow. For example, I can use magit to view the diff of a coworker’s PR, easily capture snippets, including links to their location in our internal BitBucket instance, into an org buffer, and then write up and send an HTML formatted message with my comments, syntax highlighting, etc to my colleagues with my feedback. Similarly, my TODO list is managed by org, and I can have links to commits or files at a certain commit directly in my agenda or notes and jump to them. This is all within my editor, with all the text editing, code navigating, and linting capabilities it provides!
- kungtotte 8y agoWhenever I read a comment or blog post about Emacs I'm like "I should definitely try it out, because that sounds awesome", then I do try it and it turns out it's a pain in the ass to make it work on Windows and I spend more time fiddling with it than I do working with it. It's the same thing with vim for that matter. A basic-ish text editor setup is trivial in both editors but beyond that things start to fall apart. Plugins/modes rely on being run in *nix environments to work well, and the workarounds for Windows are never 100%. The startup times start to suffer a lot too in vim and Emacs when you pile on a lot of features. I think that's why VSCode has gained so much traction. For coding it's got easily 90% of the same features as both vim and Emacs (if not more), but it's trivial to set up and with many users being on Windows pretty much everything has first-class Windows support. So that's what happens every time. I stick to VSCode and keep a lightweight vim setup around for quick text edits since it opens instantly. Perfect for quickly changing a config file or jotting something down if I don't have VSCode open.
- mateuszf 8y agoJust change your OS?
- kungtotte 8y agoI think it kind of proves my point when the solution to not being able to set an editor up is to change your entire OS... (Also: no)
- earenndil 8y agoYour OS becomes irrelevant when emacs itself is your OS!
- Pimpus 8y agoHe has a point. Why complain about Emacs when the problem is Windows? To be fair, I am known to use all three OS's from time to time. I just have conditional guards to prevent loading packages that break on Windows. Mostly everything works the same. In fact, I originally learned Emacs on Windows back when I was a younger and noobier programmer.
- hardwaresofton 8y agomagit is lifechanging -- At this point I open emacs (assuming it isn't already open) just to use magit to manage things. If you use it daily don't forget to donate to the developer at least once, sprinkle some of that full-time corporate cog money on them.
- nkantar 8y agoSeeing a former coworker use Magit in Emacs is what got me to look into the Vim version: https://github.com/jreybert/vimagit https://github.com/jreybert/vimagit From what I gather it's nowhere near as feature-complete, but it lets me create commits with immense ease and precision.
- dmortin 8y agoYou may want to try emacs just for magit. That is, using it as a Git GUI while using VIM for everything else (if you don't want to switch).
- tambourine_man 8y agoFugitive is great: https://github.com/tpope/vim-fugitive https://github.com/tpope/vim-fugitive
- tcoff91 8y agoI was a die-hard vim+tmux user before switching to Spacemacs. Now I have all the power of vim’s modal editing with Emacs’ vastly superior ecosystem of packages.
- cup-of-tea 8y ago> Seeing a former coworker use Magit in Emacs is what got me to look into the Vim version What you should have done is use magit and looked into the emacs version of vim: https://github.com/emacs-evil/evil https://github.com/emacs-evil/evil
- jolmg 8y agoWhat I like most about magit is browsing the history of a file via its git-blame mode. It shows you the file split into sections indicating what commit was responsible for that section's lines. Doing `C-x g b` on one of those sections visits the file at that commit and does git blame again without needing to `checkout` that commit. I wish I knew how to be as effective doing that with `git blame` on the shell. Is there a way to provide the commit to `git blame` without needing to `checkout`?
- ubercow13 8y agoYou can specify the commit to look back from on the command line for blame. See [1] > Optionally, start annotating from the given revision. [1] https://git-scm.com/docs/git-blame https://git-scm.com/docs/git-blame
- vickychijwani 8y agoMagit has a PR problem: most people think they need to be already using Emacs to use Magit, but that's far from the case. Indeed most Magit keybindings are single-letter like vim. I wish I could get more people to try Magit without being turned off by the fact that it's an "Emacs plugin". Hmm.. what if there were a standalone version of Magit? Would more people use it?