Hacker News new | past | comments | ask | show | jobs | submit login
Ultimate N00b SLIME/Emacs Cheat Sheet (pchristensen.com)
30 points by pchristensen on Feb 14, 2008 | hide | past | favorite | 21 comments



Summary of my response to tons of comments (also in the comments section on the page):

OK, here’s a summary of the things I’ll include in the next version. I’ll test them on my own for a couple weeks before I repost it. Why wait a couple weeks if people already recommended things? Because I still believe that an editor is valuable, and I want to make I can 1) use these new things to make sure they’re valuable, and 2) understand them enough to distill the essence into a simple 1-pager.

Font - something that distinguishes between I and l (possibly Monaco, Consolas and Bitstream Vera) and double check it.

Other formats - didn’t know the *nix format of choice so I was waiting for someone to tell me. Not sure how plaintext would work (either one column w/regular font or multiple w/fixed width font) but I’ll put that and an HTML version up next time.

Paredit - recommended twice. Will investigate.

A few more commands regarding indenting, etc.

Refcard templates - never heard of them. I’ll take a look, thanks for the reference, PL Hayes.

Responses: RET: didn’t include it because the docs said it “mostly does what you think it does” and I agreed. M-. and M-, are on there under “Exploring”


I'm still updating it. If you have any insanely useful Emacs commands that a new user should know, let me know and I'll try to squeeze them in.


Best cheat sheet I've seen so far. I really like the clean design and the ability to squeeze a lot of shortcuts in there.


Thanks! I spent about as much time in excel tweaking borders, margins, underlines, column width, spacers, etc and then getting it to fit on one page as I did compiling the list to begin with!

I just got tired of so many crappy cheat sheets with ~20-30 commands in one column that didn't even give you enough to operate. Plus they were all ugly. Now there's one that's not :)


Do SLIME users have much need for keyboard macros? I find them very useful.


C-M-u-q is one I use a lot: it auto-indents code (useful after you've made changes to a function or macro definition).


This doesn't seem to work for me. Could you mention the name of the command? How does it differ from C-M-\ ?


C-M-\ auto-indents the entire buffer, but C-M-u-q works just inside the function or macro you're in when you type the command (it does nothing outside a code block).

Emacs help actually defines these as two separate commands (C-M-u is "backward-up-list", C-M-q is "indent-sexp"), but I find that I can just hold down C-M, and then type "u", "q" in succession for the same effect.


C-M-\ actually only indents the 'region', which is the text between the point (your cursor) and the mark (C-Space). The neat thing about this is that yank (C-y) automatically sets the point and the mark at opposite sides of the yanked text. After copying an expression written in the slime repl to a buffer, C-M-\ works without having to move your cursor to the beginning of the expression.


Thanks for that clarification.

Actually, I don't use C-M-\ much, since I prefer to work in individual blocks and C-M-u-q does that nicely, without my worrying where I last set the mark.


Got it. Thanks! There's so much in Emacs/Slime that I don't know. I find my fingers can only absorb so much at a time :)


Great job... I was thinking of going back to PCL this weekend, and this is definitely useful... Thank you sir...


You didn't include C-x ( to define a macro? I live off keyboard macros in emacs.


Good guide, but vim is still much better. http://www.tuxfiles.org/linuxhelp/vimcheat.html


I like vi better than emacs in general (it probably has to do with my learning unix without X and basically vi was the only editor to use), but vi doesn't work as an IDE for Common Lisp.

Vial (http://common-lisp.net/project/vial/) was started with that goal, i.e., to provide SLIME-like functionality for vi but it's one of those still-in-progress (and may never actually release anything useful) projects.


Brad Beveridge abandoned development on both vial and slim-vim. He conceded and now uses emacs+vimpulse. [1]

Many people that come to Lisp from vi tend to be very hesistant to use emacs. I spent weeks trying to use vilisp.vim and viper-mode but eventually learned to live with emacs. It was worth it.

http://www.lispniks.com/pipermail/slim-vim/2007-May/000556.h...


That's where I find myself now. I'm trying to bite the bullet and just use emacs for daily tasks, but it's hard to switch!


Let's be honest, 99.9% of developers out there don't care much about lisp.

Emacs vs. Vim has been a long standing debate, so it would never resloved here. Frankly, I just use Textpad, and/or Eclipse, and ocassionally GVIM.


That's true. I care about Lisp so that's where I'm starting (hence the emphasis on SLIME more than Emacs). After I get better, I'll probably make an Emacs-only cheat sheet that's applicable to non-Lisp programmers.


Awesome. Thank you very much :)


Thank. You. Sir.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: