Skip to content

Commit 678963c

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents cf915c8 + dcdeaaf commit 678963c

27 files changed

Lines changed: 795 additions & 182 deletions

runtime/doc/eval.txt

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2297,8 +2297,9 @@ pow({x}, {y}) Float {x} to the power of {y}
22972297
prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
22982298
printf({fmt}, {expr1}...) String format text
22992299
prompt_addtext({buf}, {expr}) none add text to a prompt buffer
2300-
prompt_setprompt({buf}, {text}) none set prompt text
23012300
prompt_setcallback({buf}, {expr}) none set prompt callback function
2301+
prompt_setinterrupt({buf}, {text}) none set prompt interrupt function
2302+
prompt_setprompt({buf}, {text}) none set prompt text
23022303
pumvisible() Number whether popup menu is visible
23032304
pyeval({expr}) any evaluate |Python| expression
23042305
py3eval({expr}) any evaluate |python3| expression
@@ -6506,17 +6507,11 @@ printf({fmt}, {expr1} ...) *printf()*
65066507
arguments an error is given. Up to 18 arguments can be used.
65076508

65086509

6509-
prompt_setprompt({buf}, {text}) *prompt_setprompt()*
6510-
Set prompt for buffer {buf} to {text}. You most likely want
6511-
{text} to end in a space.
6512-
The result is only visible if {buf} has 'buftype' set to
6513-
"prompt". Example: >
6514-
call prompt_setprompt(bufnr(''), 'command: ')
6515-
6516-
65176510
prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
6518-
Set prompt callback for buffer {buf} to {expr}. This has only
6511+
Set prompt callback for buffer {buf} to {expr}. When {expr}
6512+
is an empty string the callback is removed. This has only
65196513
effect if {buf} has 'buftype' set to "prompt".
6514+
65206515
The callback is invoked when pressing Enter. The current
65216516
buffer will always be the prompt buffer. A new line for a
65226517
prompt is added before invoking the callback, thus the prompt
@@ -6541,6 +6536,22 @@ prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
65416536
endif
65426537
endfunc
65436538
6539+
prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
6540+
Set a callback for buffer {buf} to {expr}. When {expr} is an
6541+
empty string the callback is removed. This has only effect if
6542+
{buf} has 'buftype' set to "prompt".
6543+
6544+
This callback will be invoked when pressing CTRL-C in Insert
6545+
mode. Without setting a callback Vim will exit Insert mode,
6546+
as in any buffer.
6547+
6548+
prompt_setprompt({buf}, {text}) *prompt_setprompt()*
6549+
Set prompt for buffer {buf} to {text}. You most likely want
6550+
{text} to end in a space.
6551+
The result is only visible if {buf} has 'buftype' set to
6552+
"prompt". Example: >
6553+
call prompt_setprompt(bufnr(''), 'command: ')
6554+
65446555
65456556
pumvisible() *pumvisible()*
65466557
Returns non-zero when the popup menu is visible, zero
@@ -8563,7 +8574,9 @@ term_start({cmd}, {options}) *term_start()*
85638574
instead of using 'termwinsize'
85648575
"term_cols" horizontal size to use for the terminal,
85658576
instead of using 'termwinsize'
8566-
"vertical" split the window vertically
8577+
"vertical" split the window vertically; note that
8578+
other window position can be defined with
8579+
command modifiers, such as |:belowright|.
85678580
"curwin" use the current window, do not split the
85688581
window; fails if the current buffer
85698582
cannot be |abandon|ed
@@ -9396,11 +9409,12 @@ vtp Compiled for vcon support |+vtp| (check vcon to find
93969409
out if it works in the current console).
93979410
wildignore Compiled with 'wildignore' option.
93989411
wildmenu Compiled with 'wildmenu' option.
9412+
win16 old version for MS-Windows 3.1 (always False)
93999413
win32 Win32 version of Vim (MS-Windows 95 and later, 32 or
94009414
64 bits)
94019415
win32unix Win32 version of Vim, using Unix files (Cygwin)
94029416
win64 Win64 version of Vim (MS-Windows 64 bit).
9403-
win95 Win32 version for MS-Windows 95/98/ME.
9417+
win95 Win32 version for MS-Windows 95/98/ME (always False)
94049418
winaltkeys Compiled with 'winaltkeys' option.
94059419
windows Compiled with support for more than one window.
94069420
writebackup Compiled with 'writebackup' default on.

runtime/doc/terminal.txt

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ If the result is "1" you have it.
3838
Stepping through code |termdebug-stepping|
3939
Inspecting variables |termdebug-variables|
4040
Other commands |termdebug-commands|
41+
Prompt mode |termdebug-prompt|
4142
Communication |termdebug-communication|
4243
Customizing |termdebug-customizing|
4344

@@ -86,7 +87,8 @@ to the job. For example:
8687
'termwinkey' CTRL-W move focus to the next window
8788
'termwinkey' : enter an Ex command
8889
'termwinkey' 'termwinkey' send 'termwinkey' to the job in the terminal
89-
'termwinkey' . send a CTRL-W to the job in the terminal
90+
'termwinkey' . send 'termwinkey' to the job in the terminal
91+
'termwinkey' CTRL-\ send a CTRL-\ to the job in the terminal
9092
'termwinkey' N go to terminal Normal mode, see below
9193
'termwinkey' CTRL-N same as CTRL-W N
9294
'termwinkey' CTRL-C same as |t_CTRL-W_CTRL-C|
@@ -620,6 +622,10 @@ The Terminal debugging plugin can be used to debug a program with gdb and view
620622
the source code in a Vim window. Since this is completely contained inside
621623
Vim this also works remotely over an ssh connection.
622624

625+
When the |+terminal| feature is missing, the plugin will use the "prompt"
626+
buffer type, if possible. The running program will then use a newly opened
627+
terminal window. See |termdebug-prompt| below for details.
628+
623629

624630
Starting ~
625631
*termdebug-starting*
@@ -799,6 +805,23 @@ Other commands ~
799805
isn't one
800806

801807

808+
Prompt mode ~
809+
*termdebug-prompt*
810+
When the |+terminal| feature is not supported and on MS-Windows, gdb will run
811+
in a buffer with 'buftype' set to "prompt". This works slightly differently:
812+
- The gdb window will be in Insert mode while typing commands. Go to Normal
813+
mode with <Esc>, then you can move around in the buffer, copy/paste, etc.
814+
Go back to editing the gdb command with any command that starts Insert mode,
815+
such as `a` or `i`.
816+
- The program being debugged will run in a separate window. On MS-Windows
817+
this is a new console window. On Unix, if the |+terminal| feature is
818+
available a Terminal window will be opened to run the debugged program in.
819+
820+
*termdebug_use_prompt*
821+
Prompt mode can be used even when the |+terminal| feature is present with: >
822+
let g:termdebug_use_prompt = 1
823+
824+
802825
Communication ~
803826
*termdebug-communication*
804827
There is another, hidden, buffer, which is used for Vim to communicate with
@@ -836,6 +859,14 @@ When 'background' is "dark":
836859
hi debugBreakpoint term=reverse ctermbg=red guibg=red
837860

838861

862+
Shorcuts *termdebug_shortcuts*
863+
864+
You can define your own shortcuts (mappings) to control gdb, that can work in
865+
any window, using the TermDebugSendCommand() function. Example: >
866+
map ,w :call TermDebugSendCommand('where')<CR>
867+
The argument is the gdb command.
868+
869+
839870
Popup menu *termdebug_popup*
840871

841872
By default the Termdebug plugin sets 'mousemodel' to "popup_setpos" and adds

0 commit comments

Comments
 (0)