Skip to content

aartaka/lisp-config

Repository files navigation

My Lisp Configs

This is mainly a shared config for Lisp REPLs.

Installation

Clone this repo as ~/.config/common-lisp. This way the ASDF registry conf ends up in the proper place too.

git clone --recursive https://github.com/aartaka/lisp-config ~/.config/common-lisp

To propagate the config to all the installed implementation, use install.lisp script:

sbcl --script install.lisp

Note that this overwrites implementation-specific init files, so make sure you back them up!

Highlights

Readline customizations

Some readline completions appended from *-completions.txt, so that

rlwrap ecl

Ends up with nice list of completions.

Graven Image Customizations

Also has lots of :around methods for my Graven Image standard-enhancing library. Mainly making printouts less overwhelming.

Commands

Convenience commands (./commands.lisp) to:

:qq
Quickly quit from the REPL in a portable fashion.
:sh/:!
Run shell command synchronously and print results.
:shi
Run shell command interactively.
:sha/:&
Run shell command asynchronously.
:sudo
to eval command as sudo.
:loadsys/:lsd
Load ASDF system.
:quill/:ql
Load system via Quicklisp.
:directory/:dir
Change the directory and print its contents.
:page/:pg
to scroll the shell command or Lisp form output.
:manual/:man
to :page the man page.
:inspect
interactive command-based inspection.

Experimental editor

Command-based editor with mnemonic commands. See ./ed.lisp.

:edit
to move to the edited line (integer) start editing
  • Form evaluation result,
  • Function source,
  • File contents,
  • Or shell command output.
:etch
save the changes.
:eject and :egress
to cut and paste respectively. Clipboard is single element for now.
:eik and :escape
to edit subform or get back to superform.
:effuse, :enter, and :erase
to add new content after, before, or instead the current ones.
:err
modify the current form with a function of new content.
:embrace and :entral
wrap the current form into parens, or unsplice it into the surrounding content.
:echo and :eye
print one line/form or scroll down N lines respectively.
:eval
eval the current form of provided argument.

Experimental “Talkative Lisp” Code

This feeds REPL output and input to EspeakNG to speak the text. The plan is to turn it into a proper screenreader-ish setup. See ./talkative.lisp.

Nicer prompt (CL-USER/D1?)

This one is made for Talkative mode convenience, because the format is most discernible when read with eSpeak.

Useful yet highly opinionated reader macros

See ./reader.lisp:

  • #? to print meta information about the symbol after it: documentation, apropos, arglist. Requires Graven Image.
  • #^ as a shortcut for throwaway lambdas. Inspired by typical Lambda Calculus notation:
'#^kv.v ;; => (lambda (&optional k v) v)

About

Shared config for all my Lisp REPLs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published