1- *terminal.txt* For Vim version 9.0. Last change: 2022 Oct 10
1+ *terminal.txt* For Vim version 9.0. Last change: 2022 Nov 10
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -469,7 +469,6 @@ ConPTY problems have been fixed "winpty" will be preferred.
469469Environment variables are used to pass information to the running job:
470470 VIM_SERVERNAME v:servername
471471
472-
473472==============================================================================
4744732. Terminal functions *terminal-function-details*
475474
@@ -1129,7 +1128,6 @@ reference: >
11291128
11301129Creating a screen dump ~
11311130 *terminal-screendump*
1132-
11331131To create the screen dump, run Vim (or any other program) in a terminal and
11341132make it show the desired state. Then use the | term_dumpwrite() | function to
11351133create a screen dump file. For example: >
@@ -1153,7 +1151,6 @@ If there are differences then v:errors will contain the error message.
11531151
11541152Comparing screen dumps ~
11551153 *terminal-diffscreendump*
1156-
11571154| assert_equalfile() | does not make it easy to see what is different.
11581155To spot the problem use | term_dumpdiff() | : >
11591156 call term_dumpdiff("mysyntax.dump", "test.dump")
@@ -1350,6 +1347,7 @@ If 'mouse' is set the plugin adds a window toolbar with these entries:
13501347 Eval `:Evaluate `
13511348This way you can use the mouse to perform the most common commands. You need
13521349to have the 'mouse' option set to enable mouse clicks.
1350+ See | termdebug_winbar | for configuring this toolbar.
13531351 *:Winbar*
13541352You can add the window toolbar in other windows you open with: >
13551353 :Winbar
@@ -1415,6 +1413,20 @@ TermdebugStopPost After debugging has ended, gdb-related windows
14151413 the state before the debugging was restored.
14161414
14171415
1416+ Customizing ~
1417+ *termdebug-customizing* *g:termdebug_config*
1418+ In the past several global variables were used for configuration. These are
1419+ deprecated and using the g:termdebug_config dictionary is preferred. When
1420+ g:termdebug_config exists the other global variables will NOT be used.
1421+ The recommended way is to start with an empty dictionary: >
1422+ let g:termdebug_config = {}
1423+
1424+ Then you can add entries to the dictionary as mentioned below. The
1425+ deprecated global variable names are mentioned for completeness. If you are
1426+ switching over to using g:termdebug_config you can find the old variable name
1427+ and take over the value, then delete the deprecated variable.
1428+
1429+
14181430Prompt mode ~
14191431 *termdebug-prompt*
14201432When the | +terminal | feature is not supported and on MS-Windows, gdb will run
@@ -1430,21 +1442,21 @@ in a buffer with 'buftype' set to "prompt". This works slightly differently:
14301442 *termdebug_use_prompt*
14311443Prompt mode can be used even when the | +terminal | feature is present with: >
14321444 let g:termdebug_config['use_prompt'] = 1
1433- Or if there is no g:termdebug_config: >
1445+ If there is no g:termdebug_config you can use : >
14341446 let g:termdebug_use_prompt = 1
14351447<
14361448 *termdebug_map_K*
14371449The K key is normally mapped to :Evaluate. If you do not want this use: >
14381450 let g:termdebug_config['map_K'] = 0
1439- Or if there is no g:termdebug_config: >
1451+ If there is no g:termdebug_config you can use : >
14401452 let g:termdebug_map_K = 0
14411453<
14421454 *termdebug_disasm_window*
14431455If you want the Asm window shown by default, set the flag to 1.
14441456the "disasm_window_height" entry can be used to set the window height: >
14451457 let g:termdebug_config['disasm_window'] = 1
14461458 let g:termdebug_config['disasm_window_height'] = 15
1447- or, if there is no g:termdebug_config: >
1459+ If there is no g:termdebug_config you can use : >
14481460 let g:termdebug_disasm_window = 15
14491461 Any value greater than 1 will set the Asm window height to that value.
14501462
@@ -1462,25 +1474,18 @@ interrupt the running program. But after using the MI command
14621474communication channel.
14631475
14641476
1465- Customizing ~
1466- *termdebug-customizing* *g:termdebug_config*
1467- In the past several global variables were used for configuration. These are
1468- deprecated, using the g:termdebug_config dictionary is preferred. When
1469- g:termdebug_config exists the other global variables will not be used.
1470-
1471-
14721477GDB command ~
14731478 *g:termdebugger*
14741479To change the name of the gdb command, set "debugger" entry in
14751480g:termdebug_config or the "g:termdebugger" variable before invoking
14761481`:Termdebug ` : >
14771482 let g:termdebug_config['command'] = "mygdb"
1478- Or if there is no g:termdebug_config: >
1483+ If there is no g:termdebug_config you can use : >
14791484 let g:termdebugger = "mygdb"
14801485
14811486 If the command needs an argument use a List: >
14821487 let g:termdebug_config['command'] = ['rr', 'replay', '--']
1483- Or if there is no g:termdebug_config: >
1488+ If there is no g:termdebug_config you can use : >
14841489 let g:termdebugger = ['rr', 'replay', '--']
14851490
14861491 Several arguments will be added to make gdb work well for the debugger.
@@ -1501,7 +1506,7 @@ Then your gdb is too old.
15011506
15021507
15031508Colors ~
1504- *hl-debugPC* *hl-debugBreakpoint*
1509+ *hl-debugPC* *hl-debugBreakpoint*
15051510The color of the signs can be adjusted with these highlight groups:
15061511- debugPC the current position
15071512- debugBreakpoint a breakpoint
@@ -1517,7 +1522,6 @@ When 'background' is "dark":
15171522
15181523Shortcuts ~
15191524 *termdebug_shortcuts*
1520-
15211525You can define your own shortcuts (mappings) to control gdb, that can work in
15221526any window, using the TermDebugSendCommand() function. Example: >
15231527 map ,w :call TermDebugSendCommand('where')<CR>
@@ -1526,25 +1530,30 @@ The argument is the gdb command.
15261530
15271531Popup menu ~
15281532 *termdebug_popup*
1529-
15301533By default the Termdebug plugin sets 'mousemodel' to "popup_setpos" and adds
15311534these entries to the popup menu:
15321535 Set breakpoint `:Break `
15331536 Clear breakpoint `:Clear `
15341537 Evaluate `:Evaluate `
15351538If you don't want this then disable it with: >
15361539 let g:termdebug_config['popup'] = 0
1537- or if there is no g:termdebug_config: >
1540+ If there is no g:termdebug_config you can use : >
15381541 let g:termdebug_popup = 0
15391542
15401543
1544+ Window toolbar ~
1545+ *termdebug_winbar*
1546+ By default the Termdebug plugin creates a window toolbar if the mouse is
1547+ enabled (see | :Winbar | ). If you don't want this then disable it with: >
1548+ let g:termdebug_config['winbar'] = 0
1549+
1550+
15411551Vim window width ~
15421552 *termdebug_wide*
1543-
15441553To change the width of the Vim window when debugging starts and use a vertical
15451554split: >
15461555 let g:termdebug_config['wide'] = 163
1547- Or if there is no g:termdebug_config: >
1556+ If there is no g:termdebug_config you can use : >
15481557 let g:termdebug_wide = 163
15491558
15501559 This will set 'columns' to 163 when `:Termdebug ` is used. The value is
0 commit comments