From e53e3b31409fb5f7f06bccd4e4c24649815803b9 Mon Sep 17 00:00:00 2001 From: Albert Graef Date: Tue, 13 Nov 2018 08:31:41 +0100 Subject: [PATCH] Add some snippets for Emacs yasnippets. --- midizap-mode.el | 4 ++++ midizap-mode/midizaprc | 27 +++++++++++++++++++++++++++ midizap-mode/section | 5 +++++ 3 files changed, 36 insertions(+) create mode 100644 midizap-mode/midizaprc create mode 100644 midizap-mode/section diff --git a/midizap-mode.el b/midizap-mode.el index 4eb1b10..1fa57e0 100644 --- a/midizap-mode.el +++ b/midizap-mode.el @@ -18,6 +18,10 @@ ;;; work you'll need the auto-complete package available from MELPA, please ;;; check: https://github.com/auto-complete/auto-complete. +;;; In the midizap-mode subdirectory you'll find some snippets to be used with +;;; yasnippet (https://github.com/joaotavora/yasnippet); to use these, copy +;;; the entire folder to your ~/.emacs.d/snippets directory. + ;;; Code: (require 'comint) diff --git a/midizap-mode/midizaprc b/midizap-mode/midizaprc new file mode 100644 index 0000000..ec29fa2 --- /dev/null +++ b/midizap-mode/midizaprc @@ -0,0 +1,27 @@ +# -*- mode: snippet -*- +# name: midizaprc template +# key: # +# -- + +# midizap configuration template for Emacs (requires yasnippet) + +# Jack client name and ports/connections + +# NOTE: Remove the JACK_PORTS and JACK_OUT lines if you don't need MIDI +# output. For bidirectional setups, use JACK_PORTS 2 and add JACK_IN2, +# JACK_OUT2 and a [MIDI2] section for the feedback connection. + +JACK_NAME "${1:client-name}" +JACK_PORTS 1 +JACK_IN ${2:controller-regex} +JACK_OUT ${3:application-regex} + +# common debugging options (uncomment as needed) + +#DEBUG_REGEX +#DEBUG_KEYS +#DEBUG_MIDI + +# translations go here + +[MIDI] diff --git a/midizap-mode/section b/midizap-mode/section new file mode 100644 index 0000000..953023c --- /dev/null +++ b/midizap-mode/section @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: section header +# key: [ +# -- +[${1:name}] ${2:regex}