I must be committing heresy by admitting this, but I just can’t use Emacs effectively. I know it can do almost anything, and that it has everything to support clj/cljs development. For some reason I always get caught up in key combinations I cannot remember, or worse, remember incorrectly. I end up splitting panes, removing lines, or whatever other thing I did not mean to do. Jacking in a REPL seems to work, until it doesn’t (usually because I made a mistake somewhere along the line). My navigation sort of works, but I get lost in larger projects. I yank when I want to kill and vice versa. I’ve been at it for years, but somehow my brain doesn’t accept it. I guess in the end I need a folder/file tree, a mouse to point, a keyboard to type and a REPL on the sideline in a terminal to feel a bit more comfortable. Anyone else have these issues, or am I the only one struggling?
you are not the only one. Don’t worry about it.
Same
I’m not so much worried as frustrated. I should be able to master it. My brain or finger memory disagrees unfortunately
I suspect in the future there will be a special name in the neurodivergent spectrum for people who can handle Emacs 😉
One of the reasons that I use vs code is because between that and calva, it provides for me what I need in a generally sensible way already. I have been working on a vs code extension called codecloud that I am excited about and it is sort of my own personal take on what an editor should be, and I plan to release a video of some new features later today. (It integrates with VS code, less than trying to override it or anything… I try to use the strengths of what already exists in everything of course) - I actually often think about how much I love VS Code as an editor lol, but I'm also not super picky I feel like, enjoying most takes on what programming “should be”. Emacs is great but to swear fealty to one IDE feels like kind of a “vanity feature*” thing, I think, given that any other ide can essentially do the same things if you want it to; Emacs is almost just the “cleanest base option” for people who love to tinker with every little detail. *by which I mean “These icons don't need to be colored in three different themes, but I want them to be, and also they should be toggleable, and also they should hide when the mouse isn't hovering, and also……..” (The customizations can be amazing, and personable/contextually ergonomic but often replicable or standard in other ides without any tinkering, often at the cost of time and effort). I do run eMacs on my Linux partition though, and yes it is arch btw.
Interesting, I look forward to that video. Right now I use Pulsar. Haven't tried Calva yet
^This video is an inspiration!!! A Clojurist LISPer (my b) who is also an ordained Buddhist Monk in Germany. It's such a fantastic demonstration of technique and creativity.
Of course it's all eMacs, and definitely shows off the most amazing things imo. I do want to set up mu4e for email still sometime.
I used Emacs for a decade way back (’85-95), then moved to other IDEs. When I picked up Clojure (2010), I went back to Emacs because that’s what “everyone” was using then. Over the last 16 years, I’ve switched from Emacs to LightTable and back, to Atom (and back), and finally to VS Code, initially with Clover (a port of Chlorine for Atom, using the Socket REPL) and then with Calva (and Joyride and Backseat Driver).
Emacs is great but it doesn’t “click” for some people and I found myself spending too much time customizing my setup (I went back and forth on various other folks’ Emacs configs, as well as building a few of my own). It just felt a bit “old-fashioned” to me.
VS Code with Joyride to script it in ClojureScript (via sci) feels as programmable as I need (not as programmable as Emacs but good enough), and Calva connected to nREPL + cider-nrepl middleware (and, for me, Portal’s middleware and Rephrase too) is a great, modern setup that I can customize heavily if I want to, or stick with the (fairly) sensible defaults.
If anyone’s curious, my VS Code / Calva / Joyride / Portal setup is here: https://github.com/seancorfield/vscode-calva-setup and I use it with the aliases and configuration from here: https://github.com/seancorfield/dot-clojure including my custom setup of the new Clojure CLI REPL from the core team (and some customization of deps-new).
was that 1985 or 1885 @seancorfield ?
nice setup Sean
Some days it feels like it was 1885 🙂 But, yeah, 1985, while I was doing my postgrad work and then my first job.
> I’m not so much worried as frustrated. I should be able to master it. My brain or finger memory disagrees unfortunately Every time I re-learn a shortcut, my brain says “I couldn’t have picked a worse default if I tried”, and then refuses to memorize it, because it’s so dumb. Also, no matter the editor, or the plugin, the repl integrations instantly makes a stable text editor feel unstable (UI tread getting locked up, a million new shortcuts and menus, crashes when you connect to a DB the wrong way, etc). A simple text editor window, next to a terminal window, copy/paste across, feels so much less stressful.
@jasonkostempski I agree. I have 2 large monitors that allow me to position a window anywhere I want, so separating the editor from the REPL for me is good enough
Interesting. I mostly rely on either inline results, or data showing up in Portal (inside VS Code) so I pretty much ignore the REPL window and never copy’n’paste into it (and almost never type into it).
@seancorfield I rarely use inline evaluation, I find that it clutters the view too much, I prefer to keep it separate, even though that creates a bit more overhead in use. I guess i try to have few distractions on screen
> Right now I use Pulsar Amazing surprise 😄. Maybe with a few more we’ll be an option in the next “State of Clojure” survey! Now, it’s not only you. I tried, and failed, to use Emacs multiple times. I essentially felt that no matter what I did, I would stay in some “intermediate mode” or “intermediate keybinding” and could not leave, cancel, or even exit the editor
@mauricio.szabo Pulsar isn’t perfect, but it is good enough for me. I have similar issues with Emacs, don’t get me started on buffers and switching between them. I would get that wrong so often it is ridiculous
I fully support that different things click for different people, but calling Emacs “vanity” is a wild take. It’s basically the “stop liking thing I don’t like!” argument.
When I said vanity I mean moreso I think that being attached to an IDE is a bit silly in general because they are mostly the same (at the end of the day “a text editor”), so I prefer VS Code, but lightly and I don't think it's any better or worse than Emacs. Didn't mean to cast shade at all. I also use the word “vanity” a lot to refer to things I call “vanity features” which are “things that really don't need to be there, but just hit a particular spot that it's worth the extra 30 min to make it work right”. Sorry if it came across antagonistically because it was not meant that way at all.
Yeah, it did read to me as “anybody using Emacs is a poser, because you can do the same things in a different IDE with lower barrier to entry”. Good that you clarified it wasn’t the case. Same goes for Clojure vs any other popular language that can do all the same job, so why bother with Clojure and its idiosyncrasies. Anyway, at this day, hats off to developers that use literally any IDE over the sweet-talking slop machine.
I’m very biased for Pulsar, but I agree - isn’t perfect, but for me, other options don’t get close to what I want (except Emacs, which I struggle to use, and VIM, which I actually like but I feel most plug-ins feel “out of place”).
@alexander.vanelsas during the covid months I spent quite some time to come up with a shortcut system that is consistent across emacs and my sway window manager. During its conception, I had to decide what is important and what to leave out (isn’t it the Clojure way? 😄). I use hydra to specify menu entries manually so I can start using them from day one, and even ended up writing a hydra-like UI menu for my window manager
@myguidingstar that sounds like a good way to simplify
I found that Emacs didn’t work for me until I started using a modal editing package w/ a leader key and a HUD instead of remembering chords. Something like evil mode, god mode, or meow. I can press the space bar and discover the command I want rather than having to memorize things. And when I have memorized something, it’s just as fast (if not faster) to type.
I really like lispy way of editing, and also make my own hydra menu for all of the functions I use, and use ryo-modal for non lisp languages, sharing many of the shortcuts
@lilactown that’s interesting, I need to try that. Never got to that point
Old Wisdom about Text Editing comes to mind. > “When you are hungry, eat; when you are thirsty, drink; when you are tired, sleep.” http://www.catb.org/esr/writings/unix-koans/shell-tools.html
Whereas, True Enlightenment looks like this: > “yeah, I’ve seen editors like that, but I don’t feel a need for them, I don’t want to see the state of the file when I’m editing” --- Ken Thompson https://web.archive.org/web/20080103071208/http://www.dcs.qmul.ac.uk/~george/history/
I just can’t use Emacs effectivelyIf an editor does not support my daily-driver keyboard muscle memory, then I cannot use it effectively. That happens to be Emacs-first, Vim-second, and that’s it. When I am on IntelliJ or VScode, people don’t believe me until I exit zen mode and bring back all the menus and sidebars and default widgets such that the code window becomes 60-odd chars * a very small number of lines lolcry.
Community configs like Prelude, Spacemacs and Doom Emacs have made Emacs much more accessible and they greatly increased Emacs use across many programming languages. Rolling your own Emacs config is ideally for those wishing to hyper-customise or create a very minimal/specific experience. At ClojureBridge London events we had people new to Clojure trying out Emacs successfully (their choice). It only took interest and a little bit of support. The editor you use every day is the easiest one for you to use. All others take practice.
@adityaathalye I come from a time where vi was the main editor. But I’ve grown out of it I guess. Now I find it difficult to be an emacs adept, so I ended up in a more traditional editor
I mean it’s a similar argument that lisp languages make in regards to “familiarity” vs “ease”. For most people just recommending they enable ‘cua-mode’ (where C-x, C-c, C-v, C-z, and some other behaviors are similar to file managers and most apps) and keep the menu-bar active should make it familiar enough as a starting point. But the initial presentation is definitely rough. However, there is no other system that is more introspectable or self-documenting than Emacs for more advanced use-cases. (Redefining caps-lock to Ctrl or having a dedicated thumb key for it is definitely a huge upgrade though)
@alexyakushev my colleague is able to do magic in Emacs. I look at it with awe and realise I am just an amateur.
I remember struggling with vi very early on and being amazed at what a colleague could make it do! My wife was in IT way back and she still refers to vi as “vicious instrument” 🙂
I found emacs easier to be productive with than vi but since then I’ve found a lot of editors easier to be productive with than emacs 🙂
wq is probably the only thing I can still do without thinking 🙈
I've been using Neovim for 5 years now and never used :wq or :q yet 🤣
I did bootstrap my first Neovim config with Emacs though.
fyi :w:q creates a new file called :q
That proves my whole point @noisesmith. My brain just doesn't hold these keystrokes correctly 😅
You might need an exorcism from the Church of Emacs as your mind might be infected by evil ways of vi or even more sinful ways of fully mouse-driven IDEs. I don’t know if you can ever heal spiritually.
Nowadays I use nvim primarily and I did use Spacemacs quite a lot back in the day. I really didn’t want to configure everything from scratch. It was working but my dealbreaker was that 1k+ files were slow to render somehow and the keypress->update lag was also not great. And then the debuggers and everything kept redefining their own bindings and overriding things. I chose a simpler tool.
For those of you who do still want to learn Emacs, the first thing to do (imo, it’s what made it finally click for me) is to ignore all the key bindings except one: M-x (which is opt-x on mac alt-x windows/linux spc x in Doom and spc spc in Spacemacs I think). This is Emacs equivalent of the cms-shift-p command palette, except that it can trigger literally everything you can do with a keyboard (and many things you can’t). (It also predates command palettes in other software by several decades.) Then learn describe-function, describe-key, and describe-variable and you have everything you need to progressively explore and discover Emacs in a way that isn’t possible in any other software I’ve used. For me, this interactive discoverability is a major reason I still use Emacs to this day. (And, FWIW, I use Doom in Evil mode.)
I haven't tried an exorcism yet, the first time someone suggests it. Who knows, it might work!
@selahb great suggestions, i’d also add apropos for searching command names and docs, and there’s a setting or command or mode (i forget the name and it might be on by defaut by now) for fuzzy search inside M-x (it can autocomplete from the middle of the command, not just the prefix). I switched to nvim nearly a decade ago because my config was too big and updates would break things and I have zero patience for things changing out from under me in my tool stack
@alexander.vanelsas re: https://clojurians.slack.com/archives/C03RZGPG3/p1794848927698719?thread_ts=1794836348.926379&cid=C03RZGPG3 … Yeah I totally get it. That said, unparalleled usability and accessibility is the best user-facing part of Emacs. So if you ever try again, I advocate entirely rejecting “default Emacs canon”, in favour of EViL Emacs --- your muscle memory is invaluable. Alas the “unparalleled usability and accessibility” (true fact!) is tragically obscured. Understandably, GNU documentation reinforces the built-in defaults. However much worse is done by strident gatekeepery proponents of the “Canonical C-M-S-x-Keyboard-Only-Or-Die Emacs Way”, who to their eternal discredit, will jump-scare you for “holding it wrong”. Whereas, the whole point of having a fully customisable self-documenting software is that, by construction, there is no wrong way to “hold it”!!! So yeah, though Emacs and Vi carry their respective “original keyboard layout” baggage---Lisp Machine / Space Cadet / Symbolics era layouts for Emacs, and vi’s origin in UNIX machine + extreme brevity culture---Emacs editing is unlike Vi because Emacs can become anything we want, including exclusively mouse-gui interaction or voice-only drive.
@adityaathalye I guess, and that is on me, that I find it difficult to decide what “anything we want” should be in Emacs. I can’t seem to find a mode that works for me. But I am inspired by the suggestions, so perhaps I will give it a go again :-)
I configured Doom Emacs keybindings to feel like VSCode with Calva. https://github.com/clyfe/dot-doom2
I was inspired by the https://old.reddit.com/r/emacs/comments/lly7po/do_you_use_emacs_lisp_as_a_general_purpose/gnvzisy/ Emacs story form Cdegroot where he configured Emacs to feel like VMS in the 90's
@alexander.vanelsas I read your comments here that you sense some sort of failure on your part that you’ve found emacs hard to use or doesn’t fit your needs. Don’t worry about it. Find what works for you and get on with your day.
@alexander.vanelsas instead, stay in the Pulsar side, we have cookies! (actually no, we don’t. We removed “cookies” by mistake when we removed “telemetry”, my bad 😄)
@grzm I feel a bit frustrated sometimes because the premise of Emacs is attractive. Configurable, can do anything you want. It just doesn't do exactly what my brain expects
@mauricio.szabo cookies are my cryptonite! 🍪
BTW, is more-or-less the premise of Pulsar too 🙂. The only thing we can’t do is to customize the full source code of the editor in userspace… … yet….
Would it still be Emacs at that point, tho’?
Even in “zen” mode, I routinely mouse-hover over symbols to pull up documentation and/or “intellisense”-style information for the symbol.
@adityaathalye that is something I’ve never seen, didn’t realise that was possible! For the past few years I’ve been toying with the idea of just building my own simple editor in the browser. I have very few requirements and most of these are available in great libraries like codemirror etc. I got to try this IDE mode to see how that feels. I’ll need to figure out how to set that up
@alexander.vanelsas have you been trying any specific emacs ‘distributions’? spacemacs/doom? for me bare emacs is unusable, but add evil mode and few additional goodies and it becomes fun. vim motions are superior
@andrzej.fricze I used spacemacs mostly. I think the challenge was twofold. 1. I was uncertain how to configure things in such a way that it was to my liking visually (I guess IDE like) and 2. I got lost in the huge lists of key combinations and using them incorrectly would get me to buffers I didn’t want to be in, text getting killed instead of barfed etc etc). I even tried working with a printout of about 1 page next to my keyboard for all these combinations, but in the end I felt it was too much. Don’t get me wrong. I was able to use Emacs, but if I still split buffers by accident after a year or so, and then it takes more than a few seconds to fix that again, then something isn’t right (for me) 😅
sure
understandable 😄
I’ve been able to work around cemented muscle memory going from (and between) IntelliJ > vim > emacs. But I agree that emacs is the hardest with all the key acrobatics and the amount keymappings per mode involved. But for some reason I persisted, using magnars’ config as a guide (which has since been rebooted https://github.com/magnars/emacsd-reboot), builing my config from scratch. I’ve stuck with standard tools as much as possible, trying to learn them (the search/replace videos by Prot has been very helpful), and otherwise pulled in bread-and-butter editing tools like multiple-cursors, expand-region, avy (Karthink’s guides on Avy has been eye-opening). One small thing that has been essential for me on mac (which I picked up from magars’ config) is rebinding Cmd and Option so that Cmd=Meta and Option=Super
For me, Mickey Petersen’s blog and book Mastering Emacs has been the biggest productivity boost, and what took me from using Spacemacs/Doom to learning the built-in tools and bindings provided by emacs. Do I remember them all? Of course not. But I try to focus my use of key combos to the things I use all the time, and use “M - x” to browse commands and find the rest there. I think some of my emacs ergonomics come from my Ergodox EZ keyboard as well, where I set my keymappings in an attempt to reduce strain from reaching control, meta, etc.