Slime Notes

Slime logo
  1. Get Slime
  2. Shortcuts
  3. Completion Bindings
  4. Indentation Bindings
  5. Closure Bindings
  6. Miscellaneous Bindings
  7. Connecting to a Remote Lisp via Swank
  8. References
  9. Get Slime

    The current best way to set up a Slime environment is via Quicklisp , unless a bleeding edge snapshot is needed:

    cvs -d co slime

    Or download the CVS snapshot as a tarball , but note that it ends up in slime/slime unless you use some fancy tar chops.


    These are just a few:

    Binding Command Notes
    ,h help List of all slime shortcuts
    pwd Show current directory
    ,d change-directory Change current directory
    ,cl compile-and-load Compile (if necessary) and load a lisp file
    ,! defparameter Define a new global, special, variable
    open-system Open all files in an ASDF system
    ,-d popd Restore the last saved directory
    ,+d pushd Save current directory and set to new one
    quit Quit current Lisp
    reload-system Recompile and load an ASDF system

    Some useful functions exported from asdf

    ASDF exports several very useful functions: ( details )

    • asdf:clear-system
    • asdf:system-relative-pathname
    • asdf:merge-pathnames*
    • asdf:system-source-directory

    Completion Bindings

    Binding Command Notes
    C-c C-i
    slime-complete-symbol Tries to complete symbol from point
    C-c M-i slime-fuzzy-complete-symbol enters fuzzy completion mode
    C-c C-s slime-complete-form Provides the rest of a form template from point.
    C-] slime-close-all-parens-in-sexp Closes all open parens in sexp from point

    Note: you may have to run e16keyedit to turn off some of the bindings enlightenment captures first.

    Indentation Bindings

    Binding Command Notes
    C-c M-q reindent defun At point
    C-M-q indent sexp Cursor has to be on the beginning paren of sexp

    Closure Bindings

    Binding Command Notes
    C-c C-q close parens (obsolete) Closes parens at point
    C-c C-] close all parens Closes all parens in current sexp

    Miscellaneous Bindings

    Binding Command Notes
    C-w (while in Isearch) completes search word from point
    C-M-a slime-beginning-of-defun Moves point to beginning of (or previous) defun
    C-M-e slime-end-of-defun Moves point to end of (or next) defun
    C-_ undo Same as C-x C-u only easier
    M-y yank-pop Open yank kill-ring
    C-y M-y ..M-y repeatedly yanks in buffer ???
    C-t transpose-chars transpose two letters
    M-t transpose-words transpose two words
    C-M-t transpose-sexps transpose two sexps
    C-k paredit-kill kill to end of line
    M-d paredit-forward-kill-word kill to end of word
    C-M-j indent-new-comment-line newline with indent
    C-u M-; delete comments only
    C-M-k kill-sexp kill sexp forward
    C-M-Back kill sexp backwards

    Connecting to a Remote Lisp via Swank

    In one xterm start an ssh session:

    ssh -L4007: $inervo

    But don't use it directly. In another local xterm start emacs and remote connect using:

    M-x slime-connect RET 4007

    This maps the local port 4007 to the remote port 4005. Now from a local emacs, launch slime with

    More information:

    1. Using Slime over an SSH tunnel