sponsor Vim development Vim logo Vim Book Ad

LispXp : Lisp snippets for xptemplate

 script karma  Rating 4/1, Downloaded by 1863  Comments, bugs, improvements  Vim wiki

created by
Gnosis Ouroubouros
 
script type
utility
 
description
These are some Common Lisp snippets for xptemplate.

Screenshot of various snippets with placeholders activated (before most
of the placeholders have been filled in):

  http://img703.imageshack.us/img703/7780/screenshot10x.png

Of course, as usual, you can use your own colors and colorscheme.

NOTE:

  As of version 1.10, LispXp requires the newest version of xptemplate
  from SVN or git.

Known issues:

  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.

NOTE:

  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
  Hyperspec.

  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:

http://www.vim.org/scripts/script.php?script_id=2611

 
install details
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
      :help xpt-personal-folder
- quit and restart vim
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
lisp.xpt-1.10.vim 1.10 2011-02-17 7.3 Gnosis Ouroubouros 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.
lisp.xpt-1.9.vim 1.9 2011-02-14 7.3 Gnosis Ouroubouros Many new snippets, along with a few improvements and bug fixes.
lisp.xpt-1.8.vim 1.8 2011-02-04 7.3 Gnosis Ouroubouros Added new snippets: "aref", "get", "listp", "remprop".
lisp.xpt-1.7.vim 1.7 2011-01-31 7.3 Gnosis Ouroubouros Added new snippets: "endp", "setf", "when".  Now all the basic arithmetic function snippets (+,-,/,*) have a minimum of two number place holders.
lisp.xpt-1.6.vim 1.6 2011-01-30 7.3 Gnosis Ouroubouros Fixed buggy "cond" snippet.  Made "let" and "letstar" a bit more readable.  Added new snippets: "clear-output", "finish-output", "force-output", and "return".
lisp.xpt-1.5.vim 1.5 2011-01-30 7.3 Gnosis Ouroubouros Improved readability of a placeholder in the "setq" snippet, and added the following snippets:  "=", "/=", "<", "<=", ">", ">=".
lisp.xpt-1.4.vim 1.4 2011-01-30 7.3 Gnosis Ouroubouros Added new snippets ("dolist" and "dotimes").  Fixed bugs in "eq", "eql", and "equal" snippets.  Removed parenthesis around the test in the "if" snippet.
lisp.xpt-1.3.vim 1.3 2011-01-29 7.3 Gnosis Ouroubouros Corrected spacing when "stepper" placeholder is skipped in the "do" snippet.
lisp.xpt-1.2.vim 1.2 2011-01-29 7.3 Gnosis Ouroubouros 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.
lisp.xpt-1.1.vim 1.1 2011-01-29 7.3 Gnosis Ouroubouros Improved the "do" snippet to make it handle skipped placeholders more gracefully.
lisp.xpt-1.0.vim 1.0 2011-01-29 7.3 Gnosis Ouroubouros Initial upload
ip used for rating: 3.141.244.201

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github