Mercurial > vim
comparison runtime/doc/syntax.txt @ 34092:ff27442e7851 v9.1.0013
patch 9.1.0013: Modula2 filetype support lacking
Commit: https://github.com/vim/vim/commit/68a89470693c7687d4e736ca056c05de632e3ac7
Author: Doug Kearns <dougkearns@gmail.com>
Date: Fri Jan 5 17:59:04 2024 +0100
patch 9.1.0013: Modula2 filetype support lacking
Problem: Modula2 filetype support lacking
Solution: Improve the Modula-2 runtime support, add additional modula2
dialects, add compiler plugin, update syntax highlighting,
include syntax tests, update Makefiles (Doug Kearns)
closes: #6796
closes: #8115
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Benjamin Kowarsch <trijezdci@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 05 Jan 2024 18:15:04 +0100 |
parents | ce17935bc3cb |
children | d6b9d567433f |
comparison
equal
deleted
inserted
replaced
34091:27bd5d0816e0 | 34092:ff27442e7851 |
---|---|
2248 Empty *.m files will automatically be presumed to be Matlab files unless you | 2248 Empty *.m files will automatically be presumed to be Matlab files unless you |
2249 have the following in your .vimrc: > | 2249 have the following in your .vimrc: > |
2250 | 2250 |
2251 let filetype_m = "mma" | 2251 let filetype_m = "mma" |
2252 | 2252 |
2253 | |
2254 MODULA2 *modula2.vim* *ft-modula2-syntax* | |
2255 | |
2256 Vim will recognise comments with dialect tags to automatically select a given | |
2257 dialect. | |
2258 | |
2259 The syntax for a dialect tag comment is: > | |
2260 | |
2261 taggedComment := | |
2262 '(*!' dialectTag '*)' | |
2263 ; | |
2264 | |
2265 dialectTag := | |
2266 m2pim | m2iso | m2r10 | |
2267 ; | |
2268 | |
2269 reserved words | |
2270 m2pim = 'm2pim', m2iso = 'm2iso', m2r10 = 'm2r10' | |
2271 | |
2272 A dialect tag comment is recognised by Vim if it occurs within the first 200 | |
2273 lines of the source file. Only the very first such comment is recognised, any | |
2274 additional dialect tag comments are ignored. | |
2275 | |
2276 Example: > | |
2277 | |
2278 DEFINITION MODULE FooLib; (*!m2pim*) | |
2279 ... | |
2280 | |
2281 Variable g:modula2_default_dialect sets the default Modula-2 dialect when the | |
2282 dialect cannot be determined from the contents of the Modula-2 file: if | |
2283 defined and set to 'm2pim', the default dialect is PIM. | |
2284 | |
2285 Example: > | |
2286 | |
2287 let g:modula2_default_dialect = 'm2pim' | |
2288 | |
2289 | |
2290 Highlighting is further configurable for each dialect via the following | |
2291 variables. | |
2292 | |
2293 Variable Highlight ~ | |
2294 *modula2_iso_allow_lowline* allow low line in identifiers | |
2295 *modula2_iso_disallow_octals* disallow octal integer literals | |
2296 *modula2_iso_disallow_synonyms* disallow "@", "&" and "~" synonyms | |
2297 | |
2298 *modula2_pim_allow_lowline* allow low line in identifiers | |
2299 *modula2_pim_disallow_octals* disallow octal integer literals | |
2300 *modula2_pim_disallow_synonyms* disallow "&" and "~" synonyms | |
2301 | |
2302 *modula2_r10_allow_lowline* allow low line in identifiers | |
2253 | 2303 |
2254 MOO *moo.vim* *ft-moo-syntax* | 2304 MOO *moo.vim* *ft-moo-syntax* |
2255 | 2305 |
2256 If you use C-style comments inside expressions and find it mangles your | 2306 If you use C-style comments inside expressions and find it mangles your |
2257 highlighting, you may want to use extended (slow!) matches for C-style | 2307 highlighting, you may want to use extended (slow!) matches for C-style |