1
Fork 0

Tweak neovim snippets

This commit is contained in:
prescientmoon 2025-04-08 21:48:44 +02:00
parent 3bfa7ebba8
commit bf6f8de590
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
9 changed files with 173 additions and 69 deletions

View file

@ -0,0 +1,27 @@
block auto
abbr AA 𝔸
abbr BB 𝔹
abbr CC
abbr DD
abbr EE 𝔼
abbr FF 𝔽
abbr GG 𝔾
abbr HH
abbr II 𝕀
abbr JJ 𝕁
abbr KK 𝕂
abbr LL 𝕃
abbr MM 𝕄
abbr NN
abbr OO 𝕆
abbr PP
abbr QQ
abbr RR
abbr SS 𝕊
abbr TT 𝕋
abbr UU 𝕌
abbr VV 𝕍
abbr WW 𝕎
abbr XX 𝕏
abbr YY 𝕐
abbr ZZ

View file

@ -0,0 +1,34 @@
block auto
abbr alpha α
abbr beta β
abbr gamma γ
abbr Gamma Γ
abbr delta δ
abbr Delta Δ
abbr eps ε
abbr zeta ζ
abbr eeta η
abbr theta θ
abbr Theta Θ
abbr iota ι
abbr kappa κ
abbr lam λ
abbr Lam Λ
abbr mmu μ
abbr nnu ν
abbr xi ξ
abbr pi π
abbr Pi ∏
abbr rho ρ
abbr sigma σ
abbr Sigma Σ
abbr tau τ
abbr upsilon υ
abbr phi ϕ
abbr ophi φ
abbr Phi Φ
abbr chi χ
abbr psi ψ
abbr Psi Ψ
abbr omega ω
abbr Omega Ω

View file

@ -0,0 +1,11 @@
block auto
abbr sharp ♯
abbr flat ♭
abbr square □
abbr rquare ▢
abbr diam ◇
abbr iinf ∞
abbr niinf -∞
abbr sim
abbr approx ≃
abbr cong ≅

View file

@ -0,0 +1,16 @@
block auto
abbr s0 ₀
abbr s1 ₁
abbr s2 ₂
abbr s3 ₃
abbr s4 ₄
abbr s5 ₅
abbr s6 ₆
abbr s7 ₇
abbr s8 ₈
abbr s9 ₉
abbr s+ ₊
abbr s- ₋
abbr s= ₌
abbr s( ₍
abbr s) ₎

View file

@ -29,3 +29,7 @@ block auto !word
string nil
name ignore symbol
snip \⋄
string escape
name escape brackets
snip \@^\⟨$1\⟩

View file

@ -0,0 +1,63 @@
import common/unicode-greek
import common/unicode-double-stroke
import common/unicode-subperscripts
import common/unicode-misc
string loc
name loc parameter
desc Automatically passed location parameter
snip loc := #caller_location
block auto
abbr anyint #any_int
abbr u8 ℕ₈
abbr v2 ℝ²
abbr v3 ℝ³
abbr v4 ℝ⁴
block auto start
abbr private \@(private)
abbr reqres \@(require_results)
string const
snip $1 :: $0
string proc
snip
$1 :: proc ($2) -> $|3⟨$3,($3\, ok: bool)⟩ {
$4
}
$0
for kind <- @⟨struct,enum,bit_field⟩
string @⟨@kind:struct,enum,bitfield⟩
snip
$1 :: @kind $2 {
$3
}
$0
for kind <- @⟨when,if,else if⟩
string @⟨@kind:when,if,elif⟩
snip
@kind $1 {
$2
} $0
string else
snip
else {
$1
} $0
string forin
snip
for $1 in $2 {
$3
} $0
for level <- @⟨debug,info,warn,error,assert⟩
abbr f@level log.@level⋄f("$1", $2)$0
abbr @level log.@level($1)$0

View file

@ -40,6 +40,12 @@ block auto !math start
string item
snip \item$|1⟨,[$1] $0⟩
string @thmenv
snip
\begin{@thmenv}$?1⟨[@^⟨$1⟩]⟩$?2⟨\label{@thmprefix:@^⟨$2⟩}⟩
$0
\end{@thmenv}
for kind <- @⟨chapter,section,subsection,subsubsection⟩
string @kind
@ -48,7 +54,13 @@ block auto !math start
\\@kind⋄{$1}
$0
string frame
name Beamer frame
desc Creates a beamer slide frame
snip
\begin{frame}$?1⟨{@^⟨$1⟩}⟩
$0
\end{frame}
-- }}}
block text
@ -75,6 +87,8 @@ block text
string $
name inline math
snip \$$1\$$0
abbr pause \pause
-- }}}
string forcecr

View file

@ -1,4 +1,7 @@
import common/math-phrases
import common/unicode-greek
import common/unicode-double-stroke
import common/unicode-misc
block auto start
for thmenv <- @⟨lemma,theorem,corollary,definition⟩