forked from aniani/vim
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>
This commit is contained in:
committed by
Christian Brabandt
parent
3779516988
commit
68a8947069
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 9.1. Last change: 2024 Jan 01
|
||||
*filetype.txt* For Vim version 9.1. Last change: 2024 Jan 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -148,6 +148,7 @@ variables can be used to overrule the filetype used for certain extensions:
|
||||
*.cls g:filetype_cls
|
||||
*.csh g:filetype_csh |ft-csh-syntax|
|
||||
*.dat g:filetype_dat
|
||||
*.def g:filetype_def
|
||||
*.f g:filetype_f |ft-forth-syntax|
|
||||
*.frm g:filetype_frm |ft-form-syntax|
|
||||
*.fs g:filetype_fs |ft-forth-syntax|
|
||||
|
||||
@@ -2251,6 +2251,56 @@ have the following in your .vimrc: >
|
||||
let filetype_m = "mma"
|
||||
|
||||
|
||||
MODULA2 *modula2.vim* *ft-modula2-syntax*
|
||||
|
||||
Vim will recognise comments with dialect tags to automatically select a given
|
||||
dialect.
|
||||
|
||||
The syntax for a dialect tag comment is: >
|
||||
|
||||
taggedComment :=
|
||||
'(*!' dialectTag '*)'
|
||||
;
|
||||
|
||||
dialectTag :=
|
||||
m2pim | m2iso | m2r10
|
||||
;
|
||||
|
||||
reserved words
|
||||
m2pim = 'm2pim', m2iso = 'm2iso', m2r10 = 'm2r10'
|
||||
|
||||
A dialect tag comment is recognised by Vim if it occurs within the first 200
|
||||
lines of the source file. Only the very first such comment is recognised, any
|
||||
additional dialect tag comments are ignored.
|
||||
|
||||
Example: >
|
||||
|
||||
DEFINITION MODULE FooLib; (*!m2pim*)
|
||||
...
|
||||
|
||||
Variable g:modula2_default_dialect sets the default Modula-2 dialect when the
|
||||
dialect cannot be determined from the contents of the Modula-2 file: if
|
||||
defined and set to 'm2pim', the default dialect is PIM.
|
||||
|
||||
Example: >
|
||||
|
||||
let g:modula2_default_dialect = 'm2pim'
|
||||
|
||||
|
||||
Highlighting is further configurable for each dialect via the following
|
||||
variables.
|
||||
|
||||
Variable Highlight ~
|
||||
*modula2_iso_allow_lowline* allow low line in identifiers
|
||||
*modula2_iso_disallow_octals* disallow octal integer literals
|
||||
*modula2_iso_disallow_synonyms* disallow "@", "&" and "~" synonyms
|
||||
|
||||
*modula2_pim_allow_lowline* allow low line in identifiers
|
||||
*modula2_pim_disallow_octals* disallow octal integer literals
|
||||
*modula2_pim_disallow_synonyms* disallow "&" and "~" synonyms
|
||||
|
||||
*modula2_r10_allow_lowline* allow low line in identifiers
|
||||
|
||||
MOO *moo.vim* *ft-moo-syntax*
|
||||
|
||||
If you use C-style comments inside expressions and find it mangles your
|
||||
|
||||
@@ -7270,6 +7270,7 @@ ft-metapost-intro ft_mp.txt /*ft-metapost-intro*
|
||||
ft-metapost-mappings ft_mp.txt /*ft-metapost-mappings*
|
||||
ft-metapost-settings ft_mp.txt /*ft-metapost-settings*
|
||||
ft-mma-syntax syntax.txt /*ft-mma-syntax*
|
||||
ft-modula2-syntax syntax.txt /*ft-modula2-syntax*
|
||||
ft-moo-syntax syntax.txt /*ft-moo-syntax*
|
||||
ft-msql-syntax syntax.txt /*ft-msql-syntax*
|
||||
ft-n1ql-syntax syntax.txt /*ft-n1ql-syntax*
|
||||
@@ -8659,6 +8660,14 @@ modeline options.txt /*modeline*
|
||||
modeline-local options.txt /*modeline-local*
|
||||
modeline-version options.txt /*modeline-version*
|
||||
modifyOtherKeys map.txt /*modifyOtherKeys*
|
||||
modula2.vim syntax.txt /*modula2.vim*
|
||||
modula2_iso_allow_lowline syntax.txt /*modula2_iso_allow_lowline*
|
||||
modula2_iso_disallow_octals syntax.txt /*modula2_iso_disallow_octals*
|
||||
modula2_iso_disallow_synonyms syntax.txt /*modula2_iso_disallow_synonyms*
|
||||
modula2_pim_allow_lowline syntax.txt /*modula2_pim_allow_lowline*
|
||||
modula2_pim_disallow_octals syntax.txt /*modula2_pim_disallow_octals*
|
||||
modula2_pim_disallow_synonyms syntax.txt /*modula2_pim_disallow_synonyms*
|
||||
modula2_r10_allow_lowline syntax.txt /*modula2_r10_allow_lowline*
|
||||
moo.vim syntax.txt /*moo.vim*
|
||||
more-compatible version5.txt /*more-compatible*
|
||||
more-prompt message.txt /*more-prompt*
|
||||
|
||||
Reference in New Issue
Block a user