This commit is contained in:
2024-04-30 07:08:23 +02:00
commit a711247971
2043 changed files with 16874 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <call-macro>
# key: m
# condition: (progn (backward-char 1) (dix-transfer-enclosing-allows "call-macro"))
# binding: direct-keybinding
# --
<call-macro n="$1"><with-param pos="$2"/>$0</call-macro>

10
snippets/dix-mode/choose Normal file
View File

@@ -0,0 +1,10 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <choose><when><test> elements
# key: c
# condition: (progn (backward-char 1) (dix-transfer-enclosing-allows "choose"))
# binding: direct-keybinding
# --
<choose><when>
<test><equal>$0</equal></test>
</when></choose>

7
snippets/dix-mode/clip Normal file
View File

@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <clip> elements
# key: c
# condition: (progn (backward-char 1) (dix-transfer-enclosing-allows "clip"))
# binding: direct-keybinding
# --
<clip pos="$1" ${2:side="tl"} part="$3"/>$0

View File

@@ -0,0 +1,9 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <e> in monodix section
# key: <e
# condition: (dix-enclosing-is-mono-section)
# binding: direct-keybinding
#TODO: remove suffix from <i> after leaving <par>
# --
<e lm="${1:`(dix-yas-prev-lemma)`}"> <i>${1:$(dix-yas-lm-to-i)}</i> <par n="${3:$$(dix-yas-choose-pdname)}"/></e>
$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <e> in pardefs
# key: <e
# condition: (not (dix-enclosing-is-mono-section))
# binding: direct-keybinding
# --
<e> <p><l>$1</l> <r>$1$0</r></p> </e>

7
snippets/dix-mode/let Normal file
View File

@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <let> elements
# key: l
# condition: (progn (backward-char 1) (dix-transfer-enclosing-allows "let"))
# binding: direct-keybinding
# --
<let>$0</let>

7
snippets/dix-mode/lit Normal file
View File

@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <lit> elements
# key: l
# condition: (progn (backward-char 1) (dix-transfer-enclosing-allows "lit"))
# binding: direct-keybinding
# --
<lit v="$1"/>$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <lit-tag> elements
# key: lt
# condition: (progn (backward-char 1) (dix-transfer-enclosing-allows "lit-tag"))
# binding: direct-keybinding
# --
<lit-tag v="$1"/>$0

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <otherwise> elements
# key: o
# condition: (progn (backward-char 1) (dix-transfer-enclosing-allows "otherwise"))
# binding: direct-keybinding
# --
<otherwise>$0</otherwise>

7
snippets/dix-mode/p Normal file
View File

@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <p> element
# key: p
# condition: (progn (backward-char 1) (equal (dix-enclosing-elt 'noerror) "e"))
# binding: direct-keybinding
# --
<p><l>$1</l> <r>$1$0</r></p>

7
snippets/dix-mode/par Normal file
View File

@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <par> element
# key: <p
# condition: (progn (backward-char 2) (equal (dix-enclosing-elt 'noerror) "e"))
# binding: direct-keybinding
# --
<par n="${1::$$(dix-yas-message-pardef (yas-choose-value (dix-pardef-suggest-for (dix-lemma-at-point))))`}"/>$0

12
snippets/dix-mode/pardef Normal file
View File

@@ -0,0 +1,12 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <pardef> element
# key: <p
# condition: (progn (backward-char 2) (not (equal (dix-enclosing-elt 'noerror) "e")))
# binding: direct-keybinding
# --
<pardef n="${1:corp/us__n}">
<e> <p><l>${1:$(dix-yas-pdname-to-suffix yas-text)}</l> <r>${1:$(dix-yas-pdname-to-suffix yas-text)}${1:$(dix-yas-pdname-to-pos yas-text)}$2</r></p></e>
<e> <p><l>${1:$(dix-yas-pdname-to-suffix yas-text)}$0</l> <r>${1:$(dix-yas-pdname-to-suffix yas-text)}${1:$(dix-yas-pdname-to-pos yas-text)}$2</r></p></e>
<e> <p><l>${1:$(dix-yas-pdname-to-suffix yas-text)}</l> <r>${1:$(dix-yas-pdname-to-suffix yas-text)}${1:$(dix-yas-pdname-to-pos yas-text)}$2</r></p></e>
<e> <p><l>${1:$(dix-yas-pdname-to-suffix yas-text)}</l> <r>${1:$(dix-yas-pdname-to-suffix yas-text)}${1:$(dix-yas-pdname-to-pos yas-text)}$2</r></p></e>
</pardef>

9
snippets/dix-mode/s Normal file
View File

@@ -0,0 +1,9 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <s> element
# key: <s
# binding: direct-keybinding
# condition: (progn (backward-char 2) (member (dix-enclosing-elt 'noerror) '("l" "r" "i" "g")))
#Note: requires (eval-after-load 'yasnippet '(add-to-list 'yas-key-syntaxes 'dix-yas-skip-backwards-to-key))
#so that you can expand it after regular letter chars
# --
<s n="$1"/>$0

7
snippets/dix-mode/sdef Normal file
View File

@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <sdef> element
# key: <s
# condition: (progn (backward-char 2) (equal (dix-enclosing-elt 'noerror) "sdefs"))
# binding: direct-keybinding
# --
<sdef n="$1" c="$2"/>

View File

@@ -0,0 +1,9 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <section> element
# key: <s
# condition: (progn (backward-char 2) (and (not (dix-enclosing-is-mono-section)) (not (member (dix-enclosing-elt 'noerror) '("l" "r" "i" "g" "sdefs")))))
# binding: direct-keybinding
# --
<section id="${1:main}" type="${2:$$(yas-choose-value '("standard" "inconditional" "postblank" "preblank"))}">
$0
</section>

7
snippets/dix-mode/var Normal file
View File

@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <var> elements
# key: v
# condition: (progn (backward-char 1) (dix-transfer-enclosing-allows "var"))
# binding: direct-keybinding
# --
<var n="$1"/>$0

7
snippets/dix-mode/when Normal file
View File

@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <when> elements
# key: w
# condition: (progn (backward-char 1) (dix-transfer-enclosing-allows "when"))
# binding: direct-keybinding
# --
<when>$0</when>

View File

@@ -0,0 +1,7 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: <with-param>
# key: w
# condition: (progn (backward-char 1) (dix-transfer-enclosing-allows "with-param"))
# binding: direct-keybinding
# --
<with-param pos="$1"/>$0