Skip to content

Commit 22f15ec

Browse files
committed
thorin2 -> mim
1 parent 540cc9e commit 22f15ec

File tree

6 files changed

+52
-55
lines changed

6 files changed

+52
-55
lines changed

README.md

+8-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
# vim-thorin2
2-
Vim syntax highlighting for thorin2
1+
# vim-mim
2+
3+
Vim syntax highlighting for [Mim](https://anydsl.github.io/MimIR/langref.html).
34

45
## Install
56

6-
### Vim-plug Users
7+
### Vim-Plug
78

8-
Put
9-
```vim
10-
Plug 'AnyDSL/vim-thorin2'
11-
```
12-
into your plugged-section in your `~/.vimrc` and run
139
```vim
14-
:PlugInstall
10+
Plug 'AnyDSL/vim-mim'
1511
```
16-
### Other Plugin Systems
1712

18-
Similar to above.
13+
```lua
14+
{ "AnyDSL/vim-mim" }
15+
```

ftdetect/mim.vim

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
au BufRead,BufNewFile *.mim set filetype=mim nospell

ftdetect/thorin.vim

-1
This file was deleted.
File renamed without changes.

syntax/mim.vim

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
if exists("b:current_syntax")
2+
finish
3+
endif
4+
5+
syn match mimBin "[+-]\?0[bB][01]\+\([iI]\d\+\)\?"
6+
syn match mimOct "[+-]\?0[oO]\o\+\([iI]\d\+\)\?"
7+
syn match mimDec "[+-]\?\d\+\([iI]\d\+\)\?"
8+
syn match mimHex "[+-]\?0[xX]\x\+\([iI]\d\+\)\?"
9+
syn match mimIdx "\d\+_\d\+"
10+
syn match mimIdx "\d\+[₀-₉]\+"
11+
syn match mimKeyword "\.[a-zA-Z0-9_]\+"
12+
syn match mimAxiom "%[a-zA-Z][a-zA-Z0-9]*"
13+
syn match mimIdentifier "[_a-zA-Z][_0-9a-zA-Z]*"
14+
syn match mimDelim '<'
15+
syn match mimDelim '<<'
16+
syn match mimDelim '>'
17+
syn match mimDelim '>>'
18+
syn match mimDelim "«"
19+
syn match mimDelim "»"
20+
syn match mimBool ".ff"
21+
syn match mimBool ".tt"
22+
syn match mimChar "'[^']*'" " TODO escape sequences
23+
syn match mimString '"[^"]*"' " TODO escape sequences
24+
25+
syn region mimComment start='/\*' end=`\*/`
26+
syn region mimComment start='//' end=`$`
27+
28+
let b:current_syntax = "mim"
29+
30+
hi def link mimBool Boolean
31+
hi def link mimAxiom Function
32+
hi def link mimIdentifier Identifier
33+
"hi def link mimVar Label
34+
hi def link mimKeyword Keyword
35+
hi def link mimDelim Delimiter
36+
hi def link mimBin Constant
37+
hi def link mimOct Constant
38+
hi def link mimDec Constant
39+
hi def link mimHex Constant
40+
hi def link mimIdx Constant
41+
hi def link mimComment Comment
42+
hi def link mimChar Character
43+
hi def link mimString String

syntax/thorin.vim

-43
This file was deleted.

0 commit comments

Comments
 (0)