diff options
author | Marvin Borner | 2023-02-24 15:40:44 +0100 |
---|---|---|
committer | Marvin Borner | 2023-02-24 15:40:44 +0100 |
commit | bacae7b6a2c7e669248d76759d820dd815e97c4b (patch) | |
tree | aefaa4db1a0421fcb132ebcc42f0ef1916e16d62 /editors/vim | |
parent | 168358b774d64201ea560b9cdf3e1ff58a0d69c8 (diff) |
More reasonable defaults for REPL/editors
Diffstat (limited to 'editors/vim')
-rw-r--r-- | editors/vim/syntax/bruijn.vim | 222 |
1 files changed, 115 insertions, 107 deletions
diff --git a/editors/vim/syntax/bruijn.vim b/editors/vim/syntax/bruijn.vim index 9fdf7ae..6de2927 100644 --- a/editors/vim/syntax/bruijn.vim +++ b/editors/vim/syntax/bruijn.vim @@ -8,8 +8,10 @@ endif syn match bruijnApplication /[()]/ syn match bruijnAbstraction /[[\]]/ syn match bruijnIndex /\([^0-9]\)\@<=\d\([^0-9]\)\@=/ -syn match bruijnNumber /([+-]\d\+)/ +syn match bruijnNumber /([+-]\d\+[ubt]\?)/ syn match bruijnDefinition /^\t*\S\+/ +syn match bruijnType /\( ⧗ \)\@<=.*$/ +syn match bruijnTypeDelim / ⧗ / syn match bruijnKeyword /:test\|:import\|:input/ syn match bruijnNamespace /[A-Z][a-z]*\(\.\)\@=/ syn match bruijnNamespaceDelim /\([A-Z][a-z]*\)\@<=\./ @@ -23,6 +25,8 @@ hi def link bruijnNumber Number hi def link bruijnString String hi def link bruijnChar String hi def link bruijnDefinition Define +hi def link bruijnType Structure +hi def link bruijnTypeDelim Define hi def link bruijnKeyword Macro hi def link bruijnNamespace Type hi def link bruijnNamespaceDelim Special @@ -30,112 +34,116 @@ hi def link bruijnAbstraction Function hi def link bruijnApplication Statement hi def link bruijnCommentLine Comment -let b:current_syntax = "bruijn" - " complete using space or C-] -abbreviate > ‣ -abbreviate ? … -abbreviate && ⋀ -abbreviate \|\| ⋁ -abbreviate sum ∑ -abbreviate prod ∏ -abbreviate rprod ∐ -abbreviate infty ∞ -abbreviate . ∘ -abbreviate * ⋅ -abbreviate ** ⋆ -abbreviate => ⇒ -abbreviate <=> ⇔ -abbreviate -> → -abbreviate <-> ↔ -abbreviate -^ ↑ -abbreviate :: ∷ -abbreviate bra ⟨ -abbreviate ket ⟩ -abbreviate bbra ⟪ -abbreviate kket ⟫ -abbreviate <=? ≤ -abbreviate >=? ≥ -abbreviate ! ¬ -abbreviate _0 ₀ -abbreviate _1 ₁ -abbreviate _2 ₂ -abbreviate _3 ₃ -abbreviate _4 ₄ -abbreviate _5 ₅ -abbreviate _6 ₆ -abbreviate _7 ₇ -abbreviate _8 ₈ -abbreviate _9 ₉ -abbreviate _+ ₊ -abbreviate _- ₋ -abbreviate _= ₌ -abbreviate _( ₍ -abbreviate _) ₎ -abbreviate ^0 ⁰ -abbreviate ^1 ¹ -abbreviate ^2 ² -abbreviate ^3 ³ -abbreviate ^4 ⁴ -abbreviate ^5 ⁵ -abbreviate ^6 ⁶ -abbreviate ^7 ⁷ -abbreviate ^8 ⁸ -abbreviate ^9 ⁹ -abbreviate ^\+ ⁺ -abbreviate ^- ⁻ -abbreviate ^= ⁼ -abbreviate ^\( ⁽ -abbreviate ^\) ⁾ +abbreviate <buffer> :: ⧗ +abbreviate <buffer> > ‣ +abbreviate <buffer> <> ∅ +abbreviate <buffer> ? … +abbreviate <buffer> && ⋀ +abbreviate <buffer> \|\| ⋁ +abbreviate <buffer> sum ∑ +abbreviate <buffer> prod ∏ +abbreviate <buffer> rprod ∐ +abbreviate <buffer> infty ∞ +abbreviate <buffer> . ∘ +abbreviate <buffer> * ⋅ +abbreviate <buffer> ** ⋆ +abbreviate <buffer> => ⇒ +abbreviate <buffer> <=> ⇔ +abbreviate <buffer> -> → +abbreviate <buffer> <-> ↔ +abbreviate <buffer> -^ ↑ +abbreviate <buffer> bra ⟨ +abbreviate <buffer> ket ⟩ +abbreviate <buffer> bbra ⟪ +abbreviate <buffer> kket ⟫ +abbreviate <buffer> <=? ≤ +abbreviate <buffer> >=? ≥ +abbreviate <buffer> /= ≠ +abbreviate <buffer> ! ¬ +abbreviate <buffer> _0 ₀ +abbreviate <buffer> _1 ₁ +abbreviate <buffer> _2 ₂ +abbreviate <buffer> _3 ₃ +abbreviate <buffer> _4 ₄ +abbreviate <buffer> _5 ₅ +abbreviate <buffer> _6 ₆ +abbreviate <buffer> _7 ₇ +abbreviate <buffer> _8 ₈ +abbreviate <buffer> _9 ₉ +abbreviate <buffer> _+ ₊ +abbreviate <buffer> _- ₋ +abbreviate <buffer> _= ₌ +abbreviate <buffer> _( ₍ +abbreviate <buffer> _) ₎ +abbreviate <buffer> ^0 ⁰ +abbreviate <buffer> ^1 ¹ +abbreviate <buffer> ^2 ² +abbreviate <buffer> ^3 ³ +abbreviate <buffer> ^4 ⁴ +abbreviate <buffer> ^5 ⁵ +abbreviate <buffer> ^6 ⁶ +abbreviate <buffer> ^7 ⁷ +abbreviate <buffer> ^8 ⁸ +abbreviate <buffer> ^9 ⁹ +abbreviate <buffer> ^+ ⁺ +abbreviate <buffer> ^- ⁻ +abbreviate <buffer> ^= ⁼ +abbreviate <buffer> ^( ⁽ +abbreviate <buffer> ^) ⁾ " === Greek letters === -abbreviate Alpha Α -abbreviate alpha α -abbreviate Beta Β -abbreviate beta β -abbreviate Gamma Γ -abbreviate gamma γ -abbreviate Delta Δ -abbreviate delta δ -abbreviate Epsilon Ε -abbreviate epsilon ε -abbreviate varepsilon ϵ -abbreviate Zeta Ζ -abbreviate zeta ζ -abbreviate Eta Η -abbreviate eta η -abbreviate Theta Θ -abbreviate theta θ -abbreviate Iota Ι -abbreviate iota ι -abbreviate Kappa Κ -abbreviate kappa κ -abbreviate Lambda Λ -abbreviate lambda λ -abbreviate Mu Μ -abbreviate mu μ -abbreviate Nu Ν -abbreviate nu ν -abbreviate Xi Ξ -abbreviate xi ξ -abbreviate Omicron Ο -abbreviate omicron ο -abbreviate Pi Π -abbreviate pi π -abbreviate Rho Ρ -abbreviate rho ρ -abbreviate Sigma Σ -abbreviate sigma σ -abbreviate Tau Τ -abbreviate tau τ -abbreviate Upsilon Υ -abbreviate upsilon υ -abbreviate Phi Φ -abbreviate phi φ -abbreviate varphi ϕ -abbreviate Chi Χ -abbreviate chi χ -abbreviate Psi Ψ -abbreviate psi ψ -abbreviate Omega Ω -abbreviate omega ω +abbreviate <buffer> Alpha Α +abbreviate <buffer> alpha α +abbreviate <buffer> Beta Β +abbreviate <buffer> beta β +abbreviate <buffer> Gamma Γ +abbreviate <buffer> gamma γ +abbreviate <buffer> Delta Δ +abbreviate <buffer> delta δ +abbreviate <buffer> Epsilon Ε +abbreviate <buffer> epsilon ε +abbreviate <buffer> varepsilon ϵ +abbreviate <buffer> Zeta Ζ +abbreviate <buffer> zeta ζ +abbreviate <buffer> Eta Η +abbreviate <buffer> eta η +abbreviate <buffer> Theta Θ +abbreviate <buffer> theta θ +abbreviate <buffer> Iota Ι +abbreviate <buffer> iota ι +abbreviate <buffer> Kappa Κ +abbreviate <buffer> kappa κ +abbreviate <buffer> Lambda Λ +abbreviate <buffer> lambda λ +abbreviate <buffer> Mu Μ +abbreviate <buffer> mu μ +abbreviate <buffer> Nu Ν +abbreviate <buffer> nu ν +abbreviate <buffer> Xi Ξ +abbreviate <buffer> xi ξ +abbreviate <buffer> Omicron Ο +abbreviate <buffer> omicron ο +abbreviate <buffer> Pi Π +abbreviate <buffer> pi π +abbreviate <buffer> Rho Ρ +abbreviate <buffer> rho ρ +abbreviate <buffer> Sigma Σ +abbreviate <buffer> sigma σ +abbreviate <buffer> Tau Τ +abbreviate <buffer> tau τ +abbreviate <buffer> Upsilon Υ +abbreviate <buffer> upsilon υ +abbreviate <buffer> Phi Φ +abbreviate <buffer> phi φ +abbreviate <buffer> varphi ϕ +abbreviate <buffer> Chi Χ +abbreviate <buffer> chi χ +abbreviate <buffer> Psi Ψ +abbreviate <buffer> psi ψ +abbreviate <buffer> Omega Ω +abbreviate <buffer> omega ω + +" let b:current_syntax = "bruijn" +" let &cpo = s:cpo_save +" unlet! s:cpo_save |