On 2021-04-24, juh <juh+ntg-cont...@mailbox.org> 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:
>>
>> \setupsomething[name][
>>   key=value,
>>   otherkey=value,
>> ]
>
> I, too, stick to these styles more or less.
>
> But after many iterations my code gets scrambled so that I would be happy to
> reformat it via some tool. The usual functions in Vim and Emacs never results 
> in
> a style like this.

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, so forcing one on the user is not a good idea.

That said, if you have a list of desiderata, I may consider adding an
option to enable them. You may open an issue here for further
discussion:

    https://github.com/lifepillar/vim-context-metapost

If you need to reflow paragraphs, the plugin provides the tp text
object. So, for instance, you may type gqtp to reformat the current
paragraph (with hard breaks) using the current textwidth.

Nicola


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to