git clone 'git://github.com/mrkkrp/common-lisp-snippets.git'
This is a collection of Yasnippets for Common Lisp. It mainly includes snippets for top-level forms and (as a bonus) headers for popular free-software licenses: GNU GPL and MIT License.
To use these snippets you need to install Yasnippet package. Once you have Yasnippet installed, place contents of this repository on your load path, so Emacs can see it and add the following to your configuration file:
It's now available via MELPA: M-x package-install RET common-lisp-snippets RET — and you are done!
To insert a snippet, type its name and press ↹ Tab or C-i, for example:
defsystem ⇒ (asdf:defsystem :system-name :version "0.1.0" :description "description" :author "user-full-name <user-mail-address>" :serial t :license "GNU GPL, version 3" :components ((:file "file.lisp")) :depends-on (#:alexandria))
…you can move through the fields pressing ↹ Tab and edit or
delete them, some fields, like
:author try to guess their values. Also,
snippets are especially useful when learning some language ;-)
As a special bonus, there are snippets to insert headers of files that
contain information about the software license (
are smart too.
Yes, please contribute! There are some stylistic conventions:
Name files without any extensions;
Start every file with this preamble:
# -*- mode: snippet -*-
# contributor: your name
# name: readable name of the snippet
# key: what user needs to enter
The first line is needed to activate mode for snippet editing in Emacs, Yasnippet ships with it.
snippet-modetakes care of this, setting
nil, just make sure you haven't put it there manually.
Copyright © 2015 Mark Karpov
Distributed under GNU GPL, version 3.