Peter Christensen

  • Presentations
  • Contact Me

Public Beta Open For “Ultimate N00b SLIME/Emacs Cheat Sheet”

February 14, 2008 by Peter 28 Comments

On this Valentine’s Day, give the gift people really want – complex key chords!

In other news, I’ve got fans!

Well, at least one anyway. A lot of the feedback I’ve received on this site so far has been from experienced Lispers who appreciate my enthusiasm and contributions for new users. Yesterday, I got the first (I think) comment and reply from another new Lisper who’s actually getting some use out of my stuff. Aaron Feng wrote up my SLIME movie reference, and he even caught my later reference to my upcoming “Ultimate N00b SLIME/Emacs Cheat Sheet”. Well Aaron, wait no more!

I’ve been using it for a week or so, and I’m sort of pleased with it. First the positives:

  • It includes all of the SLIME commands from the SLIME manual
  • It includes all of the Emacs commands from the built in tutorial
  • It includes the main Emacs help keys
  • The commands are sorted and grouped by functional area
  • It’s all fits on one page

Here are some of the things I’m not so pleased with:

  • It has very few Emacs commands, relative to what’s available
  • It doesn’t include any advanced text manipulation options
  • It doesn’t have the sexp-based manipulation commands. I couldn’t find standard bindings for these and I’m not up to Emacs tweaking yet. Adding a key for the slime-selector was enough for me at this point.
  • It’s pretty crowded (~100 commands and descriptions on one page)

The Emacs section is weak mainly because I haven’t dived into Emacs the way I have into Lisp/SLIME. I figure for now I can use it as a standard, powerful IDE for writing, testing, and debugging Lisp, and I can add Emacs wizardry later. I think I hit the point of diminishing returns where focusing on my tools will help me learn to code in Lisp. Now I need to get my coding up to par with my tools! I need to improve to the point where it’s worth getting a copy of Learning GNU Emacs.

So without further ado, here is my unfinished yet eminently usable cheat sheet:

[NOTE: These links were broken for a while. They work now]

Ultimate N00b SLIME/Emacs Cheat Sheet (pdf)

or customize your own!

Ultimate N00b SLIME/Emacs Cheat Sheet (xls)

Enjoy! As usual, feedback is appreciated. If you’ve got an Emacs trick that you use a jillion times a day that you think a new user could use, this is a great way to share!

(PS I hope it goes without saying but there isn’t any kind of beta process. Just that I consider it a work in progress and that it will definitely change in the future, hopefully in response to useful criticism.)

Follow the discussion at: Hacker News, programming.reddit.com, comp.lang.lisp, comp.emacs

 

Filed Under: Lisp, Programming

Comments

  1. Abhijith says

    February 14, 2008 at 11:17 am

    Niiice! keep up the good work 🙂

  2. Wayne says

    February 14, 2008 at 2:09 pm

    Cool. Although you may want to pick a font in which a lower case L doesn’t look like an upper case I.

  3. Peter says

    February 14, 2008 at 2:41 pm

    Wayne – thanks for the observation – it’s just the Excel default. I’ll try to change this when I add all the other recommendations that come in. Any font recommendations?

  4. blandest says

    February 14, 2008 at 3:09 pm

    I keep changing between Monaco, Consolas and Bitstream Vera.

  5. Greg says

    February 14, 2008 at 4:53 pm

    Thanks Peter!

    I found it on reddit, looked out of curiosity and found 5 or 6 things I didn’t already know on the sheet within 10 seconds so printed it out and it’s now on my desk.

    I’m lucky in that I get to code Lisp most of the time and this will sure help my Slime/Emacs. 😉

  6. PL Hayes says

    February 14, 2008 at 5:51 pm

    Very useful, thanks 🙂 However, I think maybe it would be preferable to adapt/fill in one of the refcard templates in Emacs’s etc/refcards/*.tex

  7. Andreas Fuchs says

    February 14, 2008 at 6:04 pm

    Sweet! This is really great.

    There’s one thing that I’m missing: RET in SLDB does a lot of things: invoke restarts, expand frames, inspect the condition, inspect objects (depending on where point is).

    Also, I think it would bear mentioning that M-. and M-, stack (:

    Thanks for doing this, I think I’ll it out and stick it everywhere I work (it’s worth it for C-c ~ alone (-:)

  8. Andreas Fuchs says

    February 14, 2008 at 6:04 pm

    Sweet! This is really great.

    There’s one thing that I’m missing: RET in SLDB does a lot of things: invoke restarts, expand frames, inspect the condition, inspect objects (depending on where point is).

    Also, I think it would bear mentioning that M-. and M-, stack (:

    Thanks for doing this, I think I’ll print it out and stick it everywhere I work (it’s worth it for C-c ~ alone (-:)

  9. novaburst says

    February 14, 2008 at 7:20 pm

    Thank you, I think this will be very useful to me.

  10. Brian says

    February 14, 2008 at 9:51 pm

    That looks great. It’ll come in handy. Any chance of seeing an HTML-table or plaintext version?

  11. noob says

    February 15, 2008 at 12:14 am

    Dude, you have to check out paredit next. It might be a bit quirky at first, but you’ll soon realise that’s how lisp was meant to be edited. Manipulating sexprs instead of text with a few basic operations that will always be just the ones you need.

  12. Peter says

    February 15, 2008 at 11:42 am

    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”

  13. PL Hayes says

    February 15, 2008 at 2:22 pm

    They’re just the TeX sources of the Emacs refcards (surely no Emacs user doesn’t have some of them pinned up somewhere?). TeX is the format of choice for technical documents – at least in the “hard” sciences – *nix or not:

    http://en.wikipedia.org/wiki/TeX#Use_of_TeX

    which is why the (other) Emacs refcards are made with it!

  14. slime-user says

    February 15, 2008 at 4:44 pm

    Just FYI, the SLIME ‘doc’ sub-directory contains .tex files that are the sources for generating PDF files for the SLIME manual and a reference card. Running ‘make’ in the directory will cause it to generate the .pdf files along with HTML files and the slime.info file. It requires a number of standard TeX tools to do this. Most GNU or Unix distributions include these toolsets.

    Also, the Emacs distribution includes .tex files for generating a number of reference cards, including ones for general Emacs editing, Calc, Org, Gnus, Vip/Viper, and Dired modes.

  15. Pedro Kroger says

    February 28, 2008 at 8:32 am

    Very nice! I suggest you include the navigation commands for sexps and things like transpose-sexp.

  16. Paddy Mullen says

    March 20, 2008 at 11:04 am

    Here is what I don’t get. I know how to save a file. I know how to save the contents of the repl buffer. I don’t know how to save just the commands I ran through the repl buffer.
    How do I execute a single line that I am writing in another buffer?

    I have looked over the documentation, and I’m sure it says how to do this, but probably with words that I can’t quite understand.

  17. Peter says

    March 20, 2008 at 1:41 pm

    Paddy,
    Here are two commands I’ve found useful.

    eval-buffer: M-x eval-buffer RET
    eval-last-sexp: C-x C-e

    These work in Emacs Lisp (not sure about SLIME) and are crucial for tweaking Emacs behavior in the .emacs file.
    I’m not sure how to save the contents of the REPL.

    Anyone know?

  18. AJ says

    March 23, 2008 at 5:53 am

    Nice work man, thanks a bunch.
    Helps me a lot!!!

  19. Ebot says

    August 24, 2008 at 3:19 pm

    Thanks.

  20. Hugh S. Myers says

    March 14, 2009 at 9:00 pm

    Along with the other improvements, you might want to correct C-c C-t which you have as clear entire buffer. It won’t; it is bound to slime-toggle-trace-fdefinition. What you want is C-c M-o which is bound to slime-repl-clear-buffer. Other than that, lots of gold in this hoard!

  21. Adam says

    November 17, 2009 at 11:58 pm

    I think it should be on there that if you type a comma at the slime prompt and then type “cd”, you can change the lisp process’s current working directory, which sometimes matters for scripting-y tasks.

    Some install packages have scripts that require you to start lisp in a certain directory.

Trackbacks

  1. Tooting My Own Horn » What’s In Peter’s Head says:
    February 14, 2008 at 11:17 am

    […] it right now and I’ll post it when I feel more comfortable with it. (EDIT: A beta version is up now) I’m going through Practical Common Lisp again and this time it’s much better. […]

  2. links for 2008-02-16 « that dismal science says:
    February 16, 2008 at 3:51 pm

    […] Public Beta Open For “Ultimate N00b SLIME/Emacs Cheat Sheet” » What\’s In Peter\’s Head I like Emacs. Lisp, not so much. (tags: cheatsheet emacs programming lisp) […]

  3. Sleeping Too Much and Fighting With Emacs and ASDF » What’s In Peter’s Head says:
    February 29, 2008 at 11:12 pm

    […] chores, c) programmed as much, or d) made all the great improvements people suggested to my SLIME/Emacs cheat sheet. I decided that if I only had a little time, I should spend it on what’s most important, […]

  4. How To Learn Lisp » What’s In Peter’s Head says:
    March 3, 2008 at 3:51 pm

    […] Emac/SLIME Cheat Sheet […]

  5. Installing CLISP, Emacs, and SLIME on Windows XP » What’s In Peter’s Head says:
    May 16, 2008 at 10:49 am

    […] Emacs NOTE #2: Emacs has lots (and lots and lots) of keyboard shortcuts, many more than there are letters in the alphabet. Many of them require multiple keys or a sequence of keys called a “chord”. The two modifier keys used are Control and Alt (also called Meta). The common way to write chords is to use C- and M- for Control and Meta, so to run the command to close Emacs, you hold down Control and X, then let go, then hold down Control and C. This is written as C-x C-c. Sometimes a chord is followed by another letter or the name of a command. For instance, to undo, you hold Control and x, then let go and hit u. This is written as C-x u. Dashes mean press at the same time, space means let go. Easy! I made a cheat sheet for common commands in Emacs and SLIME. […]

  6. emacs & slime for people like me at sinistral.sourcery says:
    November 4, 2008 at 10:37 am

    […] Christensen has published his "Ultimate n00b SLIME/Emacs cheat sheet" as a Work In Progress. It’s a very handy quick […]

  7. Scientifications, Various And Sundry » Blog Archive » Emacs and SLIME - keyboard shortcuts says:
    December 21, 2008 at 9:02 pm

    […] to admit- this post is redundant information. For example, Peter Christensen has an excellent SLIME cheatsheet for […]

Leave a Reply

You must be logged in to post a comment.

Categories

  • Blog
  • Book Review
  • Business
  • Clojure
  • Education
  • Emacs
  • Fun
  • iOS
  • Lisp
  • Personal Sprints
  • Pictures
  • Polyphasic
  • Presentations
  • Programming
  • Rails
  • Startups
  • Uncategorized

Copyright © 2025 · Minimum Pro Theme on Genesis Framework · WordPress · Log in