Tweak neovim snippets
This commit is contained in:
parent
3bfa7ebba8
commit
bf6f8de590
home/features/neovim
config/lua/my/abbreviations
snippets
|
@ -36,34 +36,6 @@ M.unicode = {
|
||||||
{ "pspeq", "⊋" }, -- [p]roper [s]u[p]erset or [eq]ual
|
{ "pspeq", "⊋" }, -- [p]roper [s]u[p]erset or [eq]ual
|
||||||
-- }}}
|
-- }}}
|
||||||
-- }}}
|
-- }}}
|
||||||
-- {{{ Double stroked chars
|
|
||||||
{ "AA", "𝔸" },
|
|
||||||
{ "BB", "𝔹" },
|
|
||||||
{ "CC", "ℂ" },
|
|
||||||
{ "DD", "ⅅ" },
|
|
||||||
{ "EE", "𝔼" },
|
|
||||||
{ "FF", "𝔽" },
|
|
||||||
{ "GG", "𝔾" },
|
|
||||||
{ "HH", "ℍ" },
|
|
||||||
{ "II", "𝕀" },
|
|
||||||
{ "JJ", "𝕁" },
|
|
||||||
{ "KK", "𝕂" },
|
|
||||||
{ "LL", "𝕃" },
|
|
||||||
{ "MM", "𝕄" },
|
|
||||||
{ "NN", "ℕ" },
|
|
||||||
{ "OO", "𝕆" },
|
|
||||||
{ "PP", "ℙ" },
|
|
||||||
{ "QQ", "ℚ" },
|
|
||||||
{ "RR", "ℝ" },
|
|
||||||
{ "SS", "𝕊" },
|
|
||||||
{ "TT", "𝕋" },
|
|
||||||
{ "UU", "𝕌" },
|
|
||||||
{ "VV", "𝕍" },
|
|
||||||
{ "WW", "𝕎" },
|
|
||||||
{ "XX", "𝕏" },
|
|
||||||
{ "YY", "𝕐" },
|
|
||||||
{ "ZZ", "ℤ" },
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Common operators
|
-- {{{ Common operators
|
||||||
{ "comp", "∘" }, -- composition
|
{ "comp", "∘" }, -- composition
|
||||||
{ "mul", "⋅" }, -- multiplication
|
{ "mul", "⋅" }, -- multiplication
|
||||||
|
@ -88,53 +60,13 @@ M.unicode = {
|
||||||
{ "iic", "∋" }, -- [I]n[c]ludes
|
{ "iic", "∋" }, -- [I]n[c]ludes
|
||||||
{ "nic", "∌" }, -- does'[n]t [i]n[c]lude
|
{ "nic", "∌" }, -- does'[n]t [i]n[c]lude
|
||||||
-- }}}
|
-- }}}
|
||||||
-- {{{ Greek characters
|
|
||||||
{ "alpha", "α" },
|
|
||||||
{ "beta", "β" },
|
|
||||||
{ "gamma", "γ" },
|
|
||||||
{ "Gamma", "Γ" },
|
|
||||||
{ "delta", "δ" },
|
|
||||||
{ "Delta", "Δ" },
|
|
||||||
{ "eps", "ε" },
|
|
||||||
{ "zeta", "ζ" },
|
|
||||||
{ "eta", "η" },
|
|
||||||
{ "theta", "θ" },
|
|
||||||
{ "Theta", "Θ" },
|
|
||||||
{ "iota", "ι" },
|
|
||||||
{ "kappa", "κ" },
|
|
||||||
{ "lam", "λ" },
|
|
||||||
{ "Lam", "Λ" },
|
|
||||||
{ "mu", "μ" },
|
|
||||||
{ "nu", "ν" },
|
|
||||||
{ "xi", "ξ" },
|
|
||||||
{ "pi", "π" },
|
|
||||||
{ "Pi", "∏" },
|
|
||||||
{ "rho", "ρ" },
|
|
||||||
{ "sigma", "σ" },
|
|
||||||
{ "Sigma", "Σ" },
|
|
||||||
{ "tau", "τ" },
|
|
||||||
{ "upsilon", "υ" },
|
|
||||||
{ "phi", "ϕ" },
|
|
||||||
{ "ophi", "φ" }, -- open phi?
|
|
||||||
{ "Phi", "Φ" },
|
|
||||||
{ "chi", "χ" },
|
|
||||||
{ "psi", "ψ" },
|
|
||||||
{ "Psi", "Ψ" },
|
|
||||||
{ "omega", "ω" },
|
|
||||||
{ "Omega", "Ω" },
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Common symbols
|
-- {{{ Common symbols
|
||||||
{ "iinf", "∞" },
|
|
||||||
{ "niinf", "-∞" },
|
|
||||||
{ "star", "⋆" },
|
{ "star", "⋆" },
|
||||||
{ "nabla", "∇" },
|
{ "nabla", "∇" },
|
||||||
{ "minidiam", "⋄" },
|
{ "minidiam", "⋄" },
|
||||||
{ "tto", "→" },
|
{ "tto", "→" },
|
||||||
{ "ttoo", "⟶" },
|
{ "ttoo", "⟶" },
|
||||||
{ "mapto", "↦" },
|
{ "mapto", "↦" },
|
||||||
{ "square", "□" },
|
|
||||||
{ "rquare", "▢" }, -- rounded square
|
|
||||||
{ "diam", "◇" },
|
|
||||||
-- }}}
|
-- }}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 ℤ
|
34
home/features/neovim/snippets/common/unicode-greek.miros
Normal file
34
home/features/neovim/snippets/common/unicode-greek.miros
Normal 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 Ω
|
11
home/features/neovim/snippets/common/unicode-misc.miros
Normal file
11
home/features/neovim/snippets/common/unicode-misc.miros
Normal 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 ≅
|
|
@ -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) ₎
|
|
@ -29,3 +29,7 @@ block auto !word
|
||||||
string nil
|
string nil
|
||||||
name ignore symbol
|
name ignore symbol
|
||||||
snip \⋄
|
snip \⋄
|
||||||
|
|
||||||
|
string escape
|
||||||
|
name escape brackets
|
||||||
|
snip \@^\⟨$1\⟩
|
||||||
|
|
63
home/features/neovim/snippets/odin.miros
Normal file
63
home/features/neovim/snippets/odin.miros
Normal 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
|
||||||
|
|
|
@ -40,6 +40,12 @@ block auto !math start
|
||||||
string item
|
string item
|
||||||
snip \item$|1⟨,[$1] $0⟩
|
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⟩
|
for kind <- @⟨chapter,section,subsection,subsubsection⟩
|
||||||
|
|
||||||
string @kind
|
string @kind
|
||||||
|
@ -48,7 +54,13 @@ block auto !math start
|
||||||
\\@kind⋄{$1}
|
\\@kind⋄{$1}
|
||||||
$0
|
$0
|
||||||
|
|
||||||
|
string frame
|
||||||
|
name Beamer frame
|
||||||
|
desc Creates a beamer slide frame
|
||||||
|
snip
|
||||||
|
\begin{frame}$?1⟨{@^⟨$1⟩}⟩
|
||||||
|
$0
|
||||||
|
\end{frame}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
block text
|
block text
|
||||||
|
@ -75,6 +87,8 @@ block text
|
||||||
string $
|
string $
|
||||||
name inline math
|
name inline math
|
||||||
snip \$$1\$$0
|
snip \$$1\$$0
|
||||||
|
|
||||||
|
abbr pause \pause
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
string forcecr
|
string forcecr
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
import common/math-phrases
|
import common/math-phrases
|
||||||
|
import common/unicode-greek
|
||||||
|
import common/unicode-double-stroke
|
||||||
|
import common/unicode-misc
|
||||||
|
|
||||||
block auto start
|
block auto start
|
||||||
for thmenv <- @⟨lemma,theorem,corollary,definition⟩
|
for thmenv <- @⟨lemma,theorem,corollary,definition⟩
|
||||||
|
|
Loading…
Reference in a new issue