This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-06
Channels
- # announcements (1)
- # beginners (147)
- # boot (9)
- # calva (28)
- # cider (3)
- # circleci (18)
- # cljdoc (54)
- # cljs-dev (55)
- # cljsrn (22)
- # clojure (179)
- # clojure-canada (9)
- # clojure-dev (74)
- # clojure-europe (1)
- # clojure-italy (15)
- # clojure-nl (7)
- # clojure-spec (30)
- # clojure-uk (55)
- # clojurescript (65)
- # core-async (15)
- # cursive (12)
- # datomic (16)
- # events (4)
- # fulcro (25)
- # graalvm (3)
- # joker (2)
- # kaocha (15)
- # keechma (94)
- # off-topic (12)
- # qlkit (2)
- # re-frame (15)
- # reagent (11)
- # reitit (29)
- # remote-jobs (15)
- # rewrite-clj (16)
- # shadow-cljs (73)
- # spacemacs (144)
- # sql (3)
- # tools-deps (11)
- # unrepl (19)
- # vim (35)
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
@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?
+1 for evil mode. lisp-state
is amazing. https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#editing-lisp-code

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.
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 https://emacs.stackexchange.com/questions/35946/strange-behaviour-on-evil-delete/48282#48282
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! https://kinesis-ergo.com/shop/advantage2/
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
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 https://shop.keyboard.io/
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. https://github.com/tekezo/Karabiner-Elements
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.
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.
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 ☺️
This is similar to how I used Spacemacs for the first 6 months or so, before I went Evil 🙂
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.
check this out: https://github.com/agzam/spacehammer
I’ve been procrastinating a lot. It would be nice to record a screencast that demonstrates the features
Yup, extremely useful for me. I am forced to work on a Mac (at work). Fortunately that thing helps me to stay sane.
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
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
In the last 4 minutes I learned about your project, about fennel and about hammerspoon
@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
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
Spacevim does similar thing. I think it took over after Spacemacs, but the point is - it was possible to do in Vim before Spacemacs
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
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
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.
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
Vim is like Lisp. Just like Lisp not a language - it’s an idea. Vim is not an editor - it’s an idea.
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
Maybe it is some secret repressed anger balled up from people always wondering why I prefer Holy mode hehe
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
> I have custom bindings for all that Yeah, that’s my point. Without modality you are forced to keep adding keybindings.
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.
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.
And I find that with Esc, I need to move my hands away from the home row even more then for arrow keys
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
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
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.