Fork me on GitHub

Ah, it seems I just close the buffer. I didnt notice a new buffer had been opened when using sudo-edit. Thats quite neat, but surprised I couldn't find any docs about it (or am just having a bad search day)


Is it worth changing to holy mode? Feels like it would be better to use Emacs bindings for Clojure since it's a Lisp. Whats your thoughts about this?


i use holy mode, but only 'cos i've always used emacs, i don't think it matters much which you use

👍 4

@jarvinenemil I started with holy mode as I was using Emacs before Spacemacs. I gave Evil a try one weekend after learning about multi-modal editing and am very happy I did. Evil mode makes editing and manipulating code so much quicker. I find I can also type a lot quicker, for longer and will no risk of RSI with Evil mode. This is in part because I never need to move my hands around to do the Emacs key combo's (like C-x C-e), I can just use individual key presses (like , e e). I find this much faster and requires less conscious thought, so I can focus on the code I am writing. I would struggle to go back to Holy mode now, it would make me feel much less productive. I don't understand the correlation between the key bindings and the configuration language of Emacs (elisp). Am I missing something? Can you enlighten me?


most important default Emacs bindings like <C-l> are still available in evil-mode. But things like ex-commands aren’t available in holy-mode.


Something important to keep in mind, Emacs bindings aren't a real thing. Emacs has almost no default bindings. The set of things already bound is very small. Thus it is better to think of Holy mode as custom bindings, because you'll probably want to customize a lot of the bindings and non modal editing. Where as Evil offers modal editing and the Vim bindings, and there are a lot of them, almost everything is already bound to some Vim binding.


Also, Spacemacs has its own set of bindings. It is fair to call them the Spacemacs bindings. Those are there whether you are in Holy or Evil mode and they are awesome. They are mnemonic, and easy on your hands.


They either all begin with Space or with Alt+m (aka M-m) depending if you are in Evil or Holy mode, but apart for the leader key, they are the same.


@didibus Emacs has quite a few default bindings, but they are very primitive (compared to Vim bindings) - C-f/C-b, C-e/C-a, etc. it’s useful to know them too. They work not only in Emacs.


So I'd say, definitely get acquainted with the Spacemacs bindings, but Holy vs Evil doesn't matter for these. Where evil + holy matter is first, do you like modal editing? I don't for example. And the second is, do you like customizing your bindings to your liking? If so, Holy is the way to go. Otherwise go Evil.


@ag Ya, but there's very little of them. So any serious Emacs user will need to enhance them with custom one, because a lot of the common commands lack a proper binding.


I'm talking editing ones. Also, for most actual commands, the Spacemacs ones are far superior and Spacemacs users probably want to use those instead. So most of the the C-x and C-c command chords are superseded by the Spacemacs bindings.


So for example, what @jr0cket mentions, that's not a fair comparison. In Holy mode, you shouldn't have to use C-x and C-c either for all common cases. You would do M-m or M-Enter.


Which are RSI friendly, due to their use of the thumb.


Not directly related, but since we are talking about evil mode, I’m not at a place yet in my emacs/spacemacs journey yet where I can keep my big goofy hands off the mouse and was bothered by how evil mode was behaving when mousing off searches in progress. For details and a solution see


I started my emacs journey not using evil mode, and found for the first time in my long programming career I was having pain from typing. So I switched to evil mode. For me it works. I also bought an Kinesis Advantage 2 keyboard. Took a bit of getting used to, but also works for me!


I also when I started with Emacs began having pain for the first time. But moving to using the Spacemacs bindings made it go away. It was mostly the use of C-x and C-c which caused it. Also, the second thing was getting used to using the opposite control key. So like you press the right meta or control or shift key if the following letter is on the left side of the keyboard and vice versa. That way combo key presses use both your hands, and don't need them to contort.


So for saving for example, you'd press the right Ctrl key with your right hand, and press x s with your left


It took me maybe a week to adjust.


No more pain since


I did get what is referred to as "Emacs pinky", from using keyboard combos a lot. Evil minimising this so much, it made a big difference. And once I learnt the basic Vim approach, getting a Model01 keyboard was a perfect fit

👍 4

that looks like a great kb!


Have the same - pure magic!


Don’t get me wrong, I am happy with my kinesis advantage2, but hey I’m not dead, I can still admire a beautiful keyboard.


> opposite modifier keys This helped me as well. If you're on a Mac you can use Karabiner-Elements to enforce the practice while you're getting used to it.


Another thing that helped me was disabling the control keys entirely + using caps lock for left control and return (if used in combination with another key) as right control. (Also achievable with Karabiner-Elements.)


I still think with Spacemacs you don't get the Emacs pinky. So I'm just trying to say for people who aren't super into modal editing like me. The criticism towards Emacs bindings for hand pain I think don't apply to Spacemacs. Obviously, we're all different, but for me, moving from Emacs to Spacemacs Holy mode was enough to make the pain go away. So I wouldn't disqualify that.


Glad it worked for you! 🙂


Haha ya I might sound a bit annoying. I do think the beauty of Spacemacs is choice and Evil is great. But I also feel I rarely see anyone really using Holy mode the way I do. Which is that you mainly use Spacemacs bindings with M-m, M-Enter (or M-m-m) as you would in Evil mode use Space and , . And then for what's left of the Ctrl or Shift modifiers like C-g, C-y, C-h, C-e, C-a, etc. You use the opposite modifier. Even then, their usage is much more limited after eliminating C-x and C-e, so depending on your sensitivity you might not even need to use opposite modifier.


Not annoying at all. Exuberant.


Hum... that's not a word I think of using often, but I like it. And I'm very much like that Haha, which can be a bit overwhelming to others sometimes ☺️

❤️ 4

This is similar to how I used Spacemacs for the first 6 months or so, before I went Evil 🙂

😈 4

Now I have quite a few extra custom bindings, which helps a lot with my productivity. And generally I'm way more productive then my Evil using coworkers.


Don't know how I would fare to a 10year + vim user. But to a 2year+ vim or evil user, I fare quite well.


That said, I'd say it's still worth trying out Evil, just because being able to maneuver your way around Vim is pretty useful. But if like me, you just never come to like the modal editing, Spacemacs offers a nice RSI friendly alternative to Emacs as well.


Vim motions aren’t just for modal editing. I use them system-wide - in my browser, in terminal, to change between apps, in my WM, to control music. It allows you to keep your hands in the home row.


finally got around to trying this, very nice! i'm a convert


edit with emacs is broken for me, and i followed all the instructions When I hit the hot key, it selects-all the text, and shows the emacs frame , brings it into focus, but no buffer opened.


any suggestions how to debug it? i looked at HS logs, but there wasn't anything helpful.


Beyond this though everything works : )


Maybe you're missing hs in the $PATH?


Oh wait, maybe spacehammer.el not loaded? Just to clarify, did it break it for you recently, or it's just not working the first time you try?


M-x toggle-debug-on-error see maybe something shows up in Messages buffer


I’ve been procrastinating a lot. It would be nice to record a screencast that demonstrates the features


Hey, cool, I’d watch your screencast to learn more! simple_smile


and for any kind of editing of text I of course use Emacs.


@ag Oh wow. How did you get Emacs's menubar to match your background like that?


I think (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t)) does that


Sure does. Thanks!


You are my hero @ag!


That looks so good


Thank you. You are very kind. Feel free to ask me questions or submit suggestions.


Not trying to be kind, it just looks very useful hehe 😃


Yup, extremely useful for me. I am forced to work on a Mac (at work). Fortunately that thing helps me to stay sane.


Yeah I have a similar situation


all the tools I need: spell checker, thesaurus, syntax highlighting, etc. is always available no matter in which app I need to type. I can open Chrome/Firefox DevTools and write javascript in emacs then switch back to the browser and execute it


Recording a quick screencast with keycaster or similar would be very neat


yeah, but as I already stated - I am very, very, very lazy person. I'm so lazy that I don't even want to move my fingers out of the home row... LOL


Haha, maybe I can help 😃 I’ll try it out first tho


In the last 4 minutes I learned about your project, about fennel and about hammerspoon


Pretty excited!


Wow. Hammerspoon and Spacehammer are blowing my mind.


Agreed! I think @ag might go through extreme efforts stay very lazy. simple_smile


It is the Emacs way. 😎


@ag that looks awesome! I think you should credit Spacemacs a lot more though, as far as I know, the idea of a leader key of mnemonically grouped commands which you chord together is a Spacemacs innovation, not a Vim thing. Might be wrong though, but I've never seen that in Vim


@didibus no, the idea of changing a leader key came from Vim. I used SPC as my leader key in IntelliJ as well


What's the feature in Vim for it?


I didn't know vim had a leader key


It’s been there like forever, by default it’s bound to ,


someone long ago figured it can be bound to SPC


What does the comma do?


In Spacemacs? It’s a current mode leader


In Vim, you mean \ ?


Also, I'm not sure that counts. I mean, maybe Vi invented the key chords first. Though it could be something even older or Emacs who knows. But the idea to group all commands behind a single one is pretty novel. Vim doesn't do that as far as I know


yeah, … right… it’s been long time. By default I think it’s bound to /, most people changed it to ,. It’s become a convention. For a long time it’s been like that, then someone figured it can be bound to SPC


Ya, but I don't know. In Vim, that's just because all other chords are already taken, so if you want to add your own bindings you got to start them out with the leader key


Its a bit like C-x and C-e in Emacs. Meant more for extended binding use


Spacevim does similar thing. I think it took over after Spacemacs, but the point is - it was possible to do in Vim before Spacemacs


I guess nobody bothered because vimscript is painfully… painfull


Oh, ya. 100%. It was also possible to do it in Emacs since the beginning. But the idea of doing it I feel is novel in itself and I like to give credit to Spacemacs for it


Not that it matters


Actually, I think I read an article that windows kinda did it first 😋, with how all the file menus can be navigated with key chords that start with the Right Alt


But no one seems to use that feature in windows hehe


I’m not sure what kind of credit you’re asking for. It’s literally in the name of the project. It’s in the description, the first line of the readme.


Oh, ya sorry, your readme is great


I was responding to the slack message where you said Vim isn't only about modal


So I took it as Vim is also about the Spacemacs style of commands grouped behind the leader key


Well, to be fair. Emacs style has been always like “Press C-c six times, then C-x, then tilde”, Vim style from the beginning was and still is focused around h/j/k/l. That’s the main idea - to keep your fingers in the home row


I barely touch mouse. I don’t use arrow keys at all


Vim is like Lisp. Just like Lisp not a language - it’s an idea. Vim is not an editor - it’s an idea.


and as it turned out Emacs can Vim better than anything


it Vims better than Vim itself


Ya, but isn't that modal editing? It's that there are operating modes. And depending on the mode, h/j/k/l are rebound to navigation commands or typing characters.


Whereas with Spacemacs concept of leader key, there are no modes. The leader is always available. And all commands are always there, though some can be contextual, but its app context, not user selected mode using a mode toggle button


Anyways, I'm being way too pedantic and dumb here with details 😋


Maybe it is some secret repressed anger balled up from people always wondering why I prefer Holy mode hehe


You already using modality, with evil it just goes one level deeper, that’s it


Well, I use Holy mode, so no Evil


Well, I do use some evil commands, but not in modal mode


I call them through the Spacemacs leader key


And in Holy, a lot of the evil commands are wrapped so that they put you back in insert mode after. So in Holy mode, you are always in insert mode


you’re missing benefits like jumping back and forth quickly (C-o/C-i). Can’t use ex-commands, etc.


e.g. with evil I have at least 3 different way to jump to a line: type number, press G, type : then line number, SPC j l


Basically, the difference is that char keys like a, b and c are always mapped to typing the character


And the only way they can be mapped to other things is through some leader keys in a chord, or with a modifier key, or contextually if you are in a special buffer


Not through a "modal state"


I have custom bindings for all that


But also spacemacs


So I can do M-m j l


Though avy mode is what I use most often


> I have custom bindings for all that Yeah, that’s my point. Without modality you are forced to keep adding keybindings.


but there are only so many top level keybindings you can add


That's where leader key idea of Spacemacs comes in


That’s modality


give it a try. try vimtutor, try evil-tutor in Spacemacs (I don’t know how good it is though), try playing vimadventures. You’d hate me at the beginning. But if you keep going, eventually you will love it.


I mean, I use Vim to a I'd say between beginner and intermediate level


For when I edit small files or scripts


But ya, maybe I should give it even more of a chance


But when I see my coworkers using Evil or Vim, they always seem so much slower at performing actions then I am


By the way, I don't consider that modality at all. You are still in the same mode, you just have more unique keybindings. Like SPC a a and SPC a b. There is no clash, so no mode is needed


it’s not about the productivity (not only about it), it’s also about ergonomics and mnemonics


That's how I use Spacemacs right now. With M-m as the leader. So all SPC commands I use actively. But to start typing, I don't need to change mode. It does mean I use the arrow keys, but since I don't touch type anyways 😋 and that might be my first problem, I tend to rest my hands near the arrow keys anyways


> start typing, I don’t need to change mode you think it’s a mental overhead, but once you build a muscle memory around it, it becomes very natural, you won’t even notice it. The benefits exceedingly overweight whatever discomfort you feel at the beginning.


Well, okay, I've never gone as far as moving Esc


And I find that with Esc, I need to move my hands away from the home row even more then for arrow keys


So it neutralizes the benefits of hjkl


you have the best of two worlds and you willingly ignoring one of them. I don’t use Esc on my laptop keyboard at all


And in windows, remapping the keys is painful. And also, I'm OCD and hate how my caps lock light would turn on and off all the time if I made it esc


What I need is a Vim Pedal


I'd be down with that


Pedal pressed down = insert mode, when not pressed normal mode


I might actually bite the bullet on one of those for real


What do you remap Escape too?


you know about evil-escape-key-sequence and C-[?


What's C-[


it’s basically Esc for lazy people


or for people with macbook pro with touchbar


evil-escape-key-sequence lets you bind a sequence of keys. you can quickly press jk (for example) instead of reaching out for Esc


Okay, I have to say that I do feel I need to give it a better chance. Even if I go back. I need to try it fairly to really.know that I don't prefer it


I might see if I have some time, and switch to Evil mode for a month


Or something like that


As I said: Vim is an idea. And it doesn’t look very appealing for uninitiated. But if you give it a leap of faith, use it for a while you will see the benefits.


The only true drawback I can think of: if one loses a hand, it probably will be extremely difficult to re-learn. But I think losing a limb by itself kind of a big deal with or without Vim style.


I would imagine that modal editing is actually easier if you only have one hand. :thinking_face:


I dunno… maybe there’s a secret society of one handed vimmers/evil-mode users?


finally got around to trying this, very nice! i'm a convert