Re: [NTG-context] How to write readable source files?

2021-05-30 Thread Nicola
On 2021-05-29, Hans Hagen wrote: > so what does vim expect? isn't there some kind of common format for lexers? The output I need is very simple: syn keyword Group1 ... syn keyword Group2 ... ... where Group1, Group2, ... define arbitrary groups of keywords. For instance, for

Re: [NTG-context] How to write readable source files?

2021-05-29 Thread Hans Hagen
On 5/29/2021 8:29 PM, Nicola wrote: So, is it correct that the XML files are automatically generated from the source code, and kept in sync with it? If so, how is that done? Or the xml files are maintained by Wolfgang who knows context inside out and has ways to keep track of additions

Re: [NTG-context] How to write readable source files?

2021-05-29 Thread Nicola
On 2021-05-29, Hans Hagen wrote: > On 5/29/2021 5:03 PM, Nicola wrote: >>> these lists are generated by mtx-interface so we can add more if needed >> >> Could you please elaborate on the (automatic?) data flow from ConTeXt's >> source files to data files for each application? Is it: >> >> source

Re: [NTG-context] How to write readable source files?

2021-05-29 Thread Hans Hagen
On 5/29/2021 5:03 PM, Nicola wrote: On 2021-04-25, Hans Hagen wrote: If there is a way to automatically get a list of all ConTeXt commands and options (and, ideally, MetaFun defs, types, and other keywords), I'd be happy to improve omni-completion for ConTeXt in Vim. All is in xml files

Re: [NTG-context] How to write readable source files?

2021-05-29 Thread Nicola
On 2021-04-25, Hans Hagen wrote: >> If there is a way to automatically get a list of all ConTeXt commands >> and options (and, ideally, MetaFun defs, types, and other keywords), I'd >> be happy to improve omni-completion for ConTeXt in Vim. > All is in xml files (i-*.xml) in the distribution

Re: [NTG-context] How to write readable source files?

2021-04-25 Thread Hans Hagen
On 4/25/2021 2:12 PM, Nicola wrote: On 2021-04-25, juh wrote: I am married to Emacs but have an affair with Vim. ;-) Eventually, you will abandon the dark side of the Force ;-) I real IDE-like support for ConTeXt would be nice: setup-en.pdf is always open when I write environments as I

Re: [NTG-context] How to write readable source files?

2021-04-25 Thread Nicola
On 2021-04-25, juh wrote: > I am married to Emacs but have an affair with Vim. ;-) Eventually, you will abandon the dark side of the Force ;-) > I real IDE-like support for ConTeXt would be nice: setup-en.pdf is > always open when I write environments as I cannot remember all commands > and

Re: [NTG-context] How to write readable source files?

2021-04-25 Thread juh
Hi Nicola, Am Sat, Apr 24, 2021 at 07:25:27PM - schrieb Nicola: > I maintain the ConTeXt plugin for Vim. Currently, there are no > indentation rules (except for embedded MetaPost code), and that is > intentional: as the examples above show, there is no commonly accepted > indentation style,

Re: [NTG-context] How to write readable source files?

2021-04-24 Thread Nicola
On 2021-04-24, juh wrote: > Am Sat, Apr 24, 2021 at 01:55:28PM +0200 schrieb Henning Hraban Ramm: >> I guess many of us adhere to Hans’ style, as shown in the sources. >> >> i.e. e.g. >> \setupsomething >> [name] >> [key=value, >>otherkey=value] >> >> while I prefer: >> >>

Re: [NTG-context] How to write readable source files?

2021-04-24 Thread juh
Am Sat, Apr 24, 2021 at 01:55:28PM +0200 schrieb Henning Hraban Ramm: > I guess many of us adhere to Hans’ style, as shown in the sources. > > i.e. e.g. > \setupsomething > [name] > [key=value, >otherkey=value] > > while I prefer: > > \setupsomething[name][ > key=value, >

Re: [NTG-context] How to write readable source files?

2021-04-24 Thread Hans Hagen
On 4/24/2021 11:45 AM, Jan U. Hasecke wrote: Hi all, how do you format your ConTeXt source files? I recently discovered prettier which reformats source files for different markup and programming languages such as html, markdown, json etc. There are some other tools around but I don't find

Re: [NTG-context] How to write readable source files?

2021-04-24 Thread Hans van der Meer
>> Is there a best practice for ConTeXt source files, at all? Readable code is not just about formatting. Adding clear and complete comments that document the code can be considered even more important. dr. Hans van der Meer > On 24 Apr 2021, at 13:55, Henning Hraban Ramm wrote: > > >> Am

Re: [NTG-context] How to write readable source files?

2021-04-24 Thread luigi scarso
On Sat, Apr 24, 2021 at 11:53 AM Jan U. Hasecke wrote: > > Hi all, > > how do you format your ConTeXt source files? > > I recently discovered prettier which reformats source files for > different markup > and programming languages such as html, markdown, json etc. > > There are some other tools

Re: [NTG-context] How to write readable source files?

2021-04-24 Thread Henning Hraban Ramm
> Am 24.04.2021 um 11:45 schrieb Jan U. Hasecke : > > Do you know of any prettifying tool? I don’t know one. > Is there a best practice for ConTeXt source files, at all? I guess many of us adhere to Hans’ style, as shown in the sources. i.e. e.g. \setupsomething [name] [key=value,