-
Notifications
You must be signed in to change notification settings - Fork 1
/
algo.vim
38 lines (33 loc) · 1.25 KB
/
algo.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
" Vim syntax file
" Language: Algo
" Maintainer: Thibaud Michaud
" Latest Revision: 21 April 2015
if exists("b:current_syntax")
finish
endif
" Keywords
set iskeyword+='
syn keyword algoKeyword algorithme procedure fonction parametres
syn keyword algoKeyword algorithm function parameters
syn keyword algoKeyword globaux locaux variables types constantes
syn keyword algoKeyword global local
syn keyword algoKeyword jusqu'a
syn keyword algoKeyword to
syn keyword algoKeyword debut fin faire alors pour tant que si selon autrement
syn keyword algoKeyword begin end do then for while if caseof default
syn keyword algoKeyword sinon retourne vrai faux
syn keyword algoKeyword else return true false
syn keyword algoTypes entier chaine caractere booleen reel
syn keyword algoTypes int string char boolean real
syn keyword algoFunctions ecrire lire allouer liberer
syn keyword algoFunctions write read malloc free
syn region algoComment start="/\*" end="\*/"
syn region algoString start="\"" skip="\\\"" end="\""
syn match algoNumbers "\s\d\+\(\.\d\+\)\?"
let b:current_syntax = "algo"
hi def link algoKeyword Statement
hi def link algoString String
hi def link algoNumbers Number
hi def link algoTypes Type
hi def link algoFunctions Function
hi def link algoComment Comment