Hi,

Am Fr., 31. Juli 2020 um 19:04 Uhr schrieb Friedrich Romstedt
<friedrichromst...@gmail.com>:
>
> This is about a corner case of the ReST syntax highlighting. More
> specifically, it is about an issue related to comments in ReST ...

Is anyone interested in solving this problem (described in the
citation below)?  Who is the maintainer of the ReST syntax mode?

Friedrich

> ... using
> vim-8.2.0814 (which is the most recent version of vim packaged for
> Arch Linux).
>
> When starting a line with two dots while editing an ``*.rst`` file,
> vim 8.2.0814 automatically indents the following line by 3 spaces.
> This is useful in order to aid in providing *options* to directives.
> It makes some sense also to continue a comment, when the text
> following the two dots doesn't comprise a directive. Notice that
> vim-8.2.0814 won't produce this indentation when opening a, say,
> ``*.txt`` file and issuing later ``:set syntax=rst``, while it *does*
> appear when opening an ``*.rst`` file directly.
>
> I am using a preprocessor for ReST files where comments like ``..
> -de-`` or ``.. -de, en-`` etc. can be used to interlace content for
> different *targets* of a file (here ``de`` and ``en``); there is often
> interlaced content following *directly* to these comments (without a
> blank line).
>
> In this case, the ReST syntax mode of vim 8.2.0814 leads to results
> impeding usability.
>
> The abovementioned "sectioning comments" are never seen in the
> produced "compounds", while the "interlaced" sources are compiled
> never directly. Normally the unindented lines directly following these
> abovementioned comments (e.g. ``.. -en-``) would be syntax errors,
> but, in this case, these ReST "codes" make sense. Since the unindented
> lines directly following a two-dots line are, strictly speaking, ReST
> syntax errors, the behaviour of the vim ReST syntax highlighting mode
> can be considered "unspecified" in this case.
>
> The line following the two-leading-dots line can be dedented manually.
> However, after the next line break, vim 8.2.0814 again indents the
> next line.
>
> Would it be possible, to "leave" the comment/directive mode which
> leads to this indentation as soon as an unindented line is written?
> Maybe there would be room for such a decision since the case does not
> appear in "valid" ReST code. For the moment, I can work with vim
> 8.2.0510.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAN06%3DCxJYyUq_BK3OYF34MTgodW4DdTzSV19Ns6dYs7Czuwjcg%40mail.gmail.com.

Raspunde prin e-mail lui