Ask HN: Does anyone Lisp without Emacs?
EMACS and SLIME are the default development tools for Lisp. I have a desire to go deeper with Lisp but every time I approach it, my distaste for EMACS prevents me. My problem with EMACS is not so much that it's different, but the keyboard commands hurt my hands and I can't see using it long-term. I do Jiu Jitsu and practice guitar every day and I already find that I have to be somewhat protective of my hands and limit certain activities or I end up in lots of pain. I'm looking for viable alternatives to EMACS for Lisp, preferably something free because I'm just doing this as a hobby.
21 comments
[ 4.5 ms ] story [ 60.2 ms ] threadIf you prefer Vim, there are two major options: https://susam.net/blog/lisp-in-vim.html
You can also uses a normal editor and copy-paste to the REPL.
Xah Lee is right about that. http://xahlee.info/
The odds that you can create a custom layout more ergonomic than using an appropriate keyboard are not great.
The odds that you can do so more quickly than Amazon can deliver you an appropriate keyboard are vanishingly small...
As Larry Ellison said, "You are holding it wrong."
Good luck.
Others do Lisp in a variety of IDEs.
I prefer Emacs, but it is not the only option.
To answer your question, if you are not looking for particular LISP I would checkout Racket as I think that has a non-emacs IDE.
If your problem with emacs is only due to key bindings my advice to you is stick to emacs for at least editing your lisp code. In my opinion Emacs+SLIME (or SLY) is an unrivaled experience, not just when it comes to writing common lisp code, but compared to writing any other code in any other IDE. Instead look at increasing your lisp writing ergonomics in emacs. First recommendation I have is to use a structural editor like paredit. Look at few videos at emacsrocks to see how this works. This is one of the things that now makes me dread editing code that doesn't use s-expressions.
My other suggestion is to look into spacemacs or doom emacs. These are emacs distributions with vim (or hybrid) keybindings that go well beyond what you can do in vim itself. When I decided to give emacs another go it was largely thanks to spacemacs that I am now a heavy emacs user. It wasn't because of vim bindings (I don't care for these to be honnest) but because it demonstrated the things emacs can do.
One benefit of learning emacs is that it really is a tool for life.
https://www.spacemacs.org/
https://paredit.org/
Just check the keybindings of anything eval in SLIME for a Lisp file buffer:
Evaluation of Lisp code is central to Lisp. But the keybindings are just awful. Generally getting rid of one layer of prefix keys would be a start.GNU Emacs also still believes that my Mac has a Meta and a Super key. It hasn't. Every new user has to learn keys which are not labelled on any typical keyboard produced in the last 30 years.
My Lisp Machine keyboards from the 1980s have Meta, Super, Hyper keys, though.
Another reason for you to stick to Emacs is Emacs Lisp. If you enjoy writing lisp you are not going to find a better piece of software written in any other lisp language. I prefer common lisp to elisp (alot!) but this is a fact in my opinion. Plus elisp is somewhat similar to common lisp and learning/appreciating the differrnces between the two will make you a better lisp programmer.
https://github.com/bbatsov/prelude/blob/master/core/prelude-...
Lol yep. When I figured that M-x means just Alt-x on my keyboard i was pretty peeved. Today I see it as a rite of passage.
> C-M-x
I use the first 2 keybindings you mention only with emacs lisp; the other 3 I had to look up.
I get a lot of milage from these:
... with C-c C-c probably the one I use the most, and it's pretty easy on the hands.The name slime-compile-defun indicates that it compiles DEFUN forms.
It actually compiles AND executes top-level forms.
"[...] Compile the current toplevel form.
With (positive) prefix argument the form is compiled with maximal debug settings (‘C-u’). With negative prefix argument it is compiled for speed (‘M--’). If a numeric argument is passed set debug or speed settings to it depending on its sign."
I started with Evil mode and then moved to Xah fly keys before sticking to the emacs bindings. Having the caps lock key bound to CTRL helped me a lot. I don't know if it makes that much of a difference for Emacs but using the DVORAK layout has helped my fingers
There are other bindings you can try like Meow or God mode but I don't know what the adoption rate is like for them. Emacs gives you the flexibility to set it up as you please. As others have mentioned, there may be other keyboard options that might be more helpful as well
https://github.com/emacs-evil/evil
http://xahlee.info/emacs/misc/xah-fly-keys.html
https://github.com/meow-edit/meow
https://github.com/emacsorphanage/god-mode
I'm also a blue belt.
https://www.spacemacs.org/