aboutsummaryrefslogtreecommitdiffhomepage
path: root/editors/vim
diff options
context:
space:
mode:
authorMarvin Borner2024-04-15 17:12:46 +0200
committerMarvin Borner2024-04-15 17:13:13 +0200
commitbfdd0ef6897e42e03cefa4d43c8757ef09d96de2 (patch)
tree253509bc1a1ed34afc4a128952401921197fae7a /editors/vim
parent32f0891053cb9efe7b2987638a96395d2b9f9722 (diff)
Added parsing and printing of complex numbers
Diffstat (limited to 'editors/vim')
-rw-r--r--editors/vim/syntax/bruijn.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/editors/vim/syntax/bruijn.vim b/editors/vim/syntax/bruijn.vim
index 2556ceb..fbe7a47 100644
--- a/editors/vim/syntax/bruijn.vim
+++ b/editors/vim/syntax/bruijn.vim
@@ -10,6 +10,8 @@ syn match bruijnAbstraction /[[\]]/
syn match bruijnIndex /\([^0-9A-Za-z]\)\@<=\d\([^0-9]\)\@=/
syn match bruijnChar /'\@<=.'\@=/
syn match bruijnNumber /([+-]\d\+[dubt]\?)/
+syn match bruijnFloat /([+-]\d\+\.\d\+[fr]\?)/
+syn match bruijnComplex /([+-]\d\+\.\d\+i[+-]\d\+\.\d\+)/
syn match bruijnDefinition /^\t*\S\+/
syn match bruijnType /\( ⧗ \)\@<=.*$/
syn match bruijnTypeDelim / ⧗ /
@@ -22,6 +24,8 @@ syn region bruijnString start=+"+ end=+"+ oneline
hi def link bruijnIndex Special
hi def link bruijnNumber Number
+hi def link bruijnFloat Number
+hi def link bruijnComplex Number
hi def link bruijnString String
hi def link bruijnChar String
hi def link bruijnDefinition Define
@@ -60,6 +64,7 @@ abbreviate <buffer> kket ⟫
abbreviate <buffer> <=? ≤
abbreviate <buffer> >=? ≥
abbreviate <buffer> /= ≠
+abbreviate <buffer> ~= ≈
abbreviate <buffer> ! ¬
abbreviate <buffer> _0 ₀
abbreviate <buffer> _1 ₁