From 7a799b2e5010772cbc2da91dbf6df191eaa47e6d Mon Sep 17 00:00:00 2001 From: tennashi Date: Sun, 15 Dec 2019 23:25:54 +0900 Subject: [PATCH 1/7] Update syntax.{txt,jax} --- doc/syntax.jax | 76 ++++++++++++++++++++++--------- en/syntax.txt | 118 +++++++++++++++++++++++++++++++------------------ 2 files changed, 129 insertions(+), 65 deletions(-) diff --git a/doc/syntax.jax b/doc/syntax.jax index 81f70d3b6..981787ce3 100644 --- a/doc/syntax.jax +++ b/doc/syntax.jax @@ -1,4 +1,4 @@ -*syntax.txt* For Vim バージョン 8.1. Last change: 2019 Oct 27 +*syntax.txt* For Vim バージョン 8.2. Last change: 2019 Dec 07 VIMリファレンスマニュアル by Bram Moolenaar @@ -465,6 +465,15 @@ Note -s フラグは .vimrc とプラグインの読み込みを抑制する。 ようなことがらをすべてスクリプトファイルに書き込み、-u フラグで読み込んで実行 するといいだろう。 + *hl-TOhtmlProgress* *TOhtml-progress-color* +プログレスバーは HTML 変換が進むにつれ、ステータスラインに沿って色付きの四角で +表示される。デフォルトでは背景色は現在の "DiffDelete" ハイライトグループの設定 +が適用される。もし "DiffDelete" と "StatusLine" の背景色が同じ場合、TOhtml は +自動で色を調整する。もし自動で色を選択したくない場合は、自身でプログレスバーの +ハイライト色を定義することができる。例えば: > + + hi TOhtmlProgress guifg=#c0ffee ctermbg=7 +< *g:html_number_lines* 初期設定: 現在の 'number' の設定 0 なら、バッファのテキストは行番号なしで HTML に表示される。 @@ -496,8 +505,8 @@ Javascript が挿入される (|g:html_dynamic_folds|)。javascript はウィン < *g:html_use_css* 初期設定: 1 -1 なら、CSS1 で装飾された HTML 4.01 準拠の HTML が生成される。最新のブラウザー -とほとんどの古いブラウザーでサポートされている。 +1 なら、CSS で装飾された HTML 5 準拠の HTML が生成される。最新のブラウザーと多 +くの古いブラウザーでサポートされている。 0 なら、 タグで装飾された時代遅れの HTML が生成される。これは推奨されて いないが、古いブラウザー、あるいはメーラーや掲示板の投稿など、CSS が使えない場 合には必要だろう。 @@ -567,20 +576,40 @@ CSS を使うようになる。 例えば、foldcolumn と行番号をコピーできないようにするには: > :let g:html_prevent_copy = "fn" < -この機能は現在、コピー抑制エリアに読み込み専用の 要素を挿入することで -実装されている。これはすべての場合で機能するわけではない。他の、HTML を解釈す -るアプリケーションにペーストすると、 要素もペーストされる。しかしプレー -ンテキストとしてのペーストなら常に機能するだろう。 +生成されたページのコピーを防ぐための方法は |g:html_use_input_for_pc| の値に依 +存している。 + + *g:html_use_input_for_pc* +初期設定: "fallback" +|g:html_prevent_copy| の値が空文字列でないとき: + +"all" なら、コピー抑制エリアにある通常テキストの代わりに読み込み専用の +要素を使用する。古いブラウザなどいくつかのブラウザでは、ページ全体を選択しコ +ピーした後、 タグはページテキストと共にペーストされない。もし +|g:html_no_invalid| が 0 ならば、 タグは不正な属性を持つ。これにより大 +抵のブラウザで機能するようになるが、ページは正しくない。 +Note: この方法は最近の Chrome やそれと同等なブラウザでは動作しない。 +タグはテキストと共にペーストされてしまう。 + +"fallback" なら (これは初期設定値である)、古いブラウザのために同様に +要素を生成するが、コピー抑制テキストを表示するために新しいブラウザ (これは +CSS 機能クエリで決定される) では 要素を隠し、::before 疑似要素で生成し +たコンテンツを代わりに使用する。この方法は新旧ほとんどのブラウザで機能する。 + +"none" なら 要素は生成されない。コンテンツを生成する方法のみが使用され +る。これは Internet Explorer のような古いブラウザでは、コピーできないように意 +図されたテキストがコピーできるか、コピー抑制テキストが全く表示されないことを意 +味する。ただし、これが最も標準的な方法でマークアップも少なくなる。 *g:html_no_invalid* 初期設定: 0 -0 なら、もし |g:html_prevent_copy| が空でなければ、コピー抑制エリアのための - エレメントに不正な属性が意図的に挿入される。これによって、 要素 -がペーストされてしまうような場合でもいくつかのアプリケーションは対応可能とな -る。特に、Microsoft Word は不正な属性を持つ 要素をペーストしない。 -1 なら、不正な属性は挿入されない。正しいページが生成される。ただ -し、|g:html_prevent_copy| が空でないときに、Microsoft Word にペーストするには -注意が必要である。 要素がペーストされないようにするのは困難だ。 +0 なら、もし |g:html_prevent_copy| が空でなく |g:html_use_input_for_pc| も +"none" でない場合、コピー抑制エリアのための エレメントに不正な属性が意 +図的に挿入される。これによって、いくつかのアプリケーションで 要素が +ペーストされることを防ぐ。特に、いくつかのバージョンの Microsoft Word では不正 +な属性を持つ 要素をペーストしない。1 なら、不正な属性は挿入されない。 +正しいページが生成される。ただし、いくつかのアプリケーションでは 要素 +はペーストされてしまい、後で削除するのが困難になる。 *g:html_hover_unfold* 初期設定: 0 @@ -910,10 +939,12 @@ Basicとして扱われる。 C *c.vim* *ft-c-syntax* Cには幾つかの補助的なハイライト方法がある。それらを有効化するには対応した変数 -に値を設定する。例: > +に値(0 を含む)を設定する。例: > :let c_comment_strings = 1 -これを無効化するには ":unlet" を使う。例: > + :let c_no_bracket_error = 0 +これを無効化するには `:unlet` を使う。例: > :unlet c_comment_strings +0 に変更しても無効化されない! 代わりに、C++ のハイライトに切り替える方法もある: > :set filetype=cpp @@ -929,8 +960,9 @@ Cには幾つかの補助的なハイライト方法がある。それらを有 をエラーとして表示しない。 デフォルトでエラーとして表示される。欠落した ")" を見つけられないため。 -*c_curly_error* 対応する { がない } をハイライトする。これを有効にする - と、ファイルの先頭から同期が始まるため、遅くなる +*c_curly_error* 全てのペアを検証することにより対応する { がない } をハイ + ライトする。これを有効にすると、ファイルの先頭から同期が + 始まるため、遅くなる *c_no_ansi* ANSI標準の型と定数をハイライトしない *c_ansi_typedefs* ... 但し標準ANSI型はハイライトする *c_ansi_constants* ... 但し標準ANSI定数はハイライトする @@ -2643,10 +2675,10 @@ RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax* 複数のコードブロックタイプを単一の構文に割り当てるには、マッピングとして `rst_syntax_code_list` を定義する: > let rst_syntax_code_list = { - \ 'cpp' = ['cpp', 'c++'], - \ 'bash' = ['bash', 'sh'], + \ 'cpp': ['cpp', 'c++'], + \ 'bash': ['bash', 'sh'], ... - } + \ } 強調テキストにカラーハイライトを使用するには: > let rst_use_emphasis_colors = 1 @@ -4679,7 +4711,7 @@ cterm={attr-list} *highlight-cterm* メントを青色で表示することができる。 Note: DOSコンソールなどいくつかのターミナルでは色づけの際にこれらの属 性を混在させることはできない。移植性を重視するには、"cterm=" か - "ctermfg=" が "ctermbg=" のどれか1つだけを使うこと。 + "ctermfg=" か "ctermbg=" のどれか1つだけを使うこと。 ctermfg={color-nr} *highlight-ctermfg* *E421* ctermbg={color-nr} *highlight-ctermbg* diff --git a/en/syntax.txt b/en/syntax.txt index 99a99c406..604d7caec 100644 --- a/en/syntax.txt +++ b/en/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 8.1. Last change: 2019 Oct 27 +*syntax.txt* For Vim version 8.2. Last change: 2019 Dec 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -476,6 +476,16 @@ conversion. See |-E| and |-s-ex| for details. It is probably best to create a script to replace all the -c commands and use it with the -u flag instead of specifying each command separately. + *hl-TOhtmlProgress* *TOhtml-progress-color* +When displayed, the progress bar will show colored boxes along the statusline +as the HTML conversion proceeds. By default, the background color as the +current "DiffDelete" highlight group is used. If "DiffDelete" and "StatusLine" +have the same background color, TOhtml will automatically adjust the color to +differ. If you do not like the automatically selected colors, you can define +your own highlight colors for the progress bar. Example: > + + hi TOhtmlProgress guifg=#c0ffee ctermbg=7 +< *g:html_number_lines* Default: current 'number' setting. When 0, buffer text is displayed in the generated HTML without line numbering. @@ -507,8 +517,8 @@ For example: > < *g:html_use_css* Default: 1. -When 1, generate valid HTML 4.01 markup with CSS1 styling, supported in all -modern browsers and most old browsers. +When 1, generate valid HTML 5 markup with CSS styling, supported in all modern +browsers and many old browsers. When 0, generate tags and similar outdated markup. This is not recommended but it may work better in really old browsers, email clients, forum posts, and similar situations where basic CSS support is unavailable. @@ -580,23 +590,43 @@ affected in this way as follows: Example, to make the fold column and line numbers uncopyable: > :let g:html_prevent_copy = "fn" < -This feature is currently implemented by inserting read-only elements -into the markup to contain the uncopyable areas. This does not work well in -all cases. When pasting to some applications which understand HTML, the - elements also get pasted. But plain-text paste destinations should -always work. +The method used to prevent copying in the generated page depends on the value +of |g:html_use_input_for_pc|. + + *g:html_use_input_for_pc* +Default: "fallback" +If |g:html_prevent_copy| is non-empty, then: + +When "all", read-only elements are used in place of normal text for +uncopyable regions. In some browsers, especially older browsers, after +selecting an entire page and copying the selection, the tags are not +pasted with the page text. If |g:html_no_invalid| is 0, the tags have +invalid type; this works in more browsers, but the page will not validate. +Note: this method does NOT work in recent versions of Chrome and equivalent +browsers; the tags get pasted with the text. + +When "fallback" (default value), the same elements are generated for +older browsers, but newer browsers (detected by CSS feature query) hide the + elements and instead use generated content in an ::before pseudoelement +to display the uncopyable text. This method should work with the largest +number of browsers, both old and new. + +When "none", the elements are not generated at all. Only the +generated-content method is used. This means that old browsers, notably +Internet Explorer, will either copy the text intended not to be copyable, or +the non-copyable text may not appear at all. However, this is the most +standards-based method, and there will be much less markup. *g:html_no_invalid* Default: 0. -When 0, if |g:html_prevent_copy| is non-empty, an invalid attribute is -intentionally inserted into the element for the uncopyable areas. This -increases the number of applications you can paste to without also pasting the - elements. Specifically, Microsoft Word will not paste the -elements if they contain this invalid attribute. -When 1, no invalid markup is ever intentionally inserted, and the generated -page should validate. However, be careful pasting into Microsoft Word when -|g:html_prevent_copy| is non-empty; it can be hard to get rid of the -elements which get pasted. +When 0, if |g:html_prevent_copy| is non-empty and |g:html_use_input_for_pc| is +not "none", an invalid attribute is intentionally inserted into the +element for the uncopyable areas. This prevents pasting the elements +in some applications. Specifically, some versions of Microsoft Word will not +paste the elements if they contain this invalid attribute. When 1, no +invalid markup is inserted, and the generated page should validate. However, + elements may be pasted into some applications and can be difficult to +remove afterward. *g:html_hover_unfold* Default: 0. @@ -936,10 +966,12 @@ Basic. C *c.vim* *ft-c-syntax* A few things in C highlighting are optional. To enable them assign any value -to the respective variable. Example: > +(including zero) to the respective variable. Example: > :let c_comment_strings = 1 -To disable them use ":unlet". Example: > + :let c_no_bracket_error = 0 +To disable them use `:unlet`. Example: > :unlet c_comment_strings +Setting the value to zero doesn't work! An alternative is to switch to the C++ highlighting: > :set filetype=cpp @@ -955,8 +987,8 @@ Variable Highlight ~ except { and } in first column Default is to highlight them, otherwise you can't spot a missing ")". -*c_curly_error* highlight a missing }; this forces syncing from the - start of the file, can be slow +*c_curly_error* highlight a missing } by finding all pairs; this + forces syncing from the start of the file, can be slow *c_no_ansi* don't do standard ANSI types and constants *c_ansi_typedefs* ... but do standard ANSI types *c_ansi_constants* ... but do standard ANSI constants @@ -1369,26 +1401,26 @@ to your startup file. EUPHORIA *euphoria3.vim* *euphoria4.vim* *ft-euphoria-syntax* -Two syntax highlighting files exists for Euphoria. One for Euphoria -version 3.1.1, which is the default syntax highlighting file, and one for +Two syntax highlighting files exists for Euphoria. One for Euphoria +version 3.1.1, which is the default syntax highlighting file, and one for Euphoria version 4.0.5 or later. -Euphoria version 3.1.1 (http://www.rapideuphoria.com/) is still necessary -for developing applications for the DOS platform, which Euphoria version 4 +Euphoria version 3.1.1 (http://www.rapideuphoria.com/) is still necessary +for developing applications for the DOS platform, which Euphoria version 4 (http://www.openeuphoria.org/) does not support. -The following file extensions are auto-detected as Euphoria file type: - +The following file extensions are auto-detected as Euphoria file type: + *.e, *.eu, *.ew, *.ex, *.exu, *.exw *.E, *.EU, *.EW, *.EX, *.EXU, *.EXW -To select syntax highlighting file for Euphoria, as well as for +To select syntax highlighting file for Euphoria, as well as for auto-detecting the *.e and *.E file extensions as Euphoria file type, add the following line to your startup file: > :let filetype_euphoria="euphoria3" - or + or :let filetype_euphoria="euphoria4" @@ -2741,10 +2773,10 @@ To set a user-defined list of code block syntax highlighting: > To assign multiple code block types to a single syntax, define `rst_syntax_code_list` as a mapping: > let rst_syntax_code_list = { - \ 'cpp' = ['cpp', 'c++'], - \ 'bash' = ['bash', 'sh'], + \ 'cpp': ['cpp', 'c++'], + \ 'bash': ['bash', 'sh'], ... - } + \ } To use color highlighting for emphasis text: > let rst_use_emphasis_colors = 1 @@ -3505,26 +3537,26 @@ It will look much better with a font in a quadratic cell size, e.g. for X: > YAML *yaml.vim* *ft-yaml-syntax* *g:yaml_schema* *b:yaml_schema* -A YAML schema is a combination of a set of tags and a mechanism for resolving -non-specific tags. For user this means that YAML parser may, depending on -plain scalar contents, treat plain scalar (which can actually be only string -and nothing else) as a value of the other type: null, boolean, floating-point, -integer. `g:yaml_schema` option determines according to which schema values +A YAML schema is a combination of a set of tags and a mechanism for resolving +non-specific tags. For user this means that YAML parser may, depending on +plain scalar contents, treat plain scalar (which can actually be only string +and nothing else) as a value of the other type: null, boolean, floating-point, +integer. `g:yaml_schema` option determines according to which schema values will be highlighted specially. Supported schemas are Schema Description ~ failsafe No additional highlighting. json Supports JSON-style numbers, booleans and null. core Supports more number, boolean and null styles. -pyyaml In addition to core schema supports highlighting timestamps, - but there are some differences in what is recognized as - numbers and many additional boolean values not present in core +pyyaml In addition to core schema supports highlighting timestamps, + but there are some differences in what is recognized as + numbers and many additional boolean values not present in core schema. Default schema is `core`. -Note that schemas are not actually limited to plain scalars, but this is the -only difference between schemas defined in YAML specification and the only +Note that schemas are not actually limited to plain scalars, but this is the +only difference between schemas defined in YAML specification and the only difference defined in the syntax file. @@ -3626,7 +3658,7 @@ SYNTAX ISKEYWORD SETTING *:syn-iskeyword* clear: Syntax specific iskeyword setting is disabled and the buffer-local 'iskeyword' setting is used. - {option} Set the syntax 'iskeyword' option to a new value. + {option} Set the syntax 'iskeyword' option to a new value. Example: > :syntax iskeyword @,48-57,192-255,$,_ From c16569036dfc3e180f0258e07b4b7217ad4fb92b Mon Sep 17 00:00:00 2001 From: tennashi Date: Sun, 15 Dec 2019 23:43:40 +0900 Subject: [PATCH 2/7] =?UTF-8?q?Fix=20=E3=83=96=E3=83=A9=E3=82=A6=E3=82=B6?= =?UTF-8?q?=E3=83=BC=20to=20=E3=83=96=E3=83=A9=E3=82=A6=E3=82=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/syntax.jax | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/doc/syntax.jax b/doc/syntax.jax index 981787ce3..4dd1c4e62 100644 --- a/doc/syntax.jax +++ b/doc/syntax.jax @@ -372,11 +372,11 @@ Vimは初期化の時に、ランタイムファイルの在り処を自動的 これは構文ファイルではなくて、現在のウィンドウの内容をHTMLに変換するスクリプト である。Vimは新しいウィンドウを作成しそこにHTMLファイルを構築する。 -変換結果を保存すればブラウザーでそれを表示できる。Vim での表示と同じ色で表示さ -れるはずである。|g:html_line_ids| を有効化すると、ブラウザーのアドレスバーで -URL の末尾に (例えば) #L123 や #123 と付け加えることで、その行にジャンプでき -る。また、|g:html_dynamic_folds| を有効化すると、Vim の折り畳みを表示したり隠 -したりできる。 +変換結果を保存すればブラウザでそれを表示できる。Vim での表示と同じ色で表示され +るはずである。|g:html_line_ids| を有効化すると、ブラウザのアドレスバーで URL +の末尾に (例えば) #L123 や #123 と付け加えることで、その行にジャンプできる。ま +た、|g:html_dynamic_folds| を有効化すると、Vim の折り畳みを表示したり隠したり +できる。 使う際にはオプション 'filetype' や 'syntax' に "2html" を設定してはならない! 現在のファイルをコンバートするためにはこのスクリプトを読込む: > @@ -388,8 +388,8 @@ URL の末尾に (例えば) #L123 や #123 と付け加えることで、その 削除することで初期設定に戻すことができる。 覚書き: -- いくつかの本当に古いブラウザーでは背景色が表示されないことがある。 -- 大半のブラウザーでは(なんとカラーで)印刷することができる! +- いくつかの本当に古いブラウザでは背景色が表示されないことがある。 +- 大半のブラウザでは(なんとカラーで)印刷することができる! - このバージョンの TOhtml はおそらく古い Vim でも動作するが、例えば conceal サ ポートのようないくつかの機能は動作しない。また、GUI サポート無しでコンパイル された古い Vim では色がおかしくなるかもしれない。 @@ -505,11 +505,11 @@ Javascript が挿入される (|g:html_dynamic_folds|)。javascript はウィン < *g:html_use_css* 初期設定: 1 -1 なら、CSS で装飾された HTML 5 準拠の HTML が生成される。最新のブラウザーと多 -くの古いブラウザーでサポートされている。 +1 なら、CSS で装飾された HTML 5 準拠の HTML が生成される。最新のブラウザと多く +の古いブラウザでサポートされている。 0 なら、 タグで装飾された時代遅れの HTML が生成される。これは推奨されて -いないが、古いブラウザー、あるいはメーラーや掲示板の投稿など、CSS が使えない場 -合には必要だろう。 +いないが、古いブラウザ、あるいはメーラーや掲示板の投稿など、CSS が使えない場合 +には必要だろう。 例: > :let g:html_use_css = 0 < @@ -564,10 +564,10 @@ CSS を使うようになる。 < *TOhtml-uncopyable-text* *g:html_prevent_copy* 初期設定: 空文字列 -このオプションは、例えば生成された HTML をブラウザーで開いて全体を選択してコ -ピーしたときに、特定の範囲がコピーされないようにできる。これは foldcolumn や行 -番号が表示されていても、ソーステキストのみコピーできるようにしたい場合に便利で -ある。範囲の指定は次のようにする: +このオプションは、例えば生成された HTML をブラウザで開いて全体を選択してコピー +したときに、特定の範囲がコピーされないようにできる。これは foldcolumn や行番号 +が表示されていても、ソーステキストのみコピーできるようにしたい場合に便利であ +る。範囲の指定は次のようにする: f: foldcolumn n: 行番号 (折り畳みテキスト内のも) t: 折り畳みテキスト @@ -619,7 +619,7 @@ CSS 機能クエリで決定される) では 要素を隠し、::before るようにする。javascript を無効にしていても折り畳みを開けるようにしたい場合に 便利である。 -Note 古いブラウザー (特に Internet Explorer 6) はこの機能をサポートしていない。 +Note 古いブラウザ (特に Internet Explorer 6) はこの機能をサポートしていない。 通常の CSS1 を使った IE6 用のマークアップが挿入され、IE6 でも表示できるように はなっているが、foldcolumn がないとそれを開くことはできない。 > @@ -647,9 +647,9 @@ NOTE: diff ビューを HTML に変換するときは、この式は diff の 1 *TOhtml-wrap-text* *g:html_pre_wrap* 初期設定: 現在の 'wrap' の設定 0 なら、もし |g:html_no_pre| が 0 または未設定なら、生成された HTML のテキスト -はブラウザーの端で折り返されない。 +はブラウザの端で折り返されない。 1 なら、もし |g:html_use_css| が 1 なら、CSS 2.0 の "white-space:pre-wrap" が -使われ、テキストはブラウザーの端で折り返される。 +使われ、テキストはブラウザの端で折り返される。 明示的に折り返しを有効にするには: > :let g:html_pre_wrap = 1 明示的に折り返しを無効にするには: > @@ -664,8 +664,8 @@ Vim 内での表示と同じように表示され、タブ文字もそのまま (|g:html_expand_tabs| 参照)。 1 なら (非推奨)、
 タグは使われず、代わりに 
タグが使われる。スペース 文字は   文字参照に変換され、改行には
が使われる。これは HTML で折り -返し (|g:html_pre_wrap|) をするためのもう一つの方法で、古いブラウザーでも動作 -するが、Vim の表示とは違うページが生成されるかもしれない。 +返し (|g:html_pre_wrap|) をするためのもう一つの方法で、古いブラウザでも動作す +るが、Vim の表示とは違うページが生成されるかもしれない。 > :let g:html_no_pre = 1 < @@ -676,7 +676,7 @@ Vim 内での表示と同じように表示され、タブ文字もそのまま 1 なら、 文字は同等のスペース文字、または   (|g:html_no_pre| が 1 の 場合) に置換される。 0 なら、もし |g:html_no_pre| が 0 または未設定なら、 文字はそのまま HTML -に出力される。これはブラウザーで表示したときに、もとのテキストのままコピー & +に出力される。これはブラウザで表示したときに、もとのテキストのままコピー & ペーストできるようにしたい場合に便利である。Note これはテキストの整列やインデ ントが崩れやすい (初期設定として設定された場合は別)。 @@ -697,7 +697,7 @@ Vim 内での表示と同じように表示され、タブ文字もそのまま る。 自動設定は |encoding-names| に挙げられたエンコーディング名に対して機能するが、 -TOhtml は多くのブラウザーでサポートされているエンコーディングのみ自動設定する。 +TOhtml は多くのブラウザでサポートされているエンコーディングのみ自動設定する。 自動設定の対象外のエンコーディングを使用したい場合は明示的にそれを設定すること ができる (下記オプション参照)。IANA 名については http://www.iana.org/assignments/character-sets を参照。 @@ -736,7 +736,7 @@ HTML 生成される (W3C 推奨): *g:html_charset_override* 初期設定: なし。|encoding-names| で挙げられているエンコーディングに対しては autoload/tohtml.vim で既定の変換が定義されている。それは多くの - ブラウザーでサポートされている。 + ブラウザでサポートされている。 |2html.vim| が 'fileencoding' や 'encoding' から適切な HTML 文字セットを自動的 に決定できない場合に設定する。既定のエンコーディング-文字セット組を上書きする こともできる。例えば、TOhtml はすべての Unicode/UCS エンコーディングに対しては From c60c16c4d95220e9b8f2e792969ea35bf594b484 Mon Sep 17 00:00:00 2001 From: tennashi Date: Sun, 15 Dec 2019 23:49:43 +0900 Subject: [PATCH 3/7] =?UTF-8?q?Revert=20"Fix=20=E3=83=96=E3=83=A9=E3=82=A6?= =?UTF-8?q?=E3=82=B6=E3=83=BC=20to=20=E3=83=96=E3=83=A9=E3=82=A6=E3=82=B6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c16569036dfc3e180f0258e07b4b7217ad4fb92b. --- doc/syntax.jax | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/doc/syntax.jax b/doc/syntax.jax index 4dd1c4e62..981787ce3 100644 --- a/doc/syntax.jax +++ b/doc/syntax.jax @@ -372,11 +372,11 @@ Vimは初期化の時に、ランタイムファイルの在り処を自動的 これは構文ファイルではなくて、現在のウィンドウの内容をHTMLに変換するスクリプト である。Vimは新しいウィンドウを作成しそこにHTMLファイルを構築する。 -変換結果を保存すればブラウザでそれを表示できる。Vim での表示と同じ色で表示され -るはずである。|g:html_line_ids| を有効化すると、ブラウザのアドレスバーで URL -の末尾に (例えば) #L123 や #123 と付け加えることで、その行にジャンプできる。ま -た、|g:html_dynamic_folds| を有効化すると、Vim の折り畳みを表示したり隠したり -できる。 +変換結果を保存すればブラウザーでそれを表示できる。Vim での表示と同じ色で表示さ +れるはずである。|g:html_line_ids| を有効化すると、ブラウザーのアドレスバーで +URL の末尾に (例えば) #L123 や #123 と付け加えることで、その行にジャンプでき +る。また、|g:html_dynamic_folds| を有効化すると、Vim の折り畳みを表示したり隠 +したりできる。 使う際にはオプション 'filetype' や 'syntax' に "2html" を設定してはならない! 現在のファイルをコンバートするためにはこのスクリプトを読込む: > @@ -388,8 +388,8 @@ Vimは初期化の時に、ランタイムファイルの在り処を自動的 削除することで初期設定に戻すことができる。 覚書き: -- いくつかの本当に古いブラウザでは背景色が表示されないことがある。 -- 大半のブラウザでは(なんとカラーで)印刷することができる! +- いくつかの本当に古いブラウザーでは背景色が表示されないことがある。 +- 大半のブラウザーでは(なんとカラーで)印刷することができる! - このバージョンの TOhtml はおそらく古い Vim でも動作するが、例えば conceal サ ポートのようないくつかの機能は動作しない。また、GUI サポート無しでコンパイル された古い Vim では色がおかしくなるかもしれない。 @@ -505,11 +505,11 @@ Javascript が挿入される (|g:html_dynamic_folds|)。javascript はウィン < *g:html_use_css* 初期設定: 1 -1 なら、CSS で装飾された HTML 5 準拠の HTML が生成される。最新のブラウザと多く -の古いブラウザでサポートされている。 +1 なら、CSS で装飾された HTML 5 準拠の HTML が生成される。最新のブラウザーと多 +くの古いブラウザーでサポートされている。 0 なら、 タグで装飾された時代遅れの HTML が生成される。これは推奨されて -いないが、古いブラウザ、あるいはメーラーや掲示板の投稿など、CSS が使えない場合 -には必要だろう。 +いないが、古いブラウザー、あるいはメーラーや掲示板の投稿など、CSS が使えない場 +合には必要だろう。 例: > :let g:html_use_css = 0 < @@ -564,10 +564,10 @@ CSS を使うようになる。 < *TOhtml-uncopyable-text* *g:html_prevent_copy* 初期設定: 空文字列 -このオプションは、例えば生成された HTML をブラウザで開いて全体を選択してコピー -したときに、特定の範囲がコピーされないようにできる。これは foldcolumn や行番号 -が表示されていても、ソーステキストのみコピーできるようにしたい場合に便利であ -る。範囲の指定は次のようにする: +このオプションは、例えば生成された HTML をブラウザーで開いて全体を選択してコ +ピーしたときに、特定の範囲がコピーされないようにできる。これは foldcolumn や行 +番号が表示されていても、ソーステキストのみコピーできるようにしたい場合に便利で +ある。範囲の指定は次のようにする: f: foldcolumn n: 行番号 (折り畳みテキスト内のも) t: 折り畳みテキスト @@ -619,7 +619,7 @@ CSS 機能クエリで決定される) では 要素を隠し、::before るようにする。javascript を無効にしていても折り畳みを開けるようにしたい場合に 便利である。 -Note 古いブラウザ (特に Internet Explorer 6) はこの機能をサポートしていない。 +Note 古いブラウザー (特に Internet Explorer 6) はこの機能をサポートしていない。 通常の CSS1 を使った IE6 用のマークアップが挿入され、IE6 でも表示できるように はなっているが、foldcolumn がないとそれを開くことはできない。 > @@ -647,9 +647,9 @@ NOTE: diff ビューを HTML に変換するときは、この式は diff の 1 *TOhtml-wrap-text* *g:html_pre_wrap* 初期設定: 現在の 'wrap' の設定 0 なら、もし |g:html_no_pre| が 0 または未設定なら、生成された HTML のテキスト -はブラウザの端で折り返されない。 +はブラウザーの端で折り返されない。 1 なら、もし |g:html_use_css| が 1 なら、CSS 2.0 の "white-space:pre-wrap" が -使われ、テキストはブラウザの端で折り返される。 +使われ、テキストはブラウザーの端で折り返される。 明示的に折り返しを有効にするには: > :let g:html_pre_wrap = 1 明示的に折り返しを無効にするには: > @@ -664,8 +664,8 @@ Vim 内での表示と同じように表示され、タブ文字もそのまま (|g:html_expand_tabs| 参照)。 1 なら (非推奨)、
 タグは使われず、代わりに 
タグが使われる。スペース 文字は   文字参照に変換され、改行には
が使われる。これは HTML で折り -返し (|g:html_pre_wrap|) をするためのもう一つの方法で、古いブラウザでも動作す -るが、Vim の表示とは違うページが生成されるかもしれない。 +返し (|g:html_pre_wrap|) をするためのもう一つの方法で、古いブラウザーでも動作 +するが、Vim の表示とは違うページが生成されるかもしれない。 > :let g:html_no_pre = 1 < @@ -676,7 +676,7 @@ Vim 内での表示と同じように表示され、タブ文字もそのまま 1 なら、 文字は同等のスペース文字、または   (|g:html_no_pre| が 1 の 場合) に置換される。 0 なら、もし |g:html_no_pre| が 0 または未設定なら、 文字はそのまま HTML -に出力される。これはブラウザで表示したときに、もとのテキストのままコピー & +に出力される。これはブラウザーで表示したときに、もとのテキストのままコピー & ペーストできるようにしたい場合に便利である。Note これはテキストの整列やインデ ントが崩れやすい (初期設定として設定された場合は別)。 @@ -697,7 +697,7 @@ Vim 内での表示と同じように表示され、タブ文字もそのまま る。 自動設定は |encoding-names| に挙げられたエンコーディング名に対して機能するが、 -TOhtml は多くのブラウザでサポートされているエンコーディングのみ自動設定する。 +TOhtml は多くのブラウザーでサポートされているエンコーディングのみ自動設定する。 自動設定の対象外のエンコーディングを使用したい場合は明示的にそれを設定すること ができる (下記オプション参照)。IANA 名については http://www.iana.org/assignments/character-sets を参照。 @@ -736,7 +736,7 @@ HTML 生成される (W3C 推奨): *g:html_charset_override* 初期設定: なし。|encoding-names| で挙げられているエンコーディングに対しては autoload/tohtml.vim で既定の変換が定義されている。それは多くの - ブラウザでサポートされている。 + ブラウザーでサポートされている。 |2html.vim| が 'fileencoding' や 'encoding' から適切な HTML 文字セットを自動的 に決定できない場合に設定する。既定のエンコーディング-文字セット組を上書きする こともできる。例えば、TOhtml はすべての Unicode/UCS エンコーディングに対しては From 8f3be79965f436209fd81672aba80f13d6794816 Mon Sep 17 00:00:00 2001 From: tennashi Date: Sun, 15 Dec 2019 23:53:45 +0900 Subject: [PATCH 4/7] =?UTF-8?q?Fix=20=E3=83=96=E3=83=A9=E3=82=A6=E3=82=B6?= =?UTF-8?q?=20to=20=E3=83=96=E3=83=A9=E3=82=A6=E3=82=B6=E3=83=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/syntax.jax | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/syntax.jax b/doc/syntax.jax index 981787ce3..2879f08ca 100644 --- a/doc/syntax.jax +++ b/doc/syntax.jax @@ -584,22 +584,22 @@ CSS を使うようになる。 |g:html_prevent_copy| の値が空文字列でないとき: "all" なら、コピー抑制エリアにある通常テキストの代わりに読み込み専用の -要素を使用する。古いブラウザなどいくつかのブラウザでは、ページ全体を選択しコ -ピーした後、 タグはページテキストと共にペーストされない。もし +要素を使用する。古いブラウザーなどいくつかのブラウザーでは、ページ全体を選択し +コピーした後、 タグはページテキストと共にペーストされない。もし |g:html_no_invalid| が 0 ならば、 タグは不正な属性を持つ。これにより大 -抵のブラウザで機能するようになるが、ページは正しくない。 -Note: この方法は最近の Chrome やそれと同等なブラウザでは動作しない。 +抵のブラウザーで機能するようになるが、ページは正しくない。 +Note: この方法は最近の Chrome やそれと同等なブラウザーでは動作しない。 タグはテキストと共にペーストされてしまう。 -"fallback" なら (これは初期設定値である)、古いブラウザのために同様に -要素を生成するが、コピー抑制テキストを表示するために新しいブラウザ (これは +"fallback" なら (これは初期設定値である)、古いブラウザーのために同様に +要素を生成するが、コピー抑制テキストを表示するために新しいブラウザー (これは CSS 機能クエリで決定される) では 要素を隠し、::before 疑似要素で生成し -たコンテンツを代わりに使用する。この方法は新旧ほとんどのブラウザで機能する。 +たコンテンツを代わりに使用する。この方法は新旧ほとんどのブラウザーで機能する。 "none" なら 要素は生成されない。コンテンツを生成する方法のみが使用され -る。これは Internet Explorer のような古いブラウザでは、コピーできないように意 -図されたテキストがコピーできるか、コピー抑制テキストが全く表示されないことを意 -味する。ただし、これが最も標準的な方法でマークアップも少なくなる。 +る。これは Internet Explorer のような古いブラウザーでは、コピーできないように +意図されたテキストがコピーできるか、コピー抑制テキストが全く表示されないことを +意味する。ただし、これが最も標準的な方法でマークアップも少なくなる。 *g:html_no_invalid* 初期設定: 0 From 11cf5643a41022ad9b32af37f5b9799a48e9e0ad Mon Sep 17 00:00:00 2001 From: tennashi Date: Fri, 20 Dec 2019 23:02:47 +0900 Subject: [PATCH 5/7] fix the new line starts --- doc/syntax.jax | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/syntax.jax b/doc/syntax.jax index 2879f08ca..10ab0ff9d 100644 --- a/doc/syntax.jax +++ b/doc/syntax.jax @@ -468,9 +468,9 @@ Note -s フラグは .vimrc とプラグインの読み込みを抑制する。 *hl-TOhtmlProgress* *TOhtml-progress-color* プログレスバーは HTML 変換が進むにつれ、ステータスラインに沿って色付きの四角で 表示される。デフォルトでは背景色は現在の "DiffDelete" ハイライトグループの設定 -が適用される。もし "DiffDelete" と "StatusLine" の背景色が同じ場合、TOhtml は -自動で色を調整する。もし自動で色を選択したくない場合は、自身でプログレスバーの -ハイライト色を定義することができる。例えば: > +が適用される。"DiffDelete" と "StatusLine" の背景色が同じ場合、TOhtml は自動で +色を調整する。自動で色を選択したくない場合は、自身でプログレスバーのハイライト +色を定義することができる。例えば: > hi TOhtmlProgress guifg=#c0ffee ctermbg=7 < @@ -605,11 +605,11 @@ CSS 機能クエリで決定される) では 要素を隠し、::before 初期設定: 0 0 なら、もし |g:html_prevent_copy| が空でなく |g:html_use_input_for_pc| も "none" でない場合、コピー抑制エリアのための エレメントに不正な属性が意 -図的に挿入される。これによって、いくつかのアプリケーションで 要素が -ペーストされることを防ぐ。特に、いくつかのバージョンの Microsoft Word では不正 -な属性を持つ 要素をペーストしない。1 なら、不正な属性は挿入されない。 -正しいページが生成される。ただし、いくつかのアプリケーションでは 要素 -はペーストされてしまい、後で削除するのが困難になる。 +図的に挿入される。これによって、いくつかのアプリケーションで 要素がペー +ストされることを防ぐ。特に、いくつかのバージョンの Microsoft Word では不正な属 +性を持つ 要素をペーストしない。1 なら、不正な属性は挿入されない。正し +いページが生成される。ただし、いくつかのアプリケーションでは 要素はペー +ストされてしまい、後で削除するのが困難になる。 *g:html_hover_unfold* 初期設定: 0 @@ -939,7 +939,7 @@ Basicとして扱われる。 C *c.vim* *ft-c-syntax* Cには幾つかの補助的なハイライト方法がある。それらを有効化するには対応した変数 -に値(0 を含む)を設定する。例: > +に値 (0 を含む) を設定する。例: > :let c_comment_strings = 1 :let c_no_bracket_error = 0 これを無効化するには `:unlet` を使う。例: > @@ -960,9 +960,9 @@ Cには幾つかの補助的なハイライト方法がある。それらを有 をエラーとして表示しない。 デフォルトでエラーとして表示される。欠落した ")" を見つけられないため。 -*c_curly_error* 全てのペアを検証することにより対応する { がない } をハイ - ライトする。これを有効にすると、ファイルの先頭から同期が - 始まるため、遅くなる +*c_curly_error* 全てのペアを検証することにより対応する { がない } をハ + イライトする。これを有効にすると、ファイルの先頭から同 + 期が 始まるため、遅くなる *c_no_ansi* ANSI標準の型と定数をハイライトしない *c_ansi_typedefs* ... 但し標準ANSI型はハイライトする *c_ansi_constants* ... 但し標準ANSI定数はハイライトする From 4364810d46be2fd4f94435adcbb91230d804826e Mon Sep 17 00:00:00 2001 From: tennashi Date: Sat, 21 Dec 2019 19:11:58 +0900 Subject: [PATCH 6/7] Update syntax.{txt,jax} --- doc/syntax.jax | 8 +++++++- en/syntax.txt | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/syntax.jax b/doc/syntax.jax index 10ab0ff9d..8a88136be 100644 --- a/doc/syntax.jax +++ b/doc/syntax.jax @@ -1,4 +1,4 @@ -*syntax.txt* For Vim バージョン 8.2. Last change: 2019 Dec 07 +*syntax.txt* For Vim バージョン 8.2. Last change: 2019 Dec 19 VIMリファレンスマニュアル by Bram Moolenaar @@ -2663,6 +2663,12 @@ readlineライブラリは主としてBASHシェルで使われ、BASHはかな トするようになる。 +REGO *rego.vim* *ft-rego-syntax* + +Rego は Styra が開発したクエリ言語である。主に kubernetes のポリシー言語として +使用される。次の拡張子のファイルが rego ファイルとして認識される: .rego + + RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax* 選択したファイルタイプの数について、文書内のコードブロックに対して構文ハイライ diff --git a/en/syntax.txt b/en/syntax.txt index 604d7caec..b1a1d0fe2 100644 --- a/en/syntax.txt +++ b/en/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 8.2. Last change: 2019 Dec 07 +*syntax.txt* For Vim version 8.2. Last change: 2019 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2761,6 +2761,13 @@ This will add highlighting for the commands that BASH (version 2.05a and later, and part earlier) adds. +REGO *rego.vim* *ft-rego-syntax* + +Rego is a query language developed by Styra. It is mostly used as a policy +language for kubernetes, but can be applied to almost anything. Files with +the following extensions are recognized as rego files: .rego. + + RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax* Syntax highlighting is enabled for code blocks within the document for a From f8492ecb2380b2a9ac6783d30ed7e5c486788c31 Mon Sep 17 00:00:00 2001 From: tennashi Date: Tue, 24 Dec 2019 23:14:53 +0900 Subject: [PATCH 7/7] fix missing translation --- doc/syntax.jax | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/syntax.jax b/doc/syntax.jax index 8a88136be..f417b635d 100644 --- a/doc/syntax.jax +++ b/doc/syntax.jax @@ -2666,7 +2666,8 @@ readlineライブラリは主としてBASHシェルで使われ、BASHはかな REGO *rego.vim* *ft-rego-syntax* Rego は Styra が開発したクエリ言語である。主に kubernetes のポリシー言語として -使用される。次の拡張子のファイルが rego ファイルとして認識される: .rego +使用されるが、ほぼ全てのアプリケーションに適用できる。次の拡張子のファイルが +rego ファイルとして認識される: .rego RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax*