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
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -101,7 +101,7 @@ The special key combination CTRL-\ CTRL-N can be used to switch to Normal
101
101
mode, just like this works in any other mode.
102
102
*t_CTRL-W_CTRL-C*
103
103
CTRL-W CTRL-C can be typed to forcefully end the job. On MS-Windows a
104
- CTRL-B REAK will also kill the job.
104
+ CTRL-B reak will also kill the job.
105
105
106
106
If you type CTRL-C the effect depends on what the pty has been configured to
107
107
do. For simple commands this causes a SIGINT to be sent to the job, which
@@ -1367,7 +1367,7 @@ Four autocommands can be used: >
1367
1367
*TermdebugStartPre*
1368
1368
TermdebugStartPre Before starting debugging.
1369
1369
Not triggered if the debugger is already
1370
- running or | g:termdebugger | cannot be
1370
+ running or the debugger command cannot be
1371
1371
executed.
1372
1372
*TermdebugStartPost*
1373
1373
TermdebugStartPost After debugging has initialized.
@@ -1398,18 +1398,24 @@ in a buffer with 'buftype' set to "prompt". This works slightly differently:
1398
1398
1399
1399
*termdebug_use_prompt*
1400
1400
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: >
1401
1403
let g:termdebug_use_prompt = 1
1402
1404
<
1403
1405
*termdebug_map_K*
1404
1406
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: >
1405
1409
let g:termdebug_map_K = 0
1406
-
1407
1410
<
1408
1411
*termdebug_disasm_window*
1409
- If you want the Asm window shown by default, set this to 1. Setting to
1410
- 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: >
1411
1417
let g:termdebug_disasm_window = 15
1412
- <
1418
+ Any value greater than 1 will set the Asm window height to that value: >
1413
1419
1414
1420
Communication ~
1415
1421
*termdebug-communication*
@@ -1426,24 +1432,45 @@ communication channel.
1426
1432
1427
1433
1428
1434
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.
1429
1439
1430
- GDB command *termdebug-customizing*
1440
+
1441
+ GDB command ~
1431
1442
*g:termdebugger*
1432
- To change the name of the gdb command, set the "g:termdebugger" variable before
1433
- 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: >
1434
1448
let g:termdebugger = "mygdb"
1449
+
1435
1450
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: >
1436
1453
let g:termdebugger = ['rr', 'replay', '--']
1437
- < *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*
1438
1465
Only debuggers fully compatible with gdb will work. Vim uses the GDB/MI
1439
1466
interface. The "new-ui" command requires gdb version 7.12 or later. if you
1440
1467
get this error:
1441
1468
Undefined command: "new-ui". Try "help".~
1442
1469
Then your gdb is too old.
1443
1470
1444
1471
1445
- Colors *hl-debugPC* *hl-debugBreakpoint*
1446
-
1472
+ Colors~
1473
+ *hl-debugPC* *hl-debugBreakpoint*
1447
1474
The color of the signs can be adjusted with these highlight groups:
1448
1475
- debugPC the current position
1449
1476
- debugBreakpoint a breakpoint
@@ -1473,22 +1500,26 @@ these entries to the popup menu:
1473
1500
Clear breakpoint `:Clear `
1474
1501
Evaluate `:Evaluate `
1475
1502
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: >
1476
1505
let g:termdebug_popup = 0
1477
1506
1478
1507
1479
1508
Vim window width *termdebug_wide*
1480
1509
1481
1510
To change the width of the Vim window when debugging starts and use a vertical
1482
1511
split: >
1512
+ let g:termdebug_config['wide'] = 163
1513
+ Or if there is no g:termdebug_config: >
1483
1514
let g:termdebug_wide = 163
1484
1515
1485
1516
This will set 'columns' to 163 when `:Termdebug ` is used. The value is
1486
1517
restored when quitting the debugger.
1487
1518
1488
- 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
1489
1520
vertical split will be used without modifying 'columns' .
1490
1521
1491
- 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
1492
1523
'columns' . This is useful when the terminal can't be resized by Vim.
1493
1524
1494
1525
0 commit comments