Skip to content

Commit 4f32ce3

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents f24dd52 + 3f39697 commit 4f32ce3

49 files changed

Lines changed: 671 additions & 123 deletions

Some content is hidden

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

runtime/defaults.vim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,14 @@ inoremap <C-U> <C-G>u<C-U>
7575
7676
" In many terminal emulators the mouse works just fine. By enabling it you
7777
" can position the cursor, Visually select and scroll with the mouse.
78+
" Only xterm can grab the mouse events when using the shift key, for other
79+
" terminals use ":", select text and press Esc.
7880
if has('mouse')
79-
set mouse=a
81+
if &term =~ 'xterm'
82+
set mouse=a
83+
else
84+
set mouse=nvi
85+
endif
8086
endif
8187

8288
" Switch syntax highlighting on when the terminal has colors or when using the

runtime/doc/eval.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.1. Last change: 2019 Oct 26
1+
*eval.txt* For Vim version 8.1. Last change: 2019 Oct 29
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1662,6 +1662,10 @@ PREDEFINED VIM VARIABLES *vim-variable* *v:var* *v:*
16621662
*E963*
16631663
Some variables can be set by the user, but the type cannot be changed.
16641664

1665+
*v:argv* *argv-variable*
1666+
v:argv The command line arguments Vim was invoked with. This is a
1667+
list of strings. The first item is the Vim command.
1668+
16651669
*v:beval_col* *beval_col-variable*
16661670
v:beval_col The number of the column, over which the mouse pointer is.
16671671
This is the byte index in the |v:beval_lnum| line.
@@ -3046,6 +3050,7 @@ argv([{nr} [, {winid}])
30463050
the whole |arglist| is returned.
30473051

30483052
The {winid} argument specifies the window ID, see |argc()|.
3053+
For the Vim command line arguments see |v:argv|.
30493054

30503055

30513056
assert_ functions are documented here: |assert-functions-details|
@@ -4790,6 +4795,10 @@ getbufinfo([{dict}])
47904795
changed TRUE if the buffer is modified.
47914796
changedtick number of changes made to the buffer.
47924797
hidden TRUE if the buffer is hidden.
4798+
lastused timestamp in seconds, like
4799+
|localtime()|, when the buffer was
4800+
last used.
4801+
{only with the |+viminfo| feature}
47934802
listed TRUE if the buffer is listed.
47944803
lnum current line number in buffer.
47954804
loaded TRUE if the buffer is loaded.

runtime/doc/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,7 @@ tag char note action in Normal mode ~
781781
|gn| gn 1,2 find the next match with the last used
782782
search pattern and Visually select it
783783
|gm| gm 1 go to character at middle of the screenline
784+
|gM| gM 1 go to character at middle of the text line
784785
|go| go 1 cursor to byte N in the buffer
785786
|gp| ["x]gp 2 put the text [from register x] after the
786787
cursor N times, leave the cursor after it

runtime/doc/motion.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*motion.txt* For Vim version 8.1. Last change: 2019 Jun 02
1+
*motion.txt* For Vim version 8.1. Last change: 2019 Oct 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -227,6 +227,12 @@ g^ When lines wrap ('wrap' on): To the first non-blank
227227
gm Like "g0", but half a screenwidth to the right (or as
228228
much as possible).
229229

230+
*gm* *gM*
231+
gM Like "g0", but to halfway the text of the line.
232+
With a count: to this percentage of text in the line.
233+
Thus "10gM" is near the start of the text and "90gM"
234+
is near the end of the text.
235+
230236
*g$* *g<End>*
231237
g$ or g<End> When lines wrap ('wrap' on): To the last character of
232238
the screen line and [count - 1] screen lines downward

runtime/doc/options.txt

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4034,6 +4034,7 @@ A jump table for the options with a short description can be found at |Q_op|.
40344034
"8:SpecialKey,~:EndOfBuffer,@:NonText,
40354035
d:Directory,e:ErrorMsg,i:IncSearch,
40364036
l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,
4037+
a:LineNrAbove,b:LineNrBelow,
40374038
N:CursorLineNr,r:Question,s:StatusLine,
40384039
S:StatusLineNC,c:VertSplit,t:Title,
40394040
v:Visual,V:VisualNOS,w:WarningMsg,
@@ -4065,6 +4066,10 @@ A jump table for the options with a short description can be found at |Q_op|.
40654066
|hl-ModeMsg| M Mode (e.g., "-- INSERT --")
40664067
|hl-LineNr| n line number for ":number" and ":#" commands, and
40674068
when 'number' or 'relativenumber' option is set.
4069+
|hl-LineNrAbove| a line number above the cursor for when the
4070+
'relativenumber' option is set.
4071+
|hl-LineNrBelow| b line number below the cursor for when the
4072+
'relativenumber' option is set.
40684073
|hl-CursorLineNr| N like n for when 'cursorline' or 'relativenumber' is
40694074
set.
40704075
|hl-Question| r |hit-enter| prompt and yes/no questions
@@ -5340,12 +5345,11 @@ A jump table for the options with a short description can be found at |Q_op|.
53405345

53415346
*'mouse'* *E538*
53425347
'mouse' string (default "", "a" for GUI, MS-DOS and Win32,
5343-
set to "a" in |defaults.vim|)
5348+
set to "a" or "nvi" in |defaults.vim|)
53445349
global
5345-
Enable the use of the mouse. Only works for certain terminals
5346-
(xterm, MS-DOS, Win32 |win32-mouse|, QNX pterm, *BSD console with
5347-
sysmouse and Linux console with gpm). For using the mouse in the
5348-
GUI, see |gui-mouse|.
5350+
Enable the use of the mouse. Works for most terminals (xterm, MS-DOS,
5351+
Win32 |win32-mouse|, QNX pterm, *BSD console with sysmouse and Linux
5352+
console with gpm). For using the mouse in the GUI, see |gui-mouse|.
53495353
The mouse can be enabled for different modes:
53505354
n Normal mode and Terminal modes
53515355
v Visual mode
@@ -5356,7 +5360,15 @@ A jump table for the options with a short description can be found at |Q_op|.
53565360
r for |hit-enter| and |more-prompt| prompt
53575361
Normally you would enable the mouse in all five modes with: >
53585362
:set mouse=a
5359-
< When the mouse is not enabled, the GUI will still use the mouse for
5363+
< If your terminal can't overrule the mouse events going to the
5364+
application, use: >
5365+
:set mouse=nvi
5366+
< The you can press ":", select text for the system, and press Esc to go
5367+
back to Vim using the mouse events.
5368+
In |defaults.vim| "nvi" is used if the 'term' option is not matching
5369+
"xterm".
5370+
5371+
When the mouse is not enabled, the GUI will still use the mouse for
53605372
modeless selection. This doesn't move the text cursor.
53615373

53625374
See |mouse-using|. Also see |'clipboard'|.
@@ -8852,6 +8864,8 @@ A jump table for the options with a short description can be found at |Q_op|.
88528864
complete first match.
88538865
"list:longest" When more than one match, list all matches and
88548866
complete till longest common string.
8867+
"list:lastused" When more than one buffer matches, sort buffers
8868+
by time last used (other than the current buffer).
88558869
When there is only a single match, it is fully completed in all cases.
88568870

88578871
Examples: >

runtime/doc/quickref.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ N is used to indicate an optional count that can be given before the command.
4747
|g$| N g$ to last character in screen line (differs from "$"
4848
when lines wrap)
4949
|gm| gm to middle of the screen line
50+
|gM| gM to middle of the line
5051
|bar| N | to column N (default: 1)
5152
|f| N f{char} to the Nth occurrence of {char} to the right
5253
|F| N F{char} to the Nth occurrence of {char} to the left

runtime/doc/syntax.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5071,6 +5071,12 @@ IncSearch 'incsearch' highlighting; also used for the text replaced with
50715071
*hl-LineNr*
50725072
LineNr Line number for ":number" and ":#" commands, and when 'number'
50735073
or 'relativenumber' option is set.
5074+
*hl-LineNrAbove*
5075+
LineNrAbove Line number for when the 'relativenumber'
5076+
option is set, above the cursor line.
5077+
*hl-LineNrBelow*
5078+
LineNrBelow Line number for when the 'relativenumber'
5079+
option is set, below the cursor line.
50745080
*hl-CursorLineNr*
50755081
CursorLineNr Like LineNr when 'cursorline' is set and 'cursorlineopt' is
50765082
set to "number" or "both", or 'relativenumber' is set, for

runtime/doc/term.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,12 +746,21 @@ jump to tags).
746746
Whether the selection that is started with the mouse is in Visual mode or
747747
Select mode depends on whether "mouse" is included in the 'selectmode'
748748
option.
749-
749+
*terminal-mouse*
750750
In an xterm, with the currently active mode included in the 'mouse' option,
751751
normal mouse clicks are used by Vim, mouse clicks with the shift or ctrl key
752752
pressed go to the xterm. With the currently active mode not included in
753753
'mouse' all mouse clicks go to the xterm.
754754

755+
For terminals where it is not possible to have the mouse events be used by the
756+
terminal itself by using a modifier, a workaround is to not use mouse events
757+
for Vim in command-line mode: >
758+
:set mouse=nvi
759+
Then to select text with the terminal, use ":" to go to command-line mode,
760+
select and copy the text to the system, then press Esc.
761+
762+
Another way is to temporarily use ":sh" to run a shell, copy the text, then
763+
exit the shell. 'mouse' can remain set to "a" then.
755764
*xterm-clipboard*
756765
In the Athena and Motif GUI versions, when running in a terminal and there is
757766
access to the X-server (DISPLAY is set), the copy and paste will behave like

runtime/doc/usr_25.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,13 @@ scroll:
346346

347347
g0 to first visible character in this line
348348
g^ to first non-blank visible character in this line
349-
gm to middle of this line
349+
gm to middle of screen line
350+
gM to middle of the text in this line
350351
g$ to last visible character in this line
351352

352-
|<-- window -->|
353-
some long text, part of which is visible ~
354-
g0 g^ gm g$
353+
|<-- window -->|
354+
some long text, part of which is visible in one line ~
355+
g0 g^ gm gM g$
355356

356357

357358
BREAKING AT WORDS *edit-no-break*

runtime/doc/windows.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,7 @@ list of buffers. |unlisted-buffer|
10901090
R terminal buffers with a running job
10911091
F terminal buffers with a finished job
10921092
? terminal buffers without a job: `:terminal NONE`
1093+
t show time last used and sort buffers
10931094
Combining flags means they are "and"ed together, e.g.:
10941095
h+ hidden buffers which are modified
10951096
a+ active buffers which are modified

0 commit comments

Comments
 (0)