LispXp : Lisp snippets for xptemplate
| script karma
Downloaded by 737
Comments, bugs, improvements
script versions (upload new version)
|These are some Common Lisp snippets for xptemplate.
Screenshot of various snippets with placeholders activated (before most
of the placeholders have been filled in):
Of course, as usual, you can use your own colors and colorscheme.
As of version 1.10, LispXp requires the newest version of xptemplate
from SVN or git.
Due to the limitations of the current version of xptemplate, I've had to use
the name "dostar" instead of "do*", "letstar" instead of "let*", etc. Also,
the indentation of certain complex snippets like "defstruct" is not correct.
I'm new to Lisp, and new to xptemplate, so don't expect the most
sophisticated snippets, a religious adherence to the Hyperspec, or even a
full set of snippets for every function and macro documented in the
These snippets are really mostly just for my own use, but if someone else
finds them useful, then that's great.
As of version 1.10, these are the snippets that are included:
+ describe mapc readbase
- divide mapcan remf
* do mapcar remhash
/ documentation mapcon remove
= dolist maphash remove-if
/= dostar mapl remove-if-not
< dotimes maplist remprop
<= eighth member rest
> elt minus return
>= endp multiply reverse
abs eq nconc rplaca
acons eql nintersection rplacd
and equal ninth second
append eval not set
apply fboundp nreverse setf
aref fifth nsublis setq
array-total-size finish-output nsubst seventh
ash first nth sixth
assoc force-output nthcdr stringp
atom format null sublis
boundp fourth numberp subst
byte fresh-line open symbolfunction
byte-position funcall or symbolp
byte-size functionp pairlis symbolvalue
car get plus tenth
cdr getf pop terpri
clear-output gethash prin1 third
cond if prin1-to-string typep
cons intersection princ union
consp lambda princ-to-string vector
copy-alist last print vector-pop
copy-list ldb printbase vector-push
copy-tree length printlength when
defconstant let printlevel write
defmacro letstar progn write-byte
defparameter list push write-char
defstruct listp pushnew write-line
defun liststar quote write-sequence
defvar load rassoc write-string
delete macroexpand rassoc-if write-to-string
delete-if make-array rassoc-if-not zerop
delete-if-not make-hash-table read
For more information on this script follow the vim wiki link at the top right of this page.
For more information on xptemplate, see:
|To install these snippets:
- get xptemplate from SVN or git (important! xptemplate from vim.org will **not** work!)
- install and configure xptemplate
- download these snippets
- rename the downloaded snippet file as "lisp.xpt.vim"
- move it in to the ftplugin/lisp directory under the path you've chosen according to
- quit and restart vim
Click on the package to download.
ip used for rating: 188.8.131.52
||Note: This version of LispXp requires the newest version of xptemplate from SVN or git. New snippets: ash, byte, byte-position, byte-size, defstruct, dostar, ldb, maphash, prin1-to-string, princ-to-string, write, write-byte, write-char, write-line, write-sequence, write-string, write-to-string.
||Many new snippets, along with a few improvements and bug fixes.
||Added new snippets: "aref", "get", "listp", "remprop".
||Added new snippets: "endp", "setf", "when". Now all the basic arithmetic function snippets (+,-,/,*) have a minimum of two number place holders.
||Fixed buggy "cond" snippet. Made "let" and "letstar" a bit more readable. Added new snippets: "clear-output", "finish-output", "force-output", and "return".
||Improved readability of a placeholder in the "setq" snippet, and added the following snippets: "=", "/=", "<", "<=", ">", ">=".
||Added new snippets ("dolist" and "dotimes"). Fixed bugs in "eq", "eql", and "equal" snippets. Removed parenthesis around the test in the "if" snippet.
||Corrected spacing when "stepper" placeholder is skipped in the "do" snippet.
||Took out parenthesis from around the bodies of defmacro, defun, and lambda, since you're likely to use snippets there and they already have parenthesis around them.
||Improved the "do" snippet to make it handle skipped placeholders more gracefully.