doc [ci skip]

This commit is contained in:
Justin M. Keyes 2019-12-10 01:24:20 -08:00
parent e922576bdd
commit 93e7c7e3bd
11 changed files with 45 additions and 57 deletions

View File

@ -1,8 +1,7 @@
[![Neovim](https://raw.githubusercontent.com/neovim/neovim.github.io/master/logos/neovim-logo-300x87.png)](https://neovim.io) [![Neovim](https://raw.githubusercontent.com/neovim/neovim.github.io/master/logos/neovim-logo-300x87.png)](https://neovim.io)
[Wiki](https://github.com/neovim/neovim/wiki) |
[Documentation](https://neovim.io/doc) | [Documentation](https://neovim.io/doc) |
[Chat/Discussion](https://gitter.im/neovim/neovim) | [Chat](https://gitter.im/neovim/neovim) |
[Twitter](https://twitter.com/Neovim) [Twitter](https://twitter.com/Neovim)
[![Travis build status](https://travis-ci.org/neovim/neovim.svg?branch=master)](https://travis-ci.org/neovim/neovim) [![Travis build status](https://travis-ci.org/neovim/neovim.svg?branch=master)](https://travis-ci.org/neovim/neovim)
@ -114,17 +113,9 @@ Project layout
License License
------- -------
Neovim is licensed under the terms of the Apache 2.0 license, except for Neovim contributions since [b17d96][license-commit] are licensed under the
parts that were contributed under the Vim license. Apache 2.0 license, except for contributions copied from Vim (identified by the
`vim-patch` token). See LICENSE for details.
- Contributions committed before [b17d96][license-commit] remain under the Vim
license.
- Contributions committed after [b17d96][license-commit] are licensed under
Apache 2.0 unless those contributions were copied from Vim (identified in
the commit logs by the `vim-patch` token).
See `LICENSE` for details.
Vim is Charityware. You can use and copy it as much as you like, but you are Vim is Charityware. You can use and copy it as much as you like, but you are
encouraged to make a donation for needy children in Uganda. Please see the encouraged to make a donation for needy children in Uganda. Please see the

View File

@ -3771,8 +3771,8 @@ feedkeys({string} [, {mode}]) *feedkeys()*
and "\..." notation |expr-quote|. For example, and "\..." notation |expr-quote|. For example,
feedkeys("\<CR>") simulates pressing of the <Enter> key. But feedkeys("\<CR>") simulates pressing of the <Enter> key. But
feedkeys('\<CR>') pushes 5 characters. feedkeys('\<CR>') pushes 5 characters.
A special code that might be useful is <Ignore>, it exits the The |<Ignore>| keycode may be used to exit the
wait for a character without doing anything. *<Ignore>* wait-for-character without doing anything.
{mode} is a String, which can contain these character flags: {mode} is a String, which can contain these character flags:
'm' Remap keys. This is default. If {mode} is absent, 'm' Remap keys. This is default. If {mode} is absent,

View File

@ -339,6 +339,8 @@ notation meaning equivalent decimal value(s) ~
<EOL> end-of-line (can be <CR>, <LF> or <CR><LF>, <EOL> end-of-line (can be <CR>, <LF> or <CR><LF>,
depends on system and 'fileformat') *<EOL>* depends on system and 'fileformat') *<EOL>*
<Ignore> cancel wait-for-character *<Ignore>*
<NOP> no-op: do nothing (useful in mappings) *<Nop>*
<Up> cursor-up *cursor-up* *cursor_up* <Up> cursor-up *cursor-up* *cursor_up*
<Down> cursor-down *cursor-down* *cursor_down* <Down> cursor-down *cursor-down* *cursor_down*

View File

@ -38,6 +38,7 @@ go-to-definition, "hover", etc. Example config: >
nnoremap <silent> gD <cmd>lua vim.lsp.buf.implementation()<CR> nnoremap <silent> gD <cmd>lua vim.lsp.buf.implementation()<CR>
nnoremap <silent> <c-k> <cmd>lua vim.lsp.buf.signature_help()<CR> nnoremap <silent> <c-k> <cmd>lua vim.lsp.buf.signature_help()<CR>
nnoremap <silent> 1gD <cmd>lua vim.lsp.buf.type_definition()<CR> nnoremap <silent> 1gD <cmd>lua vim.lsp.buf.type_definition()<CR>
nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>
< <
*vim.lsp.omnifunc()* *vim.lsp.omnifunc()*

View File

@ -522,10 +522,9 @@ single CTRL-V (you have to type CTRL-V two times).
You can create an empty {rhs} by typing nothing after a single CTRL-V (you You can create an empty {rhs} by typing nothing after a single CTRL-V (you
have to type CTRL-V two times). Unfortunately, you cannot do this in a vimrc have to type CTRL-V two times). Unfortunately, you cannot do this in a vimrc
file. file.
*<Nop>* |<Nop>|
An easier way to get a mapping that doesn't produce anything, is to use An easier way to get a mapping that doesn't produce anything, is to use
"<Nop>" for the {rhs}. This only works when the |<>| notation is enabled. "<Nop>" for the {rhs}. For example, to disable function key 8: >
For example, to make sure that function key 8 does nothing at all: >
:map <F8> <Nop> :map <F8> <Nop>
:map! <F8> <Nop> :map! <F8> <Nop>
< <

View File

@ -671,21 +671,20 @@ being disabled. Remove the 'C' flag from the 'cpoptions' option to enable it.
*E471* > *E471* >
Argument required Argument required
This happens when an Ex command with mandatory argument(s) was executed, but Ex command was executed without a mandatory argument(s).
no argument has been specified.
*E474* *E475* *E983* > *E474* *E475* *E983* >
Invalid argument Invalid argument
Invalid argument: {arg} Invalid argument: {arg}
Duplicate argument: {arg} Duplicate argument: {arg}
Ex command or function has been executed, but an invalid argument was Ex command or function was given an invalid argument. Or |jobstart()| or
specified. Or a non-executable command was given to |system()|. |system()| was given a non-executable command.
*E488* > *E488* >
Trailing characters Trailing characters
An argument has been added to an Ex command that does not permit one. An argument was given to an Ex command that does not permit one.
*E477* *E478* > *E477* *E478* >
No ! allowed No ! allowed

View File

@ -1105,7 +1105,7 @@ Finally, navigate to a different webpage, new.com. The history is
- third.com - third.com
- new.com <-- - new.com <--
When the jumpoptions includes "stack", this is the behavior of neovim as well. When the jumpoptions includes "stack", this is the behavior of Nvim as well.
That is, given a jumplist like the following in which CTRL-O has been used to That is, given a jumplist like the following in which CTRL-O has been used to
move back three times to location X move back three times to location X
@ -1117,8 +1117,8 @@ move back three times to location X
2 213 2 src/nvim/mark.c 2 213 2 src/nvim/mark.c
3 181 0 src/nvim/mark.c 3 181 0 src/nvim/mark.c
jumping to location Y results in the locations after the current locations being jumping to (new) location Y results in the locations after the current
removed: locations being removed:
jump line col file/text jump line col file/text
3 1260 8 src/nvim/mark.c 3 1260 8 src/nvim/mark.c

View File

@ -4543,15 +4543,15 @@ A jump table for the options with a short description can be found at |Q_op|.
*'pumheight'* *'ph'* *'pumheight'* *'ph'*
'pumheight' 'ph' number (default 0) 'pumheight' 'ph' number (default 0)
global global
Determines the maximum number of items to show in the popup menu for Maximum number of items to show in the popup menu
Insert mode completion. When zero as much space as available is used. (|ins-completion-menu|). Zero means "use available screen space".
|ins-completion-menu|.
*'pumwidth'* *'pw'* *'pumwidth'* *'pw'*
'pumwidth' 'pw' number (default 15) 'pumwidth' 'pw' number (default 15)
global global
Determines the minium width to use for the popup menu for Insert mode Minimum width for the popup menu (|ins-completion-menu|). If the
completion. |ins-completion-menu|. cursor column + 'pumwidth' exceeds screen width, the popup menu is
nudged to fit on the screen.
*'pyxversion'* *'pyx'* *'pyxversion'* *'pyx'*
'pyxversion' 'pyx' number (default depends on the build) 'pyxversion' 'pyx' number (default depends on the build)

View File

@ -195,20 +195,20 @@ Normal commands:
"Outline": Type |gO| in |:Man| and |:help| pages to see a document outline. "Outline": Type |gO| in |:Man| and |:help| pages to see a document outline.
Options: Options:
'cpoptions' flags: |cpo-_| 'cpoptions' flags: |cpo-_|
'display' flag `msgsep` to minimize scrolling when showing messages 'display' flags: "msgsep" minimizes scrolling when showing messages
'guicursor' works in the terminal 'guicursor' works in the terminal
'fillchars' local to window. flags: `msgsep` (see 'display' above) and `eob` 'fillchars' flags: "msgsep" (see 'display'), "eob" for |hl-EndOfBuffer|
for |hl-EndOfBuffer| marker marker, "foldopen", "foldsep", "foldclose"
'inccommand' shows interactive results for |:substitute|-like commands 'inccommand' shows interactive results for |:substitute|-like commands
'listchars' local to window 'listchars' local to window
'pumblend' pseudo-transparent popupmenu 'pumblend' pseudo-transparent popupmenu
'scrollback' 'scrollback'
'signcolumn' supports up to 9 dynamic/fixed columns 'signcolumn' supports up to 9 dynamic/fixed columns
'statusline' supports unlimited alignment sections 'statusline' supports unlimited alignment sections
'tabline' %@Func@foo%X can call any function on mouse-click 'tabline' %@Func@foo%X can call any function on mouse-click
'wildoptions' `pum` flag to use popupmenu for wildmode completion 'wildoptions' "pum" flag to use popupmenu for wildmode completion
'winblend' pseudo-transparency in floating windows |api-floatwin| 'winblend' pseudo-transparency in floating windows |api-floatwin|
'winhighlight' window-local highlights 'winhighlight' window-local highlights
Signs: Signs:
@ -336,16 +336,12 @@ Macro/|recording| behavior
Motion: Motion:
The |jumplist| avoids useless/phantom jumps. The |jumplist| avoids useless/phantom jumps.
When the new option |jumpoptions| includes 'stack', the jumplist behaves
like the tagstack or history in a web browser--jumping from the middle of
the jumplist discards the locations after the jumped-from position
(|jumplist-stack|).
Normal commands: Normal commands:
|Q| is the same as |gQ| |Q| is the same as |gQ|
Options: Options:
'ttimeout', 'ttimeoutlen' behavior was simplified 'ttimeout', 'ttimeoutlen' behavior was simplified
|jumpoptions| "stack" behavior
Shell: Shell:
Shell output (|:!|, |:make|, …) is always routed through the UI, so it Shell output (|:!|, |:make|, …) is always routed through the UI, so it

View File

@ -179,8 +179,8 @@ void setpcmark(void)
} }
if (jop_flags & JOP_STACK) { if (jop_flags & JOP_STACK) {
// If we're somewhere in the middle of the jumplist discard everything // jumpoptions=stack: if we're somewhere in the middle of the jumplist
// after the current index. // discard everything after the current index.
if (curwin->w_jumplistidx < curwin->w_jumplistlen - 1) { if (curwin->w_jumplistidx < curwin->w_jumplistlen - 1) {
// Discard the rest of the jumplist by cutting the length down to // Discard the rest of the jumplist by cutting the length down to
// contain nothing beyond the current index. // contain nothing beyond the current index.
@ -1214,14 +1214,14 @@ void cleanup_jumplist(win_T *wp, bool checktail)
break; break;
} }
} }
bool mustfree; bool mustfree;
if (i >= wp->w_jumplistlen) { // not duplicate if (i >= wp->w_jumplistlen) { // not duplicate
mustfree = false; mustfree = false;
} else if (i > from + 1) { // non-adjacent duplicate } else if (i > from + 1) { // non-adjacent duplicate
// When the jump options include "stack", duplicates are only removed from // jumpoptions=stack: remove duplicates only when adjacent.
// the jumplist when they are adjacent.
mustfree = !(jop_flags & JOP_STACK); mustfree = !(jop_flags & JOP_STACK);
} else { // adjacent duplicate } else { // adjacent duplicate
mustfree = true; mustfree = true;
} }

View File

@ -48,7 +48,7 @@ describe('jumplist', function()
end) end)
end) end)
describe('jumpoptions=stack behaves like browser history', function() describe("jumpoptions=stack behaves like 'tagstack'", function()
before_each(function() before_each(function()
clear() clear()
feed(':clearjumps<cr>') feed(':clearjumps<cr>')