Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH 0/2] _pandoc: avoid use of cache, etc.

Oliver Kiddle wrote on Thu, 27 May 2021 22:05 +00:00:
> I don't think so - they are editor specific and we only have them in a
> couple of files rather than them being consistently applied across many.
> Various editors, including vim, can parse a file to place folds where
> they make sense syntactically. And I don't think we should have editor
> specific markers for options either. That's what .editorconfig is for.
> This patch removes vim markers in _pandoc and a couple of other
> completion functions. They can also be found in files below Functions

Where?  I don't see any {{{,}}} fold markers under Functions/.

> but I've not touched those.
> I'm open to other views if someone thinks this stuff would be useful.

The diff hunks for _bpython and _pandoc look good, but I don't agree
with removing the fold markers from _cdrdao.  The fold markers in that
file can't be inferred from machine parsing, or even from naïve human
parsing; they were placed by a human familiar with the file.  Please
keep them.

If we do keep fold markers, then of course users of other editors are
welcome to add equivalent markings for their editors.  I don't think
that will grow unwieldy (and if it does, we can deal with it then).

If the fold markers interfere with "Jump to the matching curly brace"
functionality in editors that don't ignore matches in comments, the fold
markers could be changed to something other than curly braces.



> +++ b/Completion/Unix/Command/_cdrdao
> @@ -2,7 +2,7 @@
>  # TODO: Options must come before parameters.
> -# Command completion and main loop {{{1
> +# Command completion and main loop
>  _cdrdao () {
>    local ret=1
> @@ -23,7 +23,7 @@ _cdrdao () {
>    return ret
>  }
> -# Common arguments {{{1
> +# Common arguments

Messages sorted by: Reverse Date, Date, Thread, Author