Skip to content

Commit d78a756

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 7e94ef5 + a8e93d6 commit d78a756

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1647
-2117
lines changed

nsis/gvim.nsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ FunctionEnd
179179

180180
##########################################################
181181
Section "Vim executables and runtime files"
182-
SectionIn 1 2 3
182+
SectionIn 1 2 3 RO
183183

184184
# we need also this here if the user changes the instdir
185185
StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}"

runtime/doc/eval.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4642,6 +4642,7 @@ getqflist([{what}]) *getqflist()*
46424642
id get information for the quickfix list with
46434643
|quickfix-ID|; zero means the id for the
46444644
current list or the list specifed by "nr"
4645+
idx index of the current entry in the list
46454646
items quickfix list entries
46464647
lines use 'errorformat' to extract items from a list
46474648
of lines and return the resulting entries.
@@ -4650,6 +4651,7 @@ getqflist([{what}]) *getqflist()*
46504651
nr get information for this quickfix list; zero
46514652
means the current quickfix list and "$" means
46524653
the last quickfix list
4654+
size number of entries in the quickfix list
46534655
title get the list title
46544656
winid get the |window-ID| (if opened)
46554657
all all of the above quickfix properties
@@ -4669,8 +4671,10 @@ getqflist([{what}]) *getqflist()*
46694671
The returned dictionary contains the following entries:
46704672
context context information stored with |setqflist()|
46714673
id quickfix list ID |quickfix-ID|
4674+
idx index of the current entry in the list
46724675
items quickfix list entries
46734676
nr quickfix list number
4677+
size number of entries in the quickfix list
46744678
title quickfix list title text
46754679
winid quickfix |window-ID| (if opened)
46764680

runtime/doc/gui.txt

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*gui.txt* For Vim version 8.0. Last change: 2017 Aug 27
1+
*gui.txt* For Vim version 8.0. Last change: 2017 Sep 16
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -785,10 +785,31 @@ In the Win32 and GTK+ GUI, starting a menu name with ']' excludes that menu
785785
from the main menu bar. You must then use the |:popup| or |:tearoff| command
786786
to display it.
787787

788+
*window-toolbar*
789+
Each window can have a local toolbar. This uses the first line of the window,
790+
thus reduces the space for the text by one line.
791+
792+
Only text can be used. When using Unicode special characters can be used to
793+
make the items look like icons.
794+
795+
If the items do not fit then the last ones cannot be used. The toolbar does
796+
not wrap.
797+
798+
Example for debugger tools: >
799+
amenu 1.10 WinBar.Step :Step<CR>
800+
amenu 1.20 WinBar.Next :Next<CR>
801+
amenu 1.30 WinBar.Finish :Finish<CR>
802+
amenu 1.40 WinBar.Cont :Continue<CR>
803+
<
804+
The window toolbar uses the ToolbarLine and ToolbarButton highlight groups.
805+
788806
*popup-menu*
789807
In the Win32, GTK+, Motif, Athena and Photon GUI, you can define the
790808
special menu "PopUp". This is the menu that is displayed when the right mouse
791809
button is pressed, if 'mousemodel' is set to popup or popup_setpos.
810+
Example: >
811+
nnoremenu 1.40 PopUp.&Paste "+gP
812+
menu PopUp
792813
793814
794815
5.3 Showing What Menus Are Mapped To *showing-menus*

runtime/doc/map.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ modes.
5555
:im[ap] {lhs} {rhs} |mapmode-i| *:im* *:imap*
5656
:lm[ap] {lhs} {rhs} |mapmode-l| *:lm* *:lmap*
5757
:cm[ap] {lhs} {rhs} |mapmode-c| *:cm* *:cmap*
58+
:tm[ap] {lhs} {rhs} |mapmode-t| *:tma* *:tmap*
5859
Map the key sequence {lhs} to {rhs} for the modes
5960
where the map command applies. The result, including
6061
{rhs}, is then further scanned for mappings. This
@@ -71,6 +72,7 @@ modes.
7172
:ino[remap] {lhs} {rhs} |mapmode-i| *:ino* *:inoremap*
7273
:ln[oremap] {lhs} {rhs} |mapmode-l| *:ln* *:lnoremap*
7374
:cno[remap] {lhs} {rhs} |mapmode-c| *:cno* *:cnoremap*
75+
:tno[remap] {lhs} {rhs} |mapmode-t| *:tno* *:tnoremap*
7476
Map the key sequence {lhs} to {rhs} for the modes
7577
where the map command applies. Disallow mapping of
7678
{rhs}, to avoid nested and recursive mappings. Often
@@ -87,6 +89,7 @@ modes.
8789
:iu[nmap] {lhs} |mapmode-i| *:iu* *:iunmap*
8890
:lu[nmap] {lhs} |mapmode-l| *:lu* *:lunmap*
8991
:cu[nmap] {lhs} |mapmode-c| *:cu* *:cunmap*
92+
:tu[nmap] {lhs} |mapmode-t| *:tunma* *:tunmap*
9093
Remove the mapping of {lhs} for the modes where the
9194
map command applies. The mapping may remain defined
9295
for other modes where it applies.
@@ -105,6 +108,7 @@ modes.
105108
:imapc[lear] |mapmode-i| *:imapc* *:imapclear*
106109
:lmapc[lear] |mapmode-l| *:lmapc* *:lmapclear*
107110
:cmapc[lear] |mapmode-c| *:cmapc* *:cmapclear*
111+
:tmapc[lear] |mapmode-t| *:tmapc* *:tmapclear*
108112
Remove ALL mappings for the modes where the map
109113
command applies. {not in Vi}
110114
Use the <buffer> argument to remove buffer-local
@@ -121,6 +125,7 @@ modes.
121125
:im[ap] |mapmode-i|
122126
:lm[ap] |mapmode-l|
123127
:cm[ap] |mapmode-c|
128+
:tm[ap] |mapmode-t|
124129
List all key mappings for the modes where the map
125130
command applies. Note that ":map" and ":map!" are
126131
used most often, because they include the other modes.
@@ -135,6 +140,7 @@ modes.
135140
:im[ap] {lhs} |mapmode-i| *:imap_l*
136141
:lm[ap] {lhs} |mapmode-l| *:lmap_l*
137142
:cm[ap] {lhs} |mapmode-c| *:cmap_l*
143+
:tm[ap] {lhs} |mapmode-t| *:tmap_l*
138144
List the key mappings for the key sequences starting
139145
with {lhs} in the modes where the map command applies.
140146
{not in Vi}
@@ -318,6 +324,7 @@ Overview of which map command works in which mode. More details below.
318324
:imap :inoremap :iunmap Insert
319325
:lmap :lnoremap :lunmap Insert, Command-line, Lang-Arg
320326
:cmap :cnoremap :cunmap Command-line
327+
:tmap :tnoremap :tunmap Terminal-Job
321328

322329

323330
COMMANDS MODES ~
@@ -358,6 +365,10 @@ Therefore the ":map" and ":map!" commands enter and display mappings for
358365
several modes. In Vim you can use the ":nmap", ":vmap", ":omap", ":cmap" and
359366
":imap" commands to enter mappings for each mode separately.
360367

368+
*mapmode-t*
369+
The terminal mappings are used in a terminal window, when typing keys for the
370+
job running in the terminal. See |terminal-typing|.
371+
361372
*omap-info*
362373
Operator-pending mappings can be used to define a movement command that can be
363374
used with any operator. Simple example: ":omap { w" makes "y{" work like "yw"
@@ -418,6 +429,7 @@ When listing mappings the characters in the first two columns are:
418429
i Insert
419430
l ":lmap" mappings for Insert, Command-line and Lang-Arg
420431
c Command-line
432+
t Terminal-Job
421433

422434
Just before the {rhs} a special character can appear:
423435
* indicates that it is not remappable

runtime/doc/options.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4423,7 +4423,7 @@ A jump table for the options with a short description can be found at |Q_op|.
44234423
in later releases.
44244424

44254425
*'iminsert'* *'imi'*
4426-
'iminsert' 'imi' number (default 0, 2 when an input method is supported)
4426+
'iminsert' 'imi' number (default 0)
44274427
local to buffer
44284428
{not in Vi}
44294429
Specifies whether :lmap or an Input Method (IM) is to be used in
@@ -4446,7 +4446,7 @@ A jump table for the options with a short description can be found at |Q_op|.
44464446
methods. Use 'imdisable' to disable XIM then.
44474447

44484448
*'imsearch'* *'ims'*
4449-
'imsearch' 'ims' number (default 0, 2 when an input method is supported)
4449+
'imsearch' 'ims' number (default -1)
44504450
local to buffer
44514451
{not in Vi}
44524452
Specifies whether :lmap or an Input Method (IM) is to be used when

runtime/doc/terminal.txt

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*terminal.txt* For Vim version 8.0. Last change: 2017 Sep 10
1+
*terminal.txt* For Vim version 8.0. Last change: 2017 Sep 17
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,7 +38,7 @@ output from the job, also while editing in another window.
3838

3939

4040
Typing ~
41-
41+
*terminal-typing*
4242
When the keyboard focus is in the terminal window, typed keys will be sent to
4343
the job. This uses a pty when possible. You can click outside of the
4444
terminal window to move keyboard focus elsewhere.
@@ -79,15 +79,24 @@ do. For simple commands this causes a SIGINT to be sent to the job, which
7979
would end it. Other commands may ignore the SIGINT or handle the CTRL-C
8080
themselves (like Vim does).
8181

82+
To change the keys you type use terminal mode mappings, see |:tmap|.
83+
These are defined like any mapping, but apply only when typing keys that are
84+
sent to the job running in the terminal.
85+
8286

8387
Size and color ~
8488

8589
See option 'termsize' for controlling the size of the terminal window.
8690
(TODO: scrolling when the terminal is larger than the window)
8791

88-
The terminal uses the 'background' option to decide whether the terminal
89-
window will start with a white or black background. The job running in the
90-
terminal can change the colors.
92+
The job running in the terminal can change the colors. The default foreground
93+
and background colors are taken from Vim, the Normal highlight group.
94+
95+
For a color terminal the 'background' option is used to decide whether the
96+
terminal window will start with a white or black background.
97+
98+
To use a different color the Terminal highlight group can be used: >
99+
hi Terminal ctermbg=lightgrey ctermfg=blue guibg=lightgrey guifg=blue
91100
92101
93102
Syntax ~
@@ -216,12 +225,16 @@ mode.
216225
Use CTRL-W N (or 'termkey' N) to switch to Terminal-Normal mode. Now the
217226
contents of the terminal window is under control of Vim, the job output is
218227
suspended. CTRL-\ CTRL-N does the same.
228+
229+
Terminal-Job mode is where |:tmap| mappings are applied. Keys sent by
230+
|term_sendkeys()| are not subject to tmap, but keys from |feedkeys()| are.
231+
219232
*E946*
220233
In Terminal-Normal mode you can move the cursor around with the usual Vim
221234
commands, Visually mark text, yank text, etc. But you cannot change the
222235
contents of the buffer. The commands that would start insert mode, such as
223236
'i' and 'a', return to Terminal-Job mode. The window will be updated to show
224-
the contents of the terminal.
237+
the contents of the terminal. |:startinsert| is ineffective.
225238

226239
In Terminal-Normal mode the statusline and window title show "(Terminal)". If
227240
the job ends while in Terminal-Normal mode this changes to
@@ -296,7 +309,7 @@ inspects the resulting screen state.
296309

297310
Functions ~
298311

299-
term_sendkeys() send keystrokes to a terminal
312+
term_sendkeys() send keystrokes to a terminal (not subject to tmap)
300313
term_wait() wait for screen to be updated
301314
term_scrape() inspect terminal screen
302315

@@ -359,6 +372,14 @@ In the window showing the source code some commands can used to control gdb:
359372
:Finish execute the gdb "finish" command
360373
:Continue execute the gdb "continue" command
361374

375+
The plugin adds a window toolbar with these entries:
376+
Step :Step
377+
Next :Over
378+
Finish :Finish
379+
Cont :Continue
380+
Eval :Evaluate
381+
This way you can use the mouse to perform the most common commands.
382+
362383

363384
Inspecting variables ~
364385

@@ -403,6 +424,12 @@ When 'background' is "dark":
403424
hi debugPC term=reverse ctermbg=darkblue guibg=darkblue
404425
hi debugBreakpoint term=reverse ctermbg=red guibg=red
405426

427+
To change the width of the Vim window when debugging starts, and use a
428+
vertical split: >
429+
let g:termdebug_wide = 163
430+
This will set &columns to 163 when :Termdebug is used. The value is restored
431+
when quitting the debugger.
432+
406433

407434

408435
vim:tw=78:ts=8:ft=help:norl:

0 commit comments

Comments
 (0)