/
syntax.yml
142 lines (124 loc) · 2.27 KB
/
syntax.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
ruby:
ext: ['.rb', '.rake']
after: ['^#!', '^#.*encoding:']
comment:
open: '#\n'
close: '#\n'
prefix: '# '
perl:
ext: ['.pl']
after: ['^#!', '^#.*encoding:']
comment:
open: '#\n'
close: '#\n'
prefix: '# '
# Support PEP 0263 comments:
# coding=<encoding name>
# -*- coding: <encoding name> -*-
# vim: set fileencoding=<encoding name> :
python:
ext: ['.py']
after: ['^#!', '^#.*coding:', '^#.*coding=', '^#.*fileencoding=']
comment:
open: '\n'
close: '\n'
prefix: '# '
html:
ext: ['.html', '.htm', '.xhtml']
comment:
open: '<!--\n'
close: '-->\n'
prefix: ' '
php:
ext: ['.php']
after: [ '^#!' ]
comment:
open: '<?php \n/*\n'
close: ' */ ?>\n'
prefix: ' * '
javacript:
ext: ['.js']
comment:
open: '/*\n'
close: ' */\n\n'
prefix: ' * '
css:
ext: ['.css']
comment:
open: '/*\n'
close: ' */\n\n'
prefix: ' * '
c:
ext: ['.c', '.h']
comment:
open: '/*'
close: ' */\n\n'
prefix: ' * '
cpp:
ext: ['.cpp', '.hpp', '.cc', '.hh']
comment:
open: '//\n'
close: '//\n\n'
prefix: '// '
java:
ext: ['.java']
comment:
open: '/*\n'
close: ' */\n\n'
prefix: ' * '
haml:
ext: ['.haml', '.hamlc']
comment:
open: '-#\n'
close: '-#\n'
prefix: '-# '
coffee:
ext: ['.coffee']
comment:
open: '###\n'
close: '###\n'
prefix: ''
# M4 macro language, use #, not dnl
m4:
ext: ['.m4']
comment:
open: '#\n'
close: '#\n'
prefix: '# '
# Most shells, really
shell:
ext: ['.sh']
after: ['^#!']
comment:
open: '#\n'
close: '#\n'
prefix: '# '
# Use "-- " to make sure e.g. MySQL understands it
sql:
ext: ['.sql']
comment:
open: '-- \n'
close: '-- \n'
prefix: '-- '
# XML is *not* the same as HTML, and the comments need to go after a
# preprocessing directive, if present.
# FIXME: only supports single line directives
xml:
ext: ['.xml', '.xsd', '.mxml']
after: ['^<\?']
comment:
open: '<!--\n'
close: '-->\n'
prefix: ' '
yaml:
ext: ['.yml', '.yaml']
comment:
open: '#\n'
close: '#\n'
prefix: '# '
action_script:
ext: ['.as']
comment:
open: '//\n'
close: '//\n\n'
prefix: '// '