Skip to content

Commit c7ca97f

Browse files
authored
Merge pull request #1088 from tsuyoshicho/update/20220424/terminal
Update terminal.{txt,jax}
2 parents 6eb7a11 + 4e125e1 commit c7ca97f

File tree

2 files changed

+104
-34
lines changed

2 files changed

+104
-34
lines changed

doc/terminal.jax

Lines changed: 55 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*terminal.txt* For Vim バージョン 8.2. Last change: 2022 Apr 06
1+
*terminal.txt* For Vim バージョン 8.2. Last change: 2022 Jun 09
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -101,7 +101,7 @@ CTRL-W の代わりに別のキーを使うにはオプション 'termwinkey'
101101
他のモードと同じように、ノーマルモードへ移行するための特別なキーの組み合わせで
102102
ある CTRL-\ CTRL-N が利用できます。
103103
*t_CTRL-W_CTRL-C*
104-
ジョブを強制停止するのに CTRL-W CTRL-C を使えます。MS-Windowsでは CTRL-BREAK
104+
ジョブを強制停止するのに CTRL-W CTRL-C を使えます。MS-Windowsでは CTRL-Break
105105
でも同様にジョブを停止できます。
106106

107107
CTRL-C を入力した場合、その効果は pty がどのように構成されているかに従います。
@@ -1272,6 +1272,8 @@ gdb ウィンドウにフォーカスを移しコマンドを入力します。
12721272
- CTRL-C プログラムを中断する
12731273
- next 現在の行を実行し、次の行(の手前)で停止する
12741274
- step 現在の行を実行し、次の文(の手前)で停止する。関数の内側に入る
1275+
- until 現在の行を通過する、または指定位置を通過する、または現在のス
1276+
タックフレームに戻るまで実行する
12751277
- finish 現在の関数を抜けるまで実行する
12761278
- where スタックを表示する
12771279
- frame N N 番目のスタックフレームに移動する
@@ -1288,6 +1290,7 @@ gdb ウィンドウにフォーカスを移しコマンドを入力します。
12881290
*:Step* gdb の "step" コマンドを実行する
12891291
*:Over* gdb の "next" コマンドを実行する
12901292
(`:Next` だと Vim のコマンドとかぶるので)
1293+
*:Until* gdb の "until" コマンドを実行する
12911294
*:Finish* gdb の "finish" コマンドを実行する
12921295
*:Continue* gdb の "continue" コマンドを実行する
12931296
*:Stop* プログラムを中断する
@@ -1349,9 +1352,8 @@ gdbは各ブレークポイントに番号を与えます。Vim内では、赤
13491352
<
13501353
*TermdebugStartPre*
13511354
TermdebugStartPre デバッグ開始前。
1352-
すでにデバッガが開始しているもしくは
1353-
|g:termdebugger| が実行できない場合は発行され
1354-
ない。
1355+
すでにデバッガが開始しているもしくはデバッガコ
1356+
マンドが実行できない場合は発行されない。
13551357
*TermdebugStartPost*
13561358
TermdebugStartPost デバッグの初期化後。
13571359
`:Termdebug` あるいは `:TermdebugCommand` 経由
@@ -1382,18 +1384,25 @@ TermdebugStopPost デバッグの終了後、gdb 関連ウィンドウが閉じ
13821384

13831385
*termdebug_use_prompt*
13841386
プロンプトモードは、|+terminal| 機能が有効な場合でも使用できます: >
1387+
let g:termdebug_config['use_prompt'] = 1
1388+
または、g:termdebug_config がない場合: >
13851389
let g:termdebug_use_prompt = 1
13861390
<
13871391
*termdebug_map_K*
1388-
K は通常 :Evaluate にマッピングされています。もしそうしたくないなら: >
1392+
K は通常 :Evaluate にマッピングされています。これが不要な場合は: >
1393+
let g:termdebug_config['map_K'] = 0
1394+
または、g:termdebug_config がない場合: >
13891395
let g:termdebug_map_K = 0
13901396
13911397
<
13921398
*termdebug_disasm_window*
1393-
Asm ウィンドウをデフォルトで表示たいなら、この変数に1を設定する。1以上の任意の
1394-
値を設定したなら、その値が Asm ウィンドウの高さとして設定される: >
1399+
Asm ウィンドウをデフォルトで表示させたい場合、このフラグに1を設定します。
1400+
"disasm_window_height" エントリを使用してウィンドウの高さを設定できます: >
1401+
let g:termdebug_config['disasm_window'] = 1
1402+
let g:termdebug_config['disasm_window_height'] = 15
1403+
または、g:termdebug_config がない場合: >
13951404
let g:termdebug_disasm_window = 15
1396-
<
1405+
1以上の任意の値を設定でき、その値が Asm ウィンドウの高さになります。
13971406

13981407
通信 ~
13991408
*termdebug-communication*
@@ -1410,23 +1419,44 @@ gdb は奇妙な動作をしていますが、プラグインはその問題を
14101419

14111420

14121421
カスタマイズ ~
1422+
*termdebug-customizing* *g:termdebug_config*
1423+
以前はいくつかのグローバル変数を設定に使用していました。これらは非推奨になり、
1424+
辞書 g:termdebug_config の使用が推奨されます。g:termdebug_config が存在する時
1425+
は他のグローバル変数は使用されません。
1426+
14131427

1414-
GDBコマンド *termdebug-customizing*
1428+
GDBコマンド ~
14151429
*g:termdebugger*
1416-
gdb コマンド以外のデバッガを使うには、 `:Termdebug` を実行する前に
1417-
"g:termdebugger" 変数を変更してください: >
1430+
gdb コマンド以外のデバッガを使うには、`:Termdebug` を実行する前に
1431+
g:termdebug_config の "debugger" エントリか "g:termdebugger" 変数を変更してく
1432+
ださい: >
1433+
let g:termdebug_config['command'] = "mygdb"
1434+
または、g:termdebug_config がない場合: >
14181435
let g:termdebugger = "mygdb"
1436+
14191437
コマンドに引数が必要な場合はリストを使用してください: >
1438+
let g:termdebug_config['command'] = ['rr', 'replay', '--']
1439+
または、g:termdebug_config がない場合: >
14201440
let g:termdebugger = ['rr', 'replay', '--']
1421-
< *gdb-version*
1441+
1442+
gdb がデバッガで適切に動作するように、いくつかの引数が追加されます。それらを変
1443+
更したい場合は、引数リストをフィルタリングする関数を追加します: >
1444+
let g:termdebug_config['command_filter'] = MyDebugFilter
1445+
1446+
引数を追加したくないが、"pty" を設定する必要がある場合は、関数を使用して必要な
1447+
引数を追加します: >
1448+
let g:termdebug_config['command_add_args'] = MyAddArguments
1449+
この関数はいままでの引数のリストと、ptyの名前である2番目の引数とともに呼ばれま
1450+
す。
1451+
*gdb-version*
14221452
gdb と完全互換のあるデバッガのみが使えます。Vim は gdb の操作に GDB/MI インター
14231453
フェイスを利用しています。 "new-ui" コマンドには、gdbバージョン7.12以降が必要
14241454
です。このエラーが発生した場合: >
14251455
Undefined command: "new-ui". Try "help".~
14261456
あなたの gdb が古すぎます。
14271457

1428-
カラー *hl-debugPC* *hl-debugBreakpoint*
1429-
1458+
カラー ~
1459+
*hl-debugPC* *hl-debugBreakpoint*
14301460
サインの色は以下のハイライトグループで調整できます:
14311461
- debugPC 現在の位置
14321462
- debugBreakpoint ブレークポイント
@@ -1456,21 +1486,27 @@ TermDebugSendCommand() 関数を使用して、任意のウィンドウで動作
14561486
Clear breakpoint `:Clear`
14571487
Evaluate `:Evaluate`
14581488
あなたがこれを望まないならば、それを無効にしてください: >
1489+
let g:termdebug_config['popup'] = 0
1490+
または、g:termdebug_config がない場合: >
14591491
let g:termdebug_popup = 0
14601492
14611493
14621494
Vimのウィンドウ幅 *termdebug_wide*
14631495

14641496
デバッグを開始した際に Vim のウィンドウ幅を変更し、垂直分割を利用するには次の
14651497
ように設定します: >
1498+
let g:termdebug_config['wide'] = 163
1499+
または、g:termdebug_config がない場合: >
14661500
let g:termdebug_wide = 163
1501+
14671502
これは `:Termdebug` を実行した際に 'columns' を 163 に設定します。元の値はデ
14681503
バッガが終了する際に復元されます。
1469-
g:termdebug_wide が設定されていて、'columns' がすでに g:termdebug_wide より大
1470-
きい場合、'columns' を変更せずに垂直分割が使用されます。
14711504

1472-
'columns' を変更せずに垂直分割を行うには、1に設定します。(端末がVimによってサ
1473-
イズ変更できない場合に便利です)
1505+
幅の値が設定されていて、'columns' がすでに幅の値より大きい場合、'columns' を変
1506+
更せずに垂直分割が使用されます。
1507+
1508+
幅の値を1に設定することで 'columns' の変更なしに垂直分割が使えます。これは端末
1509+
がVimによってサイズ変更できない場合に便利です。
14741510

14751511

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

en/terminal.txt

Lines changed: 49 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*terminal.txt* For Vim version 8.2. Last change: 2022 Apr 06
1+
*terminal.txt* For Vim version 8.2. Last change: 2022 Jun 09
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -101,7 +101,7 @@ The special key combination CTRL-\ CTRL-N can be used to switch to Normal
101101
mode, just like this works in any other mode.
102102
*t_CTRL-W_CTRL-C*
103103
CTRL-W CTRL-C can be typed to forcefully end the job. On MS-Windows a
104-
CTRL-BREAK will also kill the job.
104+
CTRL-Break will also kill the job.
105105

106106
If you type CTRL-C the effect depends on what the pty has been configured to
107107
do. For simple commands this causes a SIGINT to be sent to the job, which
@@ -1285,6 +1285,8 @@ Put focus on the gdb window to type commands there. Some common ones are:
12851285
- next execute the current line and stop at the next line
12861286
- step execute the current line and stop at the next statement,
12871287
entering functions
1288+
- until execute until past the current cursor line or past a specified
1289+
position or the current stack frame returns
12881290
- finish execute until leaving the current function
12891291
- where show the stack
12901292
- frame N go to the Nth stack frame
@@ -1303,6 +1305,7 @@ gdb:
13031305

13041306
*:Step* execute the gdb "step" command
13051307
*:Over* execute the gdb "next" command (`:Next` is a Vim command)
1308+
*:Until* execute the gdb "until" command
13061309
*:Finish* execute the gdb "finish" command
13071310
*:Continue* execute the gdb "continue" command
13081311
*:Stop* interrupt the program
@@ -1364,7 +1367,7 @@ Four autocommands can be used: >
13641367
*TermdebugStartPre*
13651368
TermdebugStartPre Before starting debugging.
13661369
Not triggered if the debugger is already
1367-
running or |g:termdebugger| cannot be
1370+
running or the debugger command cannot be
13681371
executed.
13691372
*TermdebugStartPost*
13701373
TermdebugStartPost After debugging has initialized.
@@ -1395,18 +1398,24 @@ in a buffer with 'buftype' set to "prompt". This works slightly differently:
13951398

13961399
*termdebug_use_prompt*
13971400
Prompt mode can be used even when the |+terminal| feature is present with: >
1401+
let g:termdebug_config['use_prompt'] = 1
1402+
Or if there is no g:termdebug_config: >
13981403
let g:termdebug_use_prompt = 1
13991404
<
14001405
*termdebug_map_K*
14011406
The K key is normally mapped to :Evaluate. If you do not want this use: >
1407+
let g:termdebug_config['map_K'] = 0
1408+
Or if there is no g:termdebug_config: >
14021409
let g:termdebug_map_K = 0
1403-
14041410
<
14051411
*termdebug_disasm_window*
1406-
If you want the Asm window shown by default, set this to 1. Setting to
1407-
any value greater than 1 will set the Asm window height to that value: >
1412+
If you want the Asm window shown by default, set the flag to 1.
1413+
the "disasm_window_height" entry can be used to set the window height: >
1414+
let g:termdebug_config['disasm_window'] = 1
1415+
let g:termdebug_config['disasm_window_height'] = 15
1416+
or, if there is no g:termdebug_config: >
14081417
let g:termdebug_disasm_window = 15
1409-
<
1418+
Any value greater than 1 will set the Asm window height to that value: >
14101419
14111420
Communication ~
14121421
*termdebug-communication*
@@ -1423,24 +1432,45 @@ communication channel.
14231432

14241433

14251434
Customizing ~
1435+
*termdebug-customizing* *g:termdebug_config*
1436+
In the past several global variables were used for configuration. These are
1437+
deprecated, using the g:termdebug_config dictionary is preferred. When
1438+
g:termdebug_config exists the other global variables will not be used.
14261439

1427-
GDB command *termdebug-customizing*
1440+
1441+
GDB command ~
14281442
*g:termdebugger*
1429-
To change the name of the gdb command, set the "g:termdebugger" variable before
1430-
invoking `:Termdebug`: >
1443+
To change the name of the gdb command, set "debugger" entry in
1444+
g:termdebug_config or the "g:termdebugger" variable before invoking
1445+
`:Termdebug`: >
1446+
let g:termdebug_config['command'] = "mygdb"
1447+
Or if there is no g:termdebug_config: >
14311448
let g:termdebugger = "mygdb"
1449+
14321450
If the command needs an argument use a List: >
1451+
let g:termdebug_config['command'] = ['rr', 'replay', '--']
1452+
Or if there is no g:termdebug_config: >
14331453
let g:termdebugger = ['rr', 'replay', '--']
1434-
< *gdb-version*
1454+
1455+
Several arguments will be added to make gdb work well for the debugger.
1456+
If you want to modify them, add a function to filter the argument list: >
1457+
let g:termdebug_config['command_filter'] = MyDebugFilter
1458+
1459+
If you do not want the arguments to be added, but you do need to set the
1460+
"pty", use a function to add the necessary arguments: >
1461+
let g:termdebug_config['command_add_args'] = MyAddArguments
1462+
The function will be called with the list of arguments so far, and a second
1463+
argument that is the name of the pty.
1464+
*gdb-version*
14351465
Only debuggers fully compatible with gdb will work. Vim uses the GDB/MI
14361466
interface. The "new-ui" command requires gdb version 7.12 or later. if you
14371467
get this error:
14381468
Undefined command: "new-ui". Try "help".~
14391469
Then your gdb is too old.
14401470

14411471

1442-
Colors *hl-debugPC* *hl-debugBreakpoint*
1443-
1472+
Colors~
1473+
*hl-debugPC* *hl-debugBreakpoint*
14441474
The color of the signs can be adjusted with these highlight groups:
14451475
- debugPC the current position
14461476
- debugBreakpoint a breakpoint
@@ -1470,22 +1500,26 @@ these entries to the popup menu:
14701500
Clear breakpoint `:Clear`
14711501
Evaluate `:Evaluate`
14721502
If you don't want this then disable it with: >
1503+
let g:termdebug_config['popup'] = 0
1504+
or if there is no g:termdebug_config: >
14731505
let g:termdebug_popup = 0
14741506
14751507
14761508
Vim window width *termdebug_wide*
14771509

14781510
To change the width of the Vim window when debugging starts and use a vertical
14791511
split: >
1512+
let g:termdebug_config['wide'] = 163
1513+
Or if there is no g:termdebug_config: >
14801514
let g:termdebug_wide = 163
14811515
14821516
This will set 'columns' to 163 when `:Termdebug` is used. The value is
14831517
restored when quitting the debugger.
14841518

1485-
If g:termdebug_wide is set and 'columns' is already a greater value, then a
1519+
If the wide value is set and 'columns' is already a greater value, then a
14861520
vertical split will be used without modifying 'columns'.
14871521

1488-
Set g:termdebug_wide to 1 to use a vertical split without ever changing
1522+
Set the wide value to 1 to use a vertical split without ever changing
14891523
'columns'. This is useful when the terminal can't be resized by Vim.
14901524

14911525

0 commit comments

Comments
 (0)