gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] Modula-2 support for VIM with file type and dialect disambiguation


From: Benjamin Kowarsch
Subject: [Gm2] Modula-2 support for VIM with file type and dialect disambiguation
Date: Thu, 7 Jun 2018 11:46:58 +0900

Hi Michael,

On 7 June 2018 at 04:24, Michael Riedl wrote:

you mentioned a that you did some syntax highlighting and other stuff for vim.

Can you send me that file ? Would be highly appreciated.

I cc the list as others may also want to use it.

It is all online on my (former) Bitbucket repo at:

https://bitbucket.org/trijezdci/m2syntaxcolour/src/tip/Vim/

This contains

* three vim language support files, one for PIM, ISO and R10 each
* patching instructions for vim scripts makemenu.vim and synmenu.vim
* patching instructions for vim script filetype.vim
* Modula-2 sample files for testing

You can see screenshots on this page:

https://bitbucket.org/trijezdci/m2c-rework/wiki/ide

If you are using a Mac, you can download and use patched versions of MacVim and VimR

https://bitbucket.org/trijezdci/m2syntaxcolour/downloads/MacVim-with-Modula-2-support.app.zip
MD5 (MacVim-with-Modula-2-support.app.zip) = d5ccd4c7f88af40f2665042db9f01071

https://bitbucket.org/trijezdci/m2syntaxcolour/downloads/VimR-with-Modula-2-support.app.zip
MD5 (VimR-with-Modula-2-support.app.zip) = beb8b06d594f1848f68c4ba80e09c5c4

Note, this does not do lowercasing of keywords and predefined identifiers as Gaius' emacs support does. Instead, it scans the first 100 lines of source code to do disambiguation with other VIM uses of .def and .mod. By doing so, it looks for and recognises Modula-2 dialect tags of the form (*!m2pim*), (*!m2iso*) and (*m2r10*) and performs syntax highlighting according to the selected dialect.

regards
benjamin

PS: When Atlassian moved to single-sign-on across their product portfolio they locked me out. I no longer have write access. Their customer service was rather arrogant and unhelpful wasting a lot of my time but not fixing the problem. At some point I had enough and decided it was quicker to move to Github. However, this particular repo I have not (yet) moved, so it is still only on Bitbucket. Nevertheless, if anyone wants to extend this (for example adding the lowercasing for keywords and predefined identifiers, or make an rpm or apt file) we can always create a new repo on Github and copy the files over.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]