Fork me on GitHub
#spacemacs
<
2017-10-20
>
pesterhazy09:10:33

@jr0cket yeah git-gutter is great too. it doesn't help you find the locations with many open buffers though

eggsyntax13:10:16

I would have sworn my spacemacs used to show git changes on the fringe without an extra package, but I can't seem to find that functionality now...

eggsyntax13:10:42

BTW @ag ok, I'm completely hooked on magit now, it's so much more powerful than I realized 🙂

jeff.terrell13:10:48

I'm going to have to start using magit's ! now too, per @ag's tip. Thanks, @ag! I love good tools…

ag15:10:24

oh, well. TBH Magit is probably more awesome than our combined realization of how powerful it is. There are many little gems sometimes waiting there for you to be found. Examples? Most commands take prefix arguments. e.g. you probably know how to jump to a relevant piece from magit-diff buffer - you select a line and press RET, right? But what if you prefix it? - C-u RET keeps the magit buffer open. Woah, nice! Or you can toggle options for the refs buffer, maybe you'd like them to be sorted by committer-date? from: https://git-scm.com/docs/git-for-each-ref > For sorting purposes, fields with numeric values sort in numeric order (objectsize, authordate, committerdate, creatordate, taggerdate). All other fields are used to sort in their byte-value order. C-u y r (instead of just y r) - opens nice popup where you can set things right.

eggsyntax16:10:50

The way you can set options with - (eg, -f) is awesome too -- mimics *nix command line arguments beautifully & mnemonically, without the awkwardness of trying to add them after the command. That's just a beautiful little bit of UX. So many carefully chosen UX details in magit...

eggsyntax16:10:31

That one feels like one where the author must have tried about 10 different things before finally having that lovely little insight.

jeff.terrell16:10:20

I totally agree. If I had lots of time, I'd like to create a spin-off of magit for exploring text-based data using standard unix tools, with that lovely little interface as a friendly introduction to the raw command line. Can you imagine that kind of interface for learning sort's various options?

eggsyntax16:10:46

Oh hell yes.

ag16:10:02

Oh, yeah. note that you can set options, then press C-c C-c and in most cases (if it's a safe option) - it will store it, so if you want your refs to be ALWAYS sorted particular way C-u y r, set the sort option, C-c C-c - voila

eggsyntax16:10:04

If you manage to get to it, LMK, I'd love to try it 🙂

ag16:10:57

Guys, guys... in the magit refs popup, press L then toggle details and visibility... cool innit?

eggsyntax16:10:18

Very nice 🙂

jeff.terrell13:10:04

Relatedly, I just took 15 minutes to read the Spacemacs layouts documentation and fiddle with some things, and I think I may have mostly solved an annoyance I have when viewing my org agenda and making my plan for the day.

eggsyntax13:10:11

It actually seems like you need that only for edge cases where the functionality isn't exposed in another way. Highly recommend https://magit.vc/screenshots/ for a quick overview of what magit can do (unless you're already familiar w/ it).

eggsyntax13:10:28

("that" meaning !)

jeff.terrell13:10:31

Wow, good quick overview of magit. Nice resource. đź‘Ť

eggsyntax13:10:37

They are not kidding when they say it's nearly a 100% replacement for CLI git. A lot of stuff -- eg staging small chunks -- is way easier than with CLI.

jeff.terrell13:10:44

TIL that when my windows get unbalanced, taking up unequal widths despite SPC w =, I can fix it by e.g. sending the rightmost window to the right with SPC w L.

pesterhazy13:10:15

@jeff.terrell there's always golden ratio mode, SPC t g

jeff.terrell13:10:58

Oh weird…might try that for a while and see if I can get used to it. simple_smile Thanks!

ag15:10:24

oh, well. TBH Magit is probably more awesome than our combined realization of how powerful it is. There are many little gems sometimes waiting there for you to be found. Examples? Most commands take prefix arguments. e.g. you probably know how to jump to a relevant piece from magit-diff buffer - you select a line and press RET, right? But what if you prefix it? - C-u RET keeps the magit buffer open. Woah, nice! Or you can toggle options for the refs buffer, maybe you'd like them to be sorted by committer-date? from: https://git-scm.com/docs/git-for-each-ref > For sorting purposes, fields with numeric values sort in numeric order (objectsize, authordate, committerdate, creatordate, taggerdate). All other fields are used to sort in their byte-value order. C-u y r (instead of just y r) - opens nice popup where you can set things right.

ag15:10:18

note that you may need to set evil-want-C-u-scroll to nil - if you want to use C-u for universal argument. Otherwise SPC u works fine

ag16:10:05

Magit has gotten so big - now it has it's own extensions. My favorite one is Sean Allred's magithub. - it lets you see pull requests, issues and CI status - all the stuff that you usually see on Github - now you can see all that right in the magit-status buffer. And even more - you can create new issues and PRs - without even leaving Emacs.

jeff.terrell16:10:40

I tried using something like that a year or two back, and I never got it working very well. Do you have much experience with github-related stuff in emacs?

ag16:10:25

Yeah, magithub works great - it's a bit of a headache to set up the auth - (especially if you use 2FA), but after that - it's totally dope

jeff.terrell16:10:00

OK, good to know, thanks. Might have to check that out.

jeff.terrell16:10:36

I spend more time in Slack than Github though, and I still haven't gotten emacs-slack (or whatever it's called) working, so that might be higher priority in the spacemacs-fiddling queue.

ag16:10:57

I've tried using it, but couldn't get used to. I have set-up AtomicChrome, so I can edit any text in the browser. That way I can use Slack client in the browser and still be able to edit text in Emacs - but I couldn't get used to web-app either

jeff.terrell16:10:34

Hmm, that's too bad. I heard good things about emacs-slack somewhere, and I was hoping to avoid the current memory hog. But maybe it's not good enough (yet), I dunno.

ag16:10:51

I am on Mac. I'm using Hammerspoon and my own config I called Spacehammer (because it is inspired by Spacemacs) - I added some nice things that help me deal with the Slack app