Skip to content

Instantly share code, notes, and snippets.

@rymndhng
Last active November 10, 2015 21:58
Show Gist options
  • Save rymndhng/4b2c7c07598fe8cfdb98 to your computer and use it in GitHub Desktop.
Save rymndhng/4b2c7c07598fe8cfdb98 to your computer and use it in GitHub Desktop.
Lisp Snippet to add block comment to fill column.
# -*- mode: snippet -*-
# name: bc
# key: bc
# --
;; -- ${1:$$(when yas-moving-away-p (progn (insert-char ? ) (fill-to-end)))}
An awesome snippet for adding block comment lines in lisps
# Usage:
Type the following:
```
bc <tab> Subscription Handlers <tab>
```
This expands the end dashes to the current fill column.
``` clojure
;; -- Subscription Handlers ----------------------------------------------------
```
(defun fill-to-end ()
(interactive)
(save-excursion
(end-of-line)
(while (< (current-column) fill-column)
(insert-char ?-))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment