Skip to content

Commit ab7168b

Browse files
authored
Merge pull request #871 from tsuyoshicho/update/misc-20210109
Update {terminal,syntax}.{txt,jax}
2 parents 99fa5b3 + abe1d26 commit ab7168b

File tree

4 files changed

+140
-52
lines changed

4 files changed

+140
-52
lines changed

doc/syntax.jax

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim バージョン 8.2. Last change: 2020 Aug 15
1+
*syntax.txt* For Vim バージョン 8.2. Last change: 2020 Dec 17
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -65,9 +65,10 @@ Vimは全ての端末で構文ハイライトをサポートしている。し
6565
場合、スクリプト|menu.vim| の読み込みも行う。これを避けるには |'go-M'| を参照。
6666

6767
*:syn-on* *:syntax-on*
68-
コマンド `:syntax enable` は現在の色設定を変更しない。そのため、このコマンドを
69-
使用する前後にコマンド `:highlight` で好みの色を設定することができる。現在の設
70-
定を破棄して、デフォルトの色を設定させたい場合は次のコマンドを使用する: >
68+
コマンド `:syntax enable` は現在の色設定のほとんどを保持する。そのため、このコ
69+
マンドを使用する前後にコマンド `:highlight` で好みの色を設定することができる。
70+
現在の設定を破棄して、デフォルトの色を設定させたい場合は次のコマンドを使用する:
71+
>
7172
:syntax on
7273
<
7374
*:hi-normal* *:highlight-normal*
@@ -2251,11 +2252,12 @@ http://papp.plan9.de
22512252

22522253
PASCAL *pascal.vim* *ft-pascal-syntax*
22532254

2254-
"*.p" にマッチするファイルのタイプはProgressかPascalである。自動判別が機能しな
2255-
いなら、またはProgressファイルを一切編集しないとわかっているなら、これをvimrc
2256-
ファイルに書くといい: >
2255+
"*.p" にマッチするファイルのタイプはProgressかPascalで、"*.pp" にマッチするファ
2256+
イルのタイプはPuppetかPascalである。自動判別が機能しない、またはPascalファイル
2257+
だけ編集するなら、これをvimrc ファイルに書くといい: >
22572258
2258-
:let filetype_p = "pascal"
2259+
:let filetype_p = "pascal"
2260+
:let filetype_pp = "pascal"
22592261
22602262
Pascal構文ファイルはTurbo Pascal, Free Pascal CompilerとGNU Pascal Compilerで
22612263
提供される拡張に対応するための拡張が施されてきた。Delphiのキーワードもサポート
@@ -2896,7 +2898,7 @@ SGMLファイル中のタグをハイライトする方法は以下のように
28962898
用した)
28972899

28982900

2899-
*ft-posix-synax* *ft-dash-syntax*
2901+
*ft-posix-syntax* *ft-dash-syntax*
29002902
SH *sh.vim* *ft-sh-syntax* *ft-bash-syntax* *ft-ksh-syntax*
29012903

29022904
これは、古い UNIX (Bourne) sh と bash や dash、POSIX、Korn シェルのような新し
@@ -3064,6 +3066,7 @@ tcsh_minlines に "fromstart" をセットすると、ファイルの先頭か
30643066

30653067

30663068
TEX *tex.vim* *ft-tex-syntax* *latex-syntax*
3069+
*syntax-tex* *syntax-latex*
30673070

30683071
Tex 目次~
30693072
Tex: 構文折り畳みをするには |tex-folding|
@@ -3080,6 +3083,7 @@ TEX *tex.vim* *ft-tex-syntax* *latex-syntax*
30803083
Tex: Conceal モードの選択 |g:tex_conceal|
30813084
Tex: iskeyword を制御する |g:tex_isk|
30823085
Tex: 下付き記号と上付き記号を制御する |tex-supersub|
3086+
Tex: 一致のチェックの制御 |tex-matchcheck|
30833087

30843088
*tex-folding* *g:tex_fold_enabled*
30853089
Tex: 構文折り畳みをするには ~
@@ -3307,6 +3311,20 @@ g:tex_conceal を <.vimrc> で設定することで Conceal モードの表示
33073311
< この設定を ~/.vim/ftplugin/tex/tex.vim に書いて、utf-8 の謎グリフが表
33083312
示されないようにしている。
33093313

3314+
*tex-matchcheck* *g:tex_matchcheck*
3315+
Tex: 一致のチェックの制御
3316+
3317+
実際には時として、かっこ、角かっこ、中かっこが一致しないことが必要な場
3318+
合があり; 例えば、\text{(1,10] は範囲の開始に1を含まず10}を含む。
3319+
この要望はもちろん、区切りの不一致を検知したいという要望と衝突する。
3320+
この衝突の調整のゴールを、syntax/tex.vim が提供する >
3321+
g:tex_matchcheck = '[({[]'
3322+
< これはデフォルトの設定に従っていることを示す。そして [] と () の不
3323+
一致をチェックさせるなら、次のようにする >
3324+
let g:tex_matchcheck= '[{}]'
3325+
< 太字やイタリック体の範囲内で一致チェックを望まないなら、 >
3326+
let g:tex_excludematcher= 1
3327+
< という設定で範囲に含まれる texMatcher グループの開始を抑制する。
33103328

33113329
TF *tf.vim* *ft-tf-syntax*
33123330

@@ -4631,6 +4649,7 @@ Note: "*/" を含む文字列で行をまたぐものがあると、Cコメン
46314649
えられたグループに対するハイライトが全て消去される。
46324650
現在の 'background' の値によってデフォルトの色が決ま
46334651
る。
4652+
デフォルトのリンクがあるなら、復元される。 |:hi-link|
46344653

46354654
:hi[ghlight] clear {group-name}
46364655
:hi[ghlight] {group-name} NONE
@@ -5105,6 +5124,11 @@ C 構文ファイルは次の行を含んでいる: >
51055124
"default" をつけないと、.vimrc より C 構文ファイルの方があとに読み込まれるた
51065125
め、.vimrc の設定を上書きしてしまう。
51075126

5127+
`:highlight clear` ではリンクが存続し、個別のファイルタイプでのハイライトがあ
5128+
りまた別のカラースキームから選択的に残したいものを維持するのに便利で、
5129+
"after/syntax/{filetype}.vim" ファイルにこのようにコマンドを置きます: >
5130+
highlight! default link cComment Question
5131+
51085132
==============================================================================
51095133
15. 構文の消去 *:syn-clear* *E391*
51105134

doc/terminal.jax

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*terminal.txt* For Vim バージョン 8.2. Last change: 2020 Jun 06
1+
*terminal.txt* For Vim バージョン 8.2. Last change: 2021 Jan 04
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -123,13 +123,15 @@ Esc を使うことができますが、他のキーが壊れないようにす
123123
|:tlmenu| を使用する必要があります。
124124

125125
*options-in-terminal*
126-
端末ウィンドウを開いて 'buftype' を "terminal" に設定すると、TerminalOpen 自動
127-
コマンドイベントが発生します。これにより、ウィンドウとバッファ専用のオプション
128-
を設定することが可能です。例: >
129-
au TerminalOpen * if &buftype == 'terminal' | setlocal bufhidden=hide | endif
130-
<<abuf> は端末バッファに設定されていますが、ウィンドウが存在しない場合(隠され
131-
た端末)は間違ったバッファにオプションが設定されるため、この例では &buftype の
132-
チェックが行われます。
126+
端末ウィンドウを開いて 'buftype' を "terminal" に設定すると、TerminalWinOpen
127+
自動コマンドイベントが発生します。これにより、端末ウィンドウとバッファ専用のオ
128+
プションを設定することが可能です。例: >
129+
au TerminalWinOpen * setlocal bufhidden=hide
130+
131+
|TerminalOpen| イベントもまた、ただし隠し端末でも発生し、そしてカレントウィン
132+
ドウとバッファは新しい端末とは限りません。
133+
端末バッファに設定するなら、<abuf> を使う必要があります。例: >
134+
au TerminalOpen * call setbufvar(+expand('<abuf>'), '&colorcolumn', 123)
133135
134136
マウスイベント (クリックやドラッグ) は端末に渡されます。マウス移動イベントは
135137
Vim 自身が受け取ったときにのみ渡されます。'balloonevalterm' が有効になっている
@@ -474,9 +476,9 @@ term_dumpdiff({filename}, {filename} [, {options}])
474476
"term_name" (1 つ目のファイル名の代わりに使用される)
475477
バッファ名
476478
"term_rows" ('termwinsize' の代わりに使用される) 端末
477-
の垂直サイズ
479+
の垂直サイズ、ただし最小サイズは尊重する
478480
"term_cols" ('termwinsize' の代わりに使用される) 端末
479-
の水平サイズ
481+
の水平サイズ、ただし最小サイズは尊重する
480482
"vertical" ウィンドウを垂直に分割する
481483
"curwin" ウィンドウを分割せず現在のウィンドウを使
482484
用する、現在のバッファが放棄 (|abandon|)
@@ -498,6 +500,10 @@ term_dumpdiff({filename}, {filename} [, {options}])
498500
a 異なる属性
499501
+ 1 つ目のファイル内に存在しない位置
500502
- 2 つ目のファイル内に存在しない位置
503+
> 2 つ目のファイルにはなく1 つ目のファイルにある
504+
現在のカーソル位置
505+
< 1 つ目のファイルにはなく2 つ目のファイルにある
506+
現在のカーソル位置
501507

502508
"s" キーを押すと、先頭部分と末尾部分が入れ替わる。これにより差
503509
分を簡単に確認することができる。
@@ -726,6 +732,9 @@ term_setapi({buf}, {expr}) *term_setapi()*
726732
デフォルトは "Tapi_" である。{expr} が空の文字列の場合、{buf}
727733
|terminal-api| 機能は使用できない。
728734

735+
|method| としても使用できる、ベースは {buf} に使用される: >
736+
GetBufnr()->term_setapi({expr})
737+
729738
term_setansicolors({buf}, {colors}) *term_setansicolors()*
730739
端末 {buf} で使用される ANSI カラーパレットを設定する。
731740
{colors} は、|highlight-guifg| で受け付けられるような、有効な
@@ -1308,7 +1317,10 @@ gdbは各ブレークポイントに番号を与えます。Vim内では、赤
13081317
*termdebug-commands*
13091318
*:Gdb* gdb ウィンドウに移動する
13101319
*:Program* デバッグ中のプログラムウィンドウに移動する
1311-
*:Source* ソースコードウィンドウにジャンプする、ウィンドウがなければ作成する
1320+
*:Source* ソースコードウィンドウにジャンプする、ウィンドウがなければ作成
1321+
する
1322+
*:Asm* 逆アセンブルウィンドウにジャンプする、ウィンドウがなければ作成す
1323+
13121324

13131325

13141326
プロンプトモード ~
@@ -1332,6 +1344,13 @@ gdbは各ブレークポイントに番号を与えます。Vim内では、赤
13321344
K は通常 :Evaluate にマッピングされています。もしそうしたくないなら: >
13331345
let g:termdebug_map_K = 0
13341346
1347+
<
1348+
*termdebug_disasm_window*
1349+
Asm ウィンドウをデフォルトで表示たいなら、この変数に1を設定する。1以上の任意の
1350+
値を設定したなら、その値が Asm ウィンドウの高さとして設定される: >
1351+
let g:termdebug_disasm_window = 15
1352+
<
1353+
13351354
通信 ~
13361355
*termdebug-communication*
13371356
Vim が gdb と通信するために他に隠されたバッファを利用します。バッファ名は "gdb
@@ -1399,13 +1418,13 @@ Vimのウィンドウ幅 *termdebug_wide*
13991418
デバッグを開始した際に Vim のウィンドウ幅を変更し、垂直分割を利用するには次の
14001419
ように設定します: >
14011420
let g:termdebug_wide = 163
1402-
これは `:Termdebug` を実行した際に &columns を 163 に設定します。元の値はデバッ
1403-
ガが終了する際に復元されます。
1404-
g:termdebug_wide が設定されていて、&columnsがすでに g:termdebug_wide より大き
1405-
い場合、&columns を変更せずに垂直分割が使用されます。
1406-
&columns を変更せずに垂直分割を行うには、1に設定します。(端末がVimによってサイ
1407-
ズ変更できない場合に便利です)
1421+
これは `:Termdebug` を実行した際に 'columns' を 163 に設定します。元の値はデ
1422+
バッガが終了する際に復元されます。
1423+
g:termdebug_wide が設定されていて、'columns' がすでに g:termdebug_wide より大
1424+
きい場合、'columns' を変更せずに垂直分割が使用されます。
14081425

1426+
'columns' を変更せずに垂直分割を行うには、1に設定します。(端末がVimによってサ
1427+
イズ変更できない場合に便利です)
14091428

14101429

14111430
vim:tw=78:ts=8:noet:ft=help:norl:

en/syntax.txt

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim version 8.2. Last change: 2020 Aug 15
1+
*syntax.txt* For Vim version 8.2. Last change: 2020 Dec 17
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -66,8 +66,8 @@ This command also sources the |menu.vim| script when the GUI is running or
6666
will start soon. See |'go-M'| about avoiding that.
6767

6868
*:syn-on* *:syntax-on*
69-
The `:syntax enable` command will keep your current color settings. This
70-
allows using `:highlight` commands to set your preferred colors before or
69+
The `:syntax enable` command will keep most of your current color settings.
70+
This allows using `:highlight` commands to set your preferred colors before or
7171
after using this command. If you want Vim to overrule your settings with the
7272
defaults, use: >
7373
:syntax on
@@ -2335,11 +2335,12 @@ http://papp.plan9.de.
23352335

23362336
PASCAL *pascal.vim* *ft-pascal-syntax*
23372337

2338-
Files matching "*.p" could be Progress or Pascal. If the automatic detection
2339-
doesn't work for you, or you don't edit Progress at all, use this in your
2340-
startup vimrc: >
2338+
Files matching "*.p" could be Progress or Pascal and those matching "*.pp"
2339+
could be Puppet or Pascal. If the automatic detection doesn't work for you,
2340+
or you only edit Pascal files, use this in your startup vimrc: >
23412341
2342-
:let filetype_p = "pascal"
2342+
:let filetype_p = "pascal"
2343+
:let filetype_pp = "pascal"
23432344
23442345
The Pascal syntax file has been extended to take into account some extensions
23452346
provided by Turbo Pascal, Free Pascal Compiler and GNU Pascal Compiler.
@@ -3006,7 +3007,7 @@ vimrc file: >
30063007
(Adapted from the html.vim help text by Claudio Fleiner <[email protected]>)
30073008

30083009

3009-
*ft-posix-synax* *ft-dash-syntax*
3010+
*ft-posix-syntax* *ft-dash-syntax*
30103011
SH *sh.vim* *ft-sh-syntax* *ft-bash-syntax* *ft-ksh-syntax*
30113012

30123013
This covers syntax highlighting for the older Unix (Bourne) sh, and newer
@@ -3183,6 +3184,7 @@ redrawing can become slow.
31833184

31843185

31853186
TEX *tex.vim* *ft-tex-syntax* *latex-syntax*
3187+
*syntax-tex* *syntax-latex*
31863188

31873189
Tex Contents~
31883190
Tex: Want Syntax Folding? |tex-folding|
@@ -3199,6 +3201,7 @@ TEX *tex.vim* *ft-tex-syntax* *latex-syntax*
31993201
Tex: Selective Conceal Mode |g:tex_conceal|
32003202
Tex: Controlling iskeyword |g:tex_isk|
32013203
Tex: Fine Subscript and Superscript Control |tex-supersub|
3204+
Tex: Match Check Control |tex-matchcheck|
32023205

32033206
*tex-folding* *g:tex_fold_enabled*
32043207
Tex: Want Syntax Folding? ~
@@ -3422,6 +3425,22 @@ syntax highlighting script handles this with the following logic:
34223425
< in ~/.vim/ftplugin/tex/tex.vim in order to avoid having inscrutable
34233426
utf-8 glyphs appear.
34243427

3428+
*tex-matchcheck* *g:tex_matchcheck*
3429+
Tex: Match Check Control~
3430+
3431+
Sometimes one actually wants mismatched parentheses, square braces,
3432+
and or curly braces; for example, \text{(1,10] is a range from but
3433+
not including 1 to and including 10}. This wish, of course, conflicts
3434+
with the desire to provide delimiter mismatch detection. To
3435+
accommodate these conflicting goals, syntax/tex.vim provides >
3436+
g:tex_matchcheck = '[({[]'
3437+
< which is shown along with its default setting. So, if one doesn't
3438+
want [] and () to be checked for mismatches, try using >
3439+
let g:tex_matchcheck= '[{}]'
3440+
< If you don't want matching to occur inside bold and italicized
3441+
regions, >
3442+
let g:tex_excludematcher= 1
3443+
< will prevent the texMatcher group from being included in those regions.
34253444

34263445
TF *tf.vim* *ft-tf-syntax*
34273446

@@ -4809,6 +4828,7 @@ in their own color.
48094828
highlighting for groups added by the user!
48104829
Uses the current value of 'background' to decide which
48114830
default colors to use.
4831+
If there was a default link, restore it. |:hi-link|
48124832

48134833
:hi[ghlight] clear {group-name}
48144834
:hi[ghlight] {group-name} NONE
@@ -5304,6 +5324,12 @@ If you like Question highlighting for C comments, put this in your vimrc file: >
53045324
Without the "default" in the C syntax file, the highlighting would be
53055325
overruled when the syntax file is loaded.
53065326

5327+
To have a link survive `:highlight clear`, which is useful if you have
5328+
highlighting for a specific filetype and you want to keep it when selecting
5329+
another color scheme, put a command like this in the
5330+
"after/syntax/{filetype}.vim" file: >
5331+
highlight! default link cComment Question
5332+
53075333
==============================================================================
53085334
15. Cleaning up *:syn-clear* *E391*
53095335

0 commit comments

Comments
 (0)