Fork me on GitHub

I always have trouble to remember some keyboard shortcuts, especially for some cider modes - debugger, spec inspector, etc. Is there a way to show current key bindings, e.g. when in the middle of debugging a function to avoid going through


I have to say, Spacemacs + Cider is much more enjoyable than trying to set Cursive app with IntelliJ.


However, I have this annoying thing that sometimes I want to get out of some mis-typed command and press ESC many times, then eventually all the windows will disappear and one buffer (usually cider-error) will take over my frame. Is there any way to get back to my previous windows arrangement?


@jumar yeah -- there's stuff under SPC h d. In particular, SPC h d b (describe-bindings) is the thing you're looking for. It's a bit overwhelming, though, so you might want to play with the other stuff in that section. Some modes use ? to show mode-specific bindings, but it's not consistent.


@orestis yeah, actually! winner-undo is exactly that, undo the last buffer/layout/window change.


Also SPC w m toggles maximize-buffer, so if you were taken to the full-frame state via maximize buffer, that'll often change you back to where you were.


Having an independent undo stack for UI changes is a kickass idea IMHO and I wish other tools would adopt the same thing 🙂


@eggsyntax thanks for the tip. I guess that's the same as Emacs's C-h b. You're right that there's a sectoin about cider--debug-mode. However, that's not terribly useful:


Whoa, weird, never seen that one.


You know there's also a little thing in the buffer you're debugging that shows you the main commands? It can be easy to overlook; placement is often at the top of the fn you're debugging.


Fabulous! I don't know how could I missed that. Thanks a ton.


eg n)ext, q)uit, l)ocals ...


Thanks! I’ve starred this to keep track 🙂


magit question -- as mindblowing as magit is, I have one minor use case I keep tripping over -- sometimes I s)tage a hunk, only to realize it included something I didn't want to stage yet. So I have to go up to the filename, tab-collapse it, go to the staging section, tab-expand the same filename, and u)nstage it, then tab-collapse, go back to the unstaged section, tab-expand, and find the hunk again. Is there some way to just undo the last staging-action? Or some other quicker way to reverse the premature stage? Esp @ag since you've become our de facto magit expert 😉


I'm not sure exactly how to do that. It's probably possible. I bet you'd be interested to learn about so called wip modes thought


I'll check it out (ha ha no punintended). Thanks!


@eggsyntax - I don't know of an "magit undo stage" command, but I do know of some shortcuts that might make that a little less painful. (1) You can hit 1, 2, 3, and 4 to change the display level of whatever the cursor's at. So instead of tabbing around, you might be able to just say e.g. 1 to collapse it all the way. (2) You can select specific lines to stage or unstage with v.


#2 I use & is maybe my single favorite thing about magit 😄 #1 is brand new & def will save some time. Thanks!


Hey don't forget about M-1..4


Hmm...for me that does the same as just 1..4, without meta.


M-1 in magit-diff buffer should be bound to (magit-section-show-level-1-all)


meaning M-1..4 toggles ALL the sections


Ohhhh, gotcha. I happen to have only unstaged changes at the moment, so I didn't notice the difference.


Ah, that's really good to know! Is that only the diff buffer, not the status buffer?


no it works everywhere


Yeah, it's a killer feature. In the beginning I didn't use magit-diff buffer much. I would find a hunk and press e and compare things in ediff. That's handy. But then I did two things: - I have changed the colors to make the diffs more readable - I started using 1..4 and M-1..4


That's really good to know. I'm always wanting to do that in a magit diff buffer. I usually go to the last line and hit 1..4, which I think has the same effect, but no longer!


Nice. Want to pass along the color portion of your config?


Awesome, thanks! Yours I may go through in detail 🙂


The only color change I've thought of doing is making the hunk headers stand out more -- they're easy to overlook, which is how I get myself into the fix I mentioned earlier where I've staged more than I meant to..


Choice of the color-theme itself deserves a conversation. For a long time I've been searching for perfect one, something I would really like - I used Obsidian, then I switched to Zenburn (because it was the most popular Emacs theme). Then one day I realized - the less colors you have, the less strained your eyes would be. That's how Spacemacs' default themes do too. But the dark one has way to much pink to my taste.


Huh, interesting. "the less colors you have, the less strained your eyes would be." Is there evidence for that? It's not immediately obvious to me that it's true.


I don't like a zillion colors, but I like to be able to distinguish the various things that can be colored differently.


After all I have decided to stop trying and now I'm using Base-16 Ocean Dark (with my own customizations) and Spacemacs' default light theme. This is perfect combination for me. Whenever it's too bright in the room and there's too much glare I would do SPC T n and switch to the light theme and vice-versa


> Is there evidence for that? this is very subjective and YMMV, but the right choice of a font and the color theme is like choosing a knife for cooking. With a perfectly balanced knife you can cook with pleasure for hours.


Oh, 100% agreed on that.


I haven't noticed more colors being more tiring, but I'll start keeping an eye on it.


I can't recommend this thing enough


I have a strong preference for muted colors, though; for me it seems to be bright, vivid colors that wear me out. Especially when they're not within some sensible color palette.


Yeah, for me base16 is actually probably too bright.


I did the two solarized ones for a looong time, now I'm on zenburn for dark.


please try it, find your perfect theme, sprinkle it with your customizations - ahhh... that's like getting married to a woman you love


Oh, for SURE 😄


I've spent many, many hours on that over the years. Solarized is tough to beat IMHO; I just finally got tired of it in the last year.


I do prefer "pastel" colors myself. Don't like too vibrant


Font, too, for me.


Drives me MAD to program all day in a bad font.


for me, the best part about solarized isn't that it's amazing or the best or anything, it's that it's available everywhere, for every platform and editor you could want


and you know it'll look fine


don't have to fuck with it, just set it any forget it


I do love that...although it's part of what led to me getting tired of it, I think; I was using it everywhere.


But it took > 5 years for that to happen.


I haven't gotten tired of Solarized yet, but I'm enjoying the conversation and might have to fiddle with it someday. simple_smile


solarized is nice - I used it for quite awhile. But I think I'm too picky. Too much blue and green - makes me depressed, too much red and yellow - my eyes get tired.


When it comes to Font: I've tried Menlo, Ubuntu Mono, Input, Kermit, Source Code Pro. I really liked Input. Today I'm using Source Code Pro. From time to time I get bored and try a different font. I think I spend too much time trying to improve my productivity.


Way too much.


fira code for me


So it actually becomes really counterproductive


❤️ ligatures


Source Code Pro is my 2nd favorite, these days; Hack has become my #1.


I'm not that picky, I just need a dotted or slashed zero and ligatures


yeah, that's something I have to yet to try to get used to. I don't like ligatures. I don't know why. Maybe just need to try it for a week or so


But same, I've probably tried a couple dozen over the years...


I did switch to Fira Mono on mac, because oddly, I got a significant speed boost from it (a tip buried in one of the endless how-to-speed-up-spacemacs threads)


@chris is there a difference between Fira Mono and Fira Code?


fira code has ligatures, mostly


it also changed a few symbols to clear up a couple things


Oh, that's tonsky's, right?


like, the angle bracket characters look different than fira mono to make them a little more distinctive, it's mostly just little tweaks


I did like that one. I can't recall testing it for speed vs Fira Mono, but my guess is that I didn't get the speed boost or I would have used it.


I liked Inconsolata a lot, too; that's probably my 3rd fave.


well, you also have to add a bunch of hackish things to get emacs to render ligatures correctly


so, I can imagine that if you were just browsing around with fonts that probably wouldn't have appealed too much


No, I definitely remember using it & liking it. It just didn't quite end up as one of my top couple.


And didn't give me the speed boost, I think (which was the only reason I switched on mac).


Godddammit... I still can't understand why nobody has found a way to fix this thing. Why the heck we can't just go back to the definition? spacemacs-jump-handlers for clojure modes simply broken and I really hate that. This is the only thing where I can't win the argument against IntelliJ


because in Intellij in simply works.


The thing that pisses me off the most is my own laziness and inability to write an elisp function that would try to use cider-find-var and if for whatever reason it fails to find correct definition - it would fall back to dumb-jump-go.


because dumb-jump-go works fine in like 80% of cases