Files
smart_delimiters/init.lisp
T
Arthur Barraux 8540c674ad first commit
2025-11-01 13:18:23 +01:00

49 lines
1.6 KiB
Common Lisp

(define open-parenthesis (lambda() (
(editor-insert-char "(")
(editor-insert-char ")")
(move-cursor "left")
)
)
)
(define open-brackets (lambda() (
(editor-insert-char "[")
(editor-insert-char "]")
(move-cursor "left")
)
)
)
(define open-curly-brackets (lambda() (
(editor-insert-char "{")
(editor-insert-char "}")
(move-cursor "left")
)
)
)
(define open-single-quotes (lambda() (
(editor-insert-char "'")
(editor-insert-char "'")
(move-cursor "left")
)
)
)
(define open-double-quotes (lambda() (
(editor-insert-char "\"")
(editor-insert-char "\"")
(move-cursor "left")
)
)
)
(map-key "(" open-parenthesis)
(map-key "[" open-brackets)
(map-key "{" open-curly-brackets)
(map-key "'" open-single-quotes)
(map-key "\"" open-double-quotes)