zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: "Jun. T" <takimoto-j@kba.biglobe.ne.jp>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH 0/2] _pandoc: avoid use of cache, etc.
Date: Fri, 28 May 2021 00:05:49 +0200	[thread overview]
Message-ID: <4721-1622153149.240316@WPfm.XbkI.5kzM> (raw)
In-Reply-To: <48737102-54FB-4BB6-969E-9DDA65F3417F@kba.biglobe.ne.jp>

On 26 Apr, "Jun. T" wrote:
> I'm not sure the 'fold markers' {{{ }}} for vim editor
> need be kept or not.

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
but I've not touched those.

I'm open to other views if someone thinks this stuff would be useful.

Oliver

diff --git a/Completion/Unix/Command/_bpython b/Completion/Unix/Command/_bpython
index 233e032e6..2c2ea11b8 100644
--- a/Completion/Unix/Command/_bpython
+++ b/Completion/Unix/Command/_bpython
@@ -41,6 +41,3 @@ case "$service" in
       "$gtk_opts[@]"
   ;;
 esac
-
-
-# vim:autoindent expandtab shiftwidth=2 tabstop=2 softtabstop=2 filetype=zsh
diff --git a/Completion/Unix/Command/_cdrdao b/Completion/Unix/Command/_cdrdao
index ceb86267c..b634a2a28 100644
--- a/Completion/Unix/Command/_cdrdao
+++ 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
 
 declare -ga _cdrdao_tmpfile_args
 _cdrdao_tmpfile_args=(
@@ -89,7 +89,7 @@ _cdrdao_common_read_args=(
   '--tao-source[indicate that source CD was written in TAO mode]'
   '--with-cddb[retrieve CD-TEXT data from a CDDB server]')
 
-# Sub-command completion {{{1
+# Sub-command completion
 
 _cdrdao-show-toc () {
   __cdrdao-show-toc-or-toc-info-or-toc-size
@@ -257,7 +257,7 @@ _cdrdao-copy () {
     $_cdrdao_paranoiamode_arg
 }
 
-# Type completion {{{1
+# Type completion
 
 __cdrdao-device () {
   # Use cdrdao scanbus and also check what OS we're running under and provide
@@ -280,6 +280,4 @@ __cdrdao-drivers () {
   fi
 }
 
-# }}}1
-
 _cdrdao
diff --git a/Completion/Unix/Command/_pandoc b/Completion/Unix/Command/_pandoc
index 2ff481e32..bdd261322 100644
--- a/Completion/Unix/Command/_pandoc
+++ b/Completion/Unix/Command/_pandoc
@@ -1,6 +1,6 @@
 #compdef pandoc
 
-# {{{ input or output formats with optional extensions
+# input or output formats with optional extensions
 # required option: -T (input|output)
 (( $+functions[_pandoc_format] )) ||
 _pandoc_format() {
@@ -16,8 +16,8 @@ _pandoc_format() {
     _wanted formats expl 'format' compadd -S '+' -r '-+ ' -a formats
   fi
 }
-# }}}
-# {{{ all supported formats
+
+# all supported formats
 (( $+functions[_pandoc_all_formats] )) ||
 _pandoc_all_formats(){
   local -a expl
@@ -25,16 +25,16 @@ _pandoc_all_formats(){
   formats=( $(pandoc --list-input-formats) $(pandoc --list-output-formats) )
   _wanted formats expl 'format' compadd -a formats
 }
-# }}}
-# {{{ pdf engine choice
+
+# pdf engine choice
 (( $+functions[_pandoc_pdf_engine] )) ||
 _pandoc_pdf_engine(){
   _alternative \
     'engines:engine:(pdflatex lualatex xelatex latexmk tectonic wkhtmltopdf weasyprint prince context pdfroff)' \
     'engine-executables:engine executable:_files -g "*(#q*)"'
 }
-# }}}
-# {{{ options to pass to --pdf-engine command
+
+# options to pass to --pdf-engine command
 (( $+functions[_pandoc_pdf_engine_opts] )) ||
 _pandoc_pdf_engine_opts(){
   local pdf_engine=${opt_args[--pdf-engine]}
@@ -47,8 +47,8 @@ _pandoc_pdf_engine_opts(){
       ;;
   esac
 }
-# }}}
-# {{{ data-dir specified by --data-dir option, or the default dir
+
+# data-dir specified by --data-dir option, or the default dir
 _pandoc_default_dir() {
   if (( $+opt_args[--data-dir] )); then
     echo ${opt_args[--data-dir]:a}
@@ -59,7 +59,8 @@ _pandoc_default_dir() {
     pandoc --version | sed -ne 's/.*[Uu]ser data directory: \([^ ]*\).*/\1/p'
   fi
 }
-# {{{ template file in $PWD or data-dir/templates/, or URL
+
+# template file in $PWD or data-dir/templates/, or URL
 (( $+functions[_pandoc_template] )) ||
 _pandoc_template(){
   # find output format from '-t format' or '-o xxx.format'
@@ -73,16 +74,16 @@ _pandoc_template(){
     "data-dir-templates:template in data-dir:_files -W $template_dir -g $pat" \
     'urls: :_urls'
 }
-# }}}
-# {{{ choose highlight-style
+
+# choose highlight-style
 (( $+functions[_pandoc_highlight_style] )) ||
 _pandoc_highlight_style(){
   _alternative \
     'styles:style:( $(pandoc --list-highlight-styles) )' \
     'style-files:style file:_files -g "*.theme"'
 }
-# }}}
-# {{{ filter file in $PWD, data-dir/filters/ or $PATH
+
+# filter file in $PWD, data-dir/filters/ or $PATH
 (( $+functions[_pandoc_filter] )) ||
 _pandoc_filter(){
   local filters_dir=$(_pandoc_default_dir)/filters
@@ -91,8 +92,8 @@ _pandoc_filter(){
     'data-dir-filters:filter in data-dir:_files -W filters_dir' \
     'commands: : _command_names -e'
 }
-# }}}
-# {{{ lua filter in $PWD or data-dir/filters/
+
+# lua filter in $PWD or data-dir/filters/
 (( $+functions[_pandoc_lua_filter] )) ||
 _pandoc_lua_filter(){
   local filters_dir=$(_pandoc_default_dir)/filters
@@ -100,8 +101,8 @@ _pandoc_lua_filter(){
     'local-filters:local filter:_files -g "*.lua"' \
     'data-dir-filters:filter in data-dir:_files -W filters_dir -g "*.lua"'
 }
-# }}}
-# {{{ default file in $PWD or data-dir/defaults/
+
+# default file in $PWD or data-dir/defaults/
 (( $+functions[_pandoc_defaults_file] )) ||
 _pandoc_defaults_file() {
   local defaults_dir=$(_pandoc_default_dir)/defaults
@@ -109,8 +110,8 @@ _pandoc_defaults_file() {
     'local-defaults:default file:_files -g "*.yaml"' \
     'data-dir-defaults:default in data-dir:_files -W defaults_dir -g "*.yaml"'
 }
-# }}}
-# {{{ choose reference location
+
+# choose reference location
 (( $+functions[_pandoc_reference_location] )) ||
 _pandoc_reference_location(){
   local -a policies
@@ -121,14 +122,14 @@ _pandoc_reference_location(){
   )
   _describe 'location' policies
 }
-# }}}
-# {{{ choose top level division
+
+# choose top level division
 (( $+functions[_pandoc_top_level_division] )) ||
 _pandoc_top_level_division(){
   _values 'top level division' default section chapter part
 }
-# }}}
-# {{{ choose email obfusication
+
+# choose email obfusication
 (( $+functions[_pandoc_email_obfusication] )) ||
 _pandoc_email_obfusication(){
   local -a policies
@@ -139,8 +140,8 @@ _pandoc_email_obfusication(){
   )
   _describe 'obfusication' policies
 }
-# }}}
-# {{{ choose wrapping policy
+
+# choose wrapping policy
 (( $+functions[_pandoc_wrap] )) ||
 _pandoc_wrap() {
   local -a policies
@@ -151,8 +152,8 @@ _pandoc_wrap() {
   )
   _describe 'policy' policies
 }
-# }}}
-# {{{ choose eol policy
+
+# choose eol policy
 (( $+functions[_pandoc_eol] )) ||
 _pandoc_eol() {
   local -a policies
@@ -163,8 +164,8 @@ _pandoc_eol() {
   )
   _describe 'policy' policies
 }
-# }}}
-# {{{ choose changes tracking policy
+
+# choose changes tracking policy
 (( $+functions[_pandoc_track_changes] )) ||
 _pandoc_track_changes() {
   local -a policies
@@ -175,7 +176,6 @@ _pandoc_track_changes() {
   )
   _describe 'policy' policies
 }
-# }}}
 
 # The real thing
 _arguments -s \


  reply	other threads:[~2021-05-27 22:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25 15:05 Jun. T
2021-05-27 22:05 ` Oliver Kiddle [this message]
2021-05-27 22:37   ` Daniel Shahaf
2021-05-27 23:12     ` Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4721-1622153149.240316@WPfm.XbkI.5kzM \
    --to=opk@zsh.org \
    --cc=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).