aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-10-30 00:49:12 +0300
committerZyX <kp-pav@yandex.ru>2017-10-30 00:49:12 +0300
commitb29a776550dadefefb891d01054ea21eb942bad1 (patch)
tree799bb2c0e926a20ac5b1af262f0849208eae699a /runtime
parent538af1c90a4ac9928f60e97338869e516def4956 (diff)
parent45296b331fa462eeabb141037ad10a3ad24ab8a6 (diff)
downloadrneovim-b29a776550dadefefb891d01054ea21eb942bad1.tar.gz
rneovim-b29a776550dadefefb891d01054ea21eb942bad1.tar.bz2
rneovim-b29a776550dadefefb891d01054ea21eb942bad1.zip
Merge branch 'master' into expression-parser
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/health.vim7
-rw-r--r--runtime/autoload/health/nvim.vim7
-rw-r--r--runtime/autoload/provider/ruby.vim2
-rw-r--r--runtime/autoload/remote/define.vim32
-rw-r--r--runtime/doc/api.txt4
-rw-r--r--runtime/doc/autocmd.txt2
-rw-r--r--runtime/doc/change.txt3
-rw-r--r--runtime/doc/cmdline.txt2
-rw-r--r--runtime/doc/debug.txt2
-rw-r--r--runtime/doc/develop.txt2
-rw-r--r--runtime/doc/diff.txt2
-rw-r--r--runtime/doc/digraph.txt2
-rw-r--r--runtime/doc/editing.txt7
-rw-r--r--runtime/doc/eval.txt2
-rw-r--r--runtime/doc/filetype.txt4
-rw-r--r--runtime/doc/fold.txt2
-rw-r--r--runtime/doc/gui.txt2
-rw-r--r--runtime/doc/helphelp.txt4
-rw-r--r--runtime/doc/if_cscop.txt2
-rw-r--r--runtime/doc/if_lua.txt104
-rw-r--r--runtime/doc/if_pyth.txt2
-rw-r--r--runtime/doc/if_ruby.txt2
-rw-r--r--runtime/doc/indent.txt2
-rw-r--r--runtime/doc/index.txt2
-rw-r--r--runtime/doc/insert.txt2
-rw-r--r--runtime/doc/intro.txt2
-rw-r--r--runtime/doc/job_control.txt2
-rw-r--r--runtime/doc/map.txt2
-rw-r--r--runtime/doc/mbyte.txt2
-rw-r--r--runtime/doc/message.txt2
-rw-r--r--runtime/doc/mlang.txt2
-rw-r--r--runtime/doc/motion.txt3
-rw-r--r--runtime/doc/msgpack_rpc.txt201
-rw-r--r--runtime/doc/nvim.txt2
-rw-r--r--runtime/doc/nvim_terminal_emulator.txt2
-rw-r--r--runtime/doc/options.txt8
-rw-r--r--runtime/doc/pattern.txt2
-rw-r--r--runtime/doc/pi_health.txt100
-rw-r--r--runtime/doc/print.txt2
-rw-r--r--runtime/doc/provider.txt6
-rw-r--r--runtime/doc/quickfix.txt18
-rw-r--r--runtime/doc/recover.txt2
-rw-r--r--runtime/doc/remote.txt2
-rw-r--r--runtime/doc/remote_plugin.txt2
-rw-r--r--runtime/doc/repeat.txt2
-rw-r--r--runtime/doc/russian.txt2
-rw-r--r--runtime/doc/scroll.txt2
-rw-r--r--runtime/doc/sign.txt2
-rw-r--r--runtime/doc/spell.txt2
-rw-r--r--runtime/doc/starting.txt70
-rw-r--r--runtime/doc/syntax.txt2
-rw-r--r--runtime/doc/tabpage.txt2
-rw-r--r--runtime/doc/tagsrch.txt2
-rw-r--r--runtime/doc/term.txt2
-rw-r--r--runtime/doc/tips.txt2
-rw-r--r--runtime/doc/ui.txt290
-rw-r--r--runtime/doc/undo.txt2
-rw-r--r--runtime/doc/various.txt11
-rw-r--r--runtime/doc/vi_diff.txt2
-rw-r--r--runtime/doc/vim_diff.txt10
-rw-r--r--runtime/doc/visual.txt2
-rw-r--r--runtime/doc/windows.txt4
-rw-r--r--runtime/ftplugin/help.vim2
-rw-r--r--runtime/ftplugin/man.vim2
-rw-r--r--runtime/syntax/c.vim18
65 files changed, 588 insertions, 411 deletions
diff --git a/runtime/autoload/health.vim b/runtime/autoload/health.vim
index d0ad7729ab..b076f2456b 100644
--- a/runtime/autoload/health.vim
+++ b/runtime/autoload/health.vim
@@ -18,7 +18,7 @@ function! s:enhance_syntax() abort
syntax match healthBar "|" contained conceal
highlight link healthHelp Identifier
- " We do not care about markdown syntax errors in :CheckHealth output.
+ " We do not care about markdown syntax errors in :checkhealth output.
highlight! link markdownError Normal
endfunction
@@ -159,7 +159,10 @@ endfunction
" Translates a list of plugin names to healthcheck function names.
function! s:to_fn_names(plugin_names) abort
let healthchecks = []
- for p in a:plugin_names
+ let plugin_names = type('') ==# type(a:plugin_names)
+ \ ? split(a:plugin_names, '', v:false)
+ \ : a:plugin_names
+ for p in plugin_names
call add(healthchecks, 'health#'.p.'#check')
endfor
return healthchecks
diff --git a/runtime/autoload/health/nvim.vim b/runtime/autoload/health/nvim.vim
index 6c6a5e8543..7f6e943dc9 100644
--- a/runtime/autoload/health/nvim.vim
+++ b/runtime/autoload/health/nvim.vim
@@ -4,12 +4,19 @@ function! s:check_config() abort
let ok = v:true
call health#report_start('Configuration')
+ " If $VIM is empty we don't care. Else make sure it is valid.
+ if !empty($VIM) && !filereadable($VIM.'/runtime/doc/nvim.txt')
+ let ok = v:false
+ call health#report_error("$VIM is invalid: ".$VIM)
+ endif
+
if exists('$NVIM_TUI_ENABLE_CURSOR_SHAPE')
let ok = v:false
call health#report_warn("$NVIM_TUI_ENABLE_CURSOR_SHAPE is ignored in Nvim 0.2+",
\ [ "Use the 'guicursor' option to configure cursor shape. :help 'guicursor'",
\ 'https://github.com/neovim/neovim/wiki/Following-HEAD#20170402' ])
endif
+
if &paste
let ok = v:false
call health#report_error("'paste' is enabled. This option is only for pasting text.\nIt should not be set in your config.",
diff --git a/runtime/autoload/provider/ruby.vim b/runtime/autoload/provider/ruby.vim
index 91b7fb9f2c..7df3500267 100644
--- a/runtime/autoload/provider/ruby.vim
+++ b/runtime/autoload/provider/ruby.vim
@@ -75,7 +75,7 @@ let s:prog = provider#ruby#Detect()
let s:plugin_path = expand('<sfile>:p:h') . '/script_host.rb'
if empty(s:prog)
- let s:err = 'Cannot find the neovim RubyGem. Try :CheckHealth'
+ let s:err = 'Cannot find the neovim RubyGem. Try :checkhealth'
endif
call remote#host#RegisterClone('legacy-ruby-provider', 'ruby')
diff --git a/runtime/autoload/remote/define.vim b/runtime/autoload/remote/define.vim
index b5c976c823..2688a62a82 100644
--- a/runtime/autoload/remote/define.vim
+++ b/runtime/autoload/remote/define.vim
@@ -169,14 +169,40 @@ function! remote#define#FunctionOnChannel(channel, method, sync, name, opts)
exe function_def
endfunction
+let s:busy = {}
+let s:pending_notifications = {}
function! s:GetRpcFunction(sync)
- if a:sync
- return 'rpcrequest'
+ if a:sync ==# 'urgent'
+ return 'rpcnotify'
+ elseif a:sync
+ return 'remote#define#request'
endif
- return 'rpcnotify'
+ return 'remote#define#notify'
endfunction
+function! remote#define#notify(chan, ...)
+ if get(s:busy, a:chan, 0) > 0
+ let pending = get(s:pending_notifications, a:chan, [])
+ call add(pending, deepcopy(a:000))
+ let s:pending_notifications[a:chan] = pending
+ else
+ call call('rpcnotify', [a:chan] + a:000)
+ endif
+endfunction
+
+function! remote#define#request(chan, ...)
+ let s:busy[a:chan] = get(s:busy, a:chan, 0)+1
+ let val = call('rpcrequest', [a:chan]+a:000)
+ let s:busy[a:chan] -= 1
+ if s:busy[a:chan] == 0
+ for msg in get(s:pending_notifications, a:chan, [])
+ call call('rpcnotify', [a:chan] + msg)
+ endfor
+ let s:pending_notifications[a:chan] = []
+ endif
+ return val
+endfunction
function! s:GetCommandPrefix(name, opts)
return 'command!'.s:StringifyOpts(a:opts, ['nargs', 'complete', 'range',
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index e12cd1cfa9..159dd93c5e 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -11,7 +11,7 @@ via |msgpack-rpc|, Lua and VimL (|eval-api|).
Applications can also embed libnvim to work with the C API directly.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
API Types *api-types*
@@ -48,7 +48,7 @@ version.api_compatible API is backwards-compatible with this level
version.api_prerelease Declares the current API level as unstable >
(version.api_prerelease && fn.since == version.api_level)
functions API function signatures
-ui_events UI event signatures |rpc-remote-ui|
+ui_events UI event signatures |ui|
{fn}.since API level where function {fn} was introduced
{fn}.deprecated_since API level where function {fn} was deprecated
types Custom handle types defined by Nvim
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index fd2a7c2641..2850c8058f 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -8,7 +8,7 @@ Automatic commands *autocommand*
For a basic explanation, see section |40.3| in the user manual.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Introduction *autocmd-intro*
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index f82d61370c..9610d7359f 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -11,7 +11,7 @@ commands with the "." command.
For inserting text see |insert.txt|.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Deleting text *deleting* *E470*
@@ -648,6 +648,7 @@ g& Synonym for `:%s//~/&` (repeat last substitute with
*:s_flags*
The flags that you can use for the substitute commands:
+ *:&&*
[&] Must be the first one: Keep the flags from the previous substitute
command. Examples: >
:&&
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index 652487d8ab..4222a5b6f7 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -13,7 +13,7 @@ Command-line mode is used to enter Ex commands (":"), search patterns
Basic command line editing is explained in chapter 20 of the user manual
|usr_20.txt|.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Command-line editing *cmdline-editing*
diff --git a/runtime/doc/debug.txt b/runtime/doc/debug.txt
index fd2c4fa54e..422255fa02 100644
--- a/runtime/doc/debug.txt
+++ b/runtime/doc/debug.txt
@@ -9,7 +9,7 @@ Debugging Vim *debug-vim*
This is for debugging Vim itself, when it doesn't work properly.
For debugging Vim scripts, functions, etc. see |debug-scripts|
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt
index 5d5523e73f..298f64bbee 100644
--- a/runtime/doc/develop.txt
+++ b/runtime/doc/develop.txt
@@ -11,7 +11,7 @@ Nvim is open source software. Everybody is encouraged to contribute.
See src/nvim/README.md for an overview of the source code.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
Design goals *design-goals*
diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt
index 74a3d183a3..8cb049584a 100644
--- a/runtime/doc/diff.txt
+++ b/runtime/doc/diff.txt
@@ -10,7 +10,7 @@ eight versions of the same file.
The basics are explained in section |08.7| of the user manual.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Starting diff mode
diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt
index 43f8ccab06..d3b03c6ef6 100644
--- a/runtime/doc/digraph.txt
+++ b/runtime/doc/digraph.txt
@@ -14,7 +14,7 @@ with CTRL-V (see |i_CTRL-V|).
There is a brief introduction on digraphs in the user manual: |24.9|
An alternative is using the 'keymap' option.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Defining digraphs *digraphs-define*
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index 8974a5c64e..a747058991 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -6,7 +6,7 @@
Editing files *edit-files*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Introduction *edit-intro*
@@ -901,11 +901,12 @@ WRITING WITH MULTIPLE BUFFERS *buffer-write*
*:wa* *:wall*
:wa[ll] Write all changed buffers. Buffers without a file
- name or which are readonly are not written.
+ name cause an error message. Buffers which are
+ readonly are not written.
:wa[ll]! Write all changed buffers, even the ones that are
readonly. Buffers without a file name are not
- written.
+ written and cause an error message.
Vim will warn you if you try to overwrite a file that has been changed
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index b37b0e8836..300bdd061e 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -12,7 +12,7 @@ Note: Expression evaluation can be disabled at compile time. If this has been
done, the features in this document are not available. See |+eval| and
|no-eval-feature|.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Variables *variables*
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 64d9c6daa9..7f1e98fed4 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -8,7 +8,7 @@ Filetypes *filetype* *file-type*
Also see |autocmd.txt|.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Filetypes *filetypes* *file-types*
@@ -540,7 +540,7 @@ K or CTRL-] Jump to the manpage for the <cWORD> under the
cursor. Takes a count for the section.
CTRL-T Jump back to the location that the manpage was
opened from.
-META-] Show the manpage outline in the |location-list|.
+gO Show the manpage outline. |gO|
q :quit if invoked as $MANPAGER, otherwise :close.
Variables:
diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt
index 88dde9f61d..42efb04d7a 100644
--- a/runtime/doc/fold.txt
+++ b/runtime/doc/fold.txt
@@ -9,7 +9,7 @@ Folding *Folding* *folding* *folds*
You can find an introduction on folding in chapter 28 of the user manual.
|usr_28.txt|
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Fold methods *fold-methods*
diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt
index b66a60c860..fb05f178ad 100644
--- a/runtime/doc/gui.txt
+++ b/runtime/doc/gui.txt
@@ -6,7 +6,7 @@
Vim's Graphical User Interface *gui* *GUI*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Starting the GUI *gui-start* *E229* *E233*
diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt
index 5948b24667..d86a95e854 100644
--- a/runtime/doc/helphelp.txt
+++ b/runtime/doc/helphelp.txt
@@ -6,7 +6,7 @@
Help on help files *helphelp*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Help commands *online-help*
@@ -23,7 +23,7 @@ Help on help files *helphelp*
The 'helplang' option is used to select a language, if
the main help file is available in several languages.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
*{subject}* *E149* *E661*
:h[elp] {subject} Like ":help", additionally jump to the tag {subject}.
diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt
index 831b2c9840..e359f2144c 100644
--- a/runtime/doc/if_cscop.txt
+++ b/runtime/doc/if_cscop.txt
@@ -12,7 +12,7 @@ a cscope query is just like jumping to any tag; it is saved on the tag stack
so that with the right keyboard mappings, you can jump back and forth between
functions as you normally would with |tags|.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Cscope introduction *cscope-intro*
diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt
index c4efd57b45..a123041866 100644
--- a/runtime/doc/if_lua.txt
+++ b/runtime/doc/if_lua.txt
@@ -1,26 +1,26 @@
*if_lua.txt* Nvim
- VIM REFERENCE MANUAL by Luis Carvalho
+ NVIM REFERENCE MANUAL
Lua Interface to Nvim *lua* *Lua*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
-1. Importing modules *lua-require*
+Importing modules *lua-require*
-Neovim lua interface automatically adjusts `package.path` and `package.cpath`
-according to effective &runtimepath value. Adjustment happens after
-'runtimepath' is changed. `package.path` is adjusted by simply appending
-`/lua/?.lua` and `/lua/?/init.lua` to each directory from 'runtimepath' (`/`
-is actually the first character of `package.config`).
+Nvim automatically adjusts `package.path` and `package.cpath` according to
+effective 'runtimepath' value. Adjustment happens whenever 'runtimepath' is
+changed. `package.path` is adjusted by simply appending `/lua/?.lua` and
+`/lua/?/init.lua` to each directory from 'runtimepath' (`/` is actually the
+first character of `package.config`).
-Similarly to `package.path`, modified directories from `runtimepath` are also
-added to `package.cpath`. In this case, instead of appending `/lua/?.lua` and
-`/lua/?/init.lua` to each runtimepath, all unique `?`-containing suffixes of
-the existing `package.cpath` are used. Here is an example:
+Similarly to `package.path`, modified directories from 'runtimepath' are also
+added to `package.cpath`. In this case, instead of appending `/lua/?.lua` and
+`/lua/?/init.lua` to each runtimepath, all unique `?`-containing suffixes of
+the existing `package.cpath` are used. Example:
1. Given that
- 'runtimepath' contains `/foo/bar,/xxx;yyy/baz,/abc`;
@@ -61,7 +61,7 @@ paths when path is removed from 'runtimepath', adding paths when they are
added and reordering `package.path`/`package.cpath` content if 'runtimepath'
was reordered.
-Note 2: even though adjustments happens automatically Neovim does not track
+Note 2: even though adjustments happens automatically Nvim does not track
current values of `package.path` or `package.cpath`. If you happened to
delete some paths from there you need to reset 'runtimepath' to make them
readded. Just running `let &runtimepath = &runtimepath` should work.
@@ -72,7 +72,7 @@ badly written plugins using shell which will not work with paths containing
semicolons it is better to not have them in 'runtimepath' at all.
------------------------------------------------------------------------------
-1.1. Example of the plugin which uses lua modules: *lua-require-example*
+Example of a plugin that uses lua modules *lua-require-example*
The following example plugin adds a command `:MakeCharBlob` which transforms
current buffer into a long `unsigned char` array. Lua contains transformation
@@ -149,7 +149,7 @@ lua/charblob.lua: >
}
==============================================================================
-2. Commands *lua-commands*
+Commands *lua-commands*
*:lua*
:[range]lua {chunk}
@@ -157,7 +157,7 @@ lua/charblob.lua: >
Examples:
>
- :lua vim.api.nvim_command('echo "Hello, Neovim!"')
+ :lua vim.api.nvim_command('echo "Hello, Nvim!"')
<
:[range]lua << {endmarker}
@@ -230,27 +230,80 @@ All these commands execute a Lua chunk from either the command line (:lua and
:luado) or a file (:luafile) with the given line [range]. Similarly to the Lua
interpreter, each chunk has its own scope and so only global variables are
shared between command calls. All Lua default libraries are available. In
-addition, Lua "print" function has its output redirected to the Vim message
+addition, Lua "print" function has its output redirected to the Nvim message
area, with arguments separated by a white space instead of a tab.
-Lua uses the "vim" module (see |lua-vim|) to issue commands to Neovim
+Lua uses the "vim" module (see |lua-vim|) to issue commands to Nvim
and manage buffers (|lua-buffer|) and windows (|lua-window|). However,
procedures that alter buffer content, open new buffers, and change cursor
position are restricted when the command is executed in the |sandbox|.
==============================================================================
-2. The vim module *lua-vim*
+The vim module *lua-vim*
-Lua interfaces Vim through the "vim" module. Currently it only has `api`
-submodule which is a table with all API functions. Descriptions of these
-functions may be found in |api.txt|.
+Lua interfaces Nvim through the "vim" module. Currently it has the `api`
+submodule and some Nvim-specific utilities.
+
+------------------------------------------------------------------------------
+vim.api.* functions
+
+`vim.api` exposes the Nvim |API| as a table of Lua functions. All functions
+are available.
+
+For example, to use the "nvim_get_current_line()" API function, call
+"vim.api.nvim_get_current_line()": >
+
+ print(tostring(vim.api.nvim_get_current_line()))
+
+------------------------------------------------------------------------------
+vim.* utility functions
+
+vim.stricmp(a, b) *lua-vim.stricmp*
+ Function used for case-insensitive string comparison. Takes two
+ string arguments and returns 0, 1 or -1 if strings are equal, a is
+ greater then b or a is lesser then b respectively.
+
+vim.type_idx *lua-vim.type_idx*
+ Type index for use in |lua-special-tables|. Specifying one of the
+ values from |lua-vim.types| allows typing the empty table (it is
+ unclear whether empty lua table represents empty list or empty array)
+ and forcing integral numbers to be |Float|. See |lua-special-tbl| for
+ more details.
+
+vim.val_idx *lua-vim.val_idx*
+ Value index for tables representing |Float|s. A table representing
+ floating-point value 1.0 looks like this: >
+ {
+ [vim.type_idx] = vim.types.float,
+ [vim.val_idx] = 1.0,
+ }
+< See also |lua-vim.type_idx| and |lua-special-tbl|.
+
+vim.types *lua-vim.types*
+ Table with possible values for |lua-vim.type_idx|. Contains two sets
+ of key-value pairs: first maps possible values for |lua-vim.type_idx|
+ to human-readable strings, second maps human-readable type names to
+ values for |lua-vim.type_idx|. Currently contains pairs for `float`,
+ `array` and `dictionary` types.
+
+ Note: one must expect that values corresponding to `vim.types.float`,
+ `vim.types.array` and `vim.types.dictionary` fall under only two
+ following assumptions:
+ 1. Value may serve both as a key and as a value in a table. Given the
+ properties of lua tables this basically means “value is not `nil`”.
+ 2. For each value in `vim.types` table `vim.types[vim.types[value]]`
+ is the same as `value`.
+ No other restrictions are put on types, and it is not guaranteed that
+ values corresponding to `vim.types.float`, `vim.types.array` and
+ `vim.types.dictionary` will not change or that `vim.types` table will
+ only contain values for these three types.
==============================================================================
-3. The luaeval function *lua-luaeval* *lua-eval*
+The luaeval function *lua-luaeval* *lua-eval*
*luaeval()*
-The (dual) equivalent of "vim.eval" for passing Lua values to Vim is
+The (dual) equivalent of "vim.eval" for passing Lua values to Nvim is
"luaeval". "luaeval" takes an expression string and an optional argument used
for _A inside expression and returns the result of the expression. It is
semantically equivalent in Lua to:
@@ -262,7 +315,7 @@ semantically equivalent in Lua to:
end
Note that "_A" receives the argument to "luaeval". Lua nils, numbers, strings,
-tables and booleans are converted to their Vim respective types. An error is
+tables and booleans are converted to their respective VimL types. An error is
thrown if conversion of any of the remaining Lua types is attempted.
Note 2: lua tables are used as both dictionaries and lists, thus making it
@@ -278,6 +331,7 @@ between these cases there is the following agreement:
3. Table with string keys, at least one of which contains NUL byte, is also
considered to be a dictionary, but this time it is converted to
a |msgpack-special-map|.
+ *lua-special-tbl*
4. Table with `vim.type_idx` key may be a dictionary, a list or floating-point
value:
- `{[vim.type_idx]=vim.types.float, [vim.val_idx]=1}` is converted to
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
index 8baa2d309b..8940e69092 100644
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -8,7 +8,7 @@ The Python Interface to Vim *python* *Python*
See |provider-python| for more information. {Nvim}
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Commands *python-commands*
diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt
index 54d81a958d..a657d88a44 100644
--- a/runtime/doc/if_ruby.txt
+++ b/runtime/doc/if_ruby.txt
@@ -10,7 +10,7 @@ The Ruby Interface to Vim *ruby* *Ruby*
The home page for ruby is http://www.ruby-lang.org/. You can find links for
downloading Ruby there.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Commands *ruby-commands*
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index 8e17de3fb0..cf45ec4f38 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -6,7 +6,7 @@
This file is about indenting C programs and other files.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Indenting C style programs *C-indenting*
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index c15587cffd..ad93dcb000 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -15,7 +15,7 @@ For an overview of built-in functions see |functions|.
For a list of Vim variables see |vim-variable|.
For a complete listing of all help items see |help-tags|.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Insert mode *insert-index*
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index 9219f45c83..9ef58fa54c 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -16,7 +16,7 @@ user manual |usr_24.txt|.
Also see 'virtualedit', for moving the cursor to positions where there is no
character. Useful for editing a table.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Special keys *ins-special-keys*
diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt
index b9cc94ce5f..90b0ff7da3 100644
--- a/runtime/doc/intro.txt
+++ b/runtime/doc/intro.txt
@@ -6,7 +6,7 @@
Introduction to Vim *ref* *reference*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Introduction *intro*
diff --git a/runtime/doc/job_control.txt b/runtime/doc/job_control.txt
index edbc1bca81..2cf48f0f4f 100644
--- a/runtime/doc/job_control.txt
+++ b/runtime/doc/job_control.txt
@@ -6,7 +6,7 @@
Nvim's facilities for job control *job-control*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Introduction *job-control-intro*
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 944f7474be..e78b4cc942 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -9,7 +9,7 @@ Key mapping, abbreviations and user-defined commands.
This subject is introduced in sections |05.3|, |24.7| and |40.1| of the user
manual.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Key mapping *key-mapping* *mapping* *macro*
diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt
index 2e2ca92656..531629fddc 100644
--- a/runtime/doc/mbyte.txt
+++ b/runtime/doc/mbyte.txt
@@ -14,7 +14,7 @@ For an introduction to the most common features, see |usr_45.txt| in the user
manual.
For changing the language of messages and menus see |mlang.txt|.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
Getting started *mbyte-first*
diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt
index 58ababf229..904b9dfce4 100644
--- a/runtime/doc/message.txt
+++ b/runtime/doc/message.txt
@@ -8,7 +8,7 @@ This file contains an alphabetical list of messages and error messages that
Vim produces. You can use this if you don't understand what the message
means. It is not complete though.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Old messages *:messages* *:mes* *message-history*
diff --git a/runtime/doc/mlang.txt b/runtime/doc/mlang.txt
index 717ec9530c..6453a96877 100644
--- a/runtime/doc/mlang.txt
+++ b/runtime/doc/mlang.txt
@@ -11,7 +11,7 @@ multi-byte text see |multibyte|.
The basics are explained in the user manual: |usr_45.txt|.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Messages *multilang-messages*
diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt
index 99aa76bfe5..81137b6069 100644
--- a/runtime/doc/motion.txt
+++ b/runtime/doc/motion.txt
@@ -26,7 +26,7 @@ The 'virtualedit' option can be set to make it possible to move the cursor to
positions where there is no character or within a multi-column character (like
a tab).
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Motions and operators *operator*
@@ -886,6 +886,7 @@ was made yet in the current file.
then the position can be near the end of what the
command changed. For example when inserting a word,
the position will be on the last character.
+ To jump to older changes use |g;|.
*'(* *`(*
'( `( To the start of the current sentence, like the |(|
diff --git a/runtime/doc/msgpack_rpc.txt b/runtime/doc/msgpack_rpc.txt
index 856476c6ae..7af6e401da 100644
--- a/runtime/doc/msgpack_rpc.txt
+++ b/runtime/doc/msgpack_rpc.txt
@@ -6,7 +6,7 @@
RPC API for Nvim *RPC* *rpc* *msgpack-rpc*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Introduction *rpc-intro*
@@ -243,203 +243,4 @@ Even for statically compiled clients it is good practice to avoid hardcoding
the type codes, because a client may be built against one Nvim version but
connect to another with different type codes.
-==============================================================================
-6. Remote UIs *rpc-remote-ui*
-
-GUIs can be implemented as external processes communicating with Nvim over the
-RPC API. The UI model consists of a terminal-like grid with a single,
-monospace font size. Some elements (UI "widgets") can be drawn separately from
-the grid ("externalized").
-
-After connecting to Nvim (usually a spawned, embedded instance) use the
-|nvim_ui_attach| API method to tell Nvim that your program wants to draw the
-Nvim screen on a grid of width × height cells. `options` must be
-a dictionary with these (optional) keys:
- `rgb` Controls what color format to use.
- Set to true (default) to use 24-bit rgb
- colors.
- Set to false to use terminal color codes (at
- most 256 different colors).
- `ext_popupmenu` Externalize the popupmenu. |ui-ext-popupmenu|
- `ext_tabline` Externalize the tabline. |ui-ext-tabline|
- Externalized widgets will not be drawn by
- Nvim; only high-level data will be published
- in new UI event kinds.
-
-Nvim will then send msgpack-rpc notifications, with the method name "redraw"
-and a single argument, an array of screen updates (described below). These
-should be processed in order. Preferably the user should only be able to see
-the screen state after all updates in the same "redraw" event are processed
-(not any intermediate state after processing only a part of the array).
-
-Future versions of Nvim may add new update kinds and may append new parameters
-to existing update kinds. Clients must be prepared to ignore such extensions
-to be forward-compatible. |api-contract|
-
-Screen updates are tuples whose first element is the string name of the update
-kind.
-
-["resize", width, height]
- The grid is resized to `width` and `height` cells.
-
-["clear"]
- Clear the screen.
-
-["eol_clear"]
- Clear from the cursor position to the end of the current line.
-
-["cursor_goto", row, col]
- Move the cursor to position (row, col). Currently, the same cursor is
- used to define the position for text insertion and the visible cursor.
- However, only the last cursor position, after processing the entire
- array in the "redraw" event, is intended to be a visible cursor
- position.
-
-["update_fg", color]
-["update_bg", color]
-["update_sp", color]
- Set the default foreground, background and special colors
- respectively.
-
-["highlight_set", attrs]
- Set the attributes that the next text put on the screen will have.
- `attrs` is a dict with the keys below. Any absent key is reset
- to its default value. Color defaults are set by the `update_fg` etc
- updates. All boolean keys default to false.
-
- `foreground`: foreground color.
- `background`: backround color.
- `special`: color to use for underline and undercurl, when present.
- `reverse`: reverse video. Foreground and background colors are
- switched.
- `italic`: italic text.
- `bold`: bold text.
- `underline`: underlined text. The line has `special` color.
- `undercurl`: undercurled text. The curl has `special` color.
-
-["put", text]
- The (utf-8 encoded) string `text` is put at the cursor position
- (and the cursor is advanced), with the highlights as set by the
- last `highlight_set` update.
-
-["set_scroll_region", top, bot, left, right]
- Define the scroll region used by `scroll` below.
-
-["scroll", count]
- Scroll the text in the scroll region. The diagrams below illustrate
- what will happen, depending on the scroll direction. "=" is used to
- represent the SR(scroll region) boundaries and "-" the moved rectangles.
- Note that dst and src share a common region.
-
- If count is bigger than 0, move a rectangle in the SR up, this can
- happen while scrolling down.
->
- +-------------------------+
- | (clipped above SR) | ^
- |=========================| dst_top |
- | dst (still in SR) | |
- +-------------------------+ src_top |
- | src (moved up) and dst | |
- |-------------------------| dst_bot |
- | src (cleared) | |
- +=========================+ src_bot
-<
- If count is less than zero, move a rectangle in the SR down, this can
- happen while scrolling up.
->
- +=========================+ src_top
- | src (cleared) | |
- |------------------------ | dst_top |
- | src (moved down) and dst| |
- +-------------------------+ src_bot |
- | dst (still in SR) | |
- |=========================| dst_bot |
- | (clipped below SR) | v
- +-------------------------+
-<
-["set_title", title]
-["set_icon", icon]
- Set the window title, and icon (minimized) window title, respectively.
- In windowing systems not distinguishing between the two, "set_icon"
- can be ignored.
-
-["mouse_on"]
-["mouse_off"]
- Tells the client whether mouse support, as determined by |'mouse'|
- option, is considered to be active in the current mode. This is mostly
- useful for a terminal frontend, or other situations where nvim mouse
- would conflict with other usages of the mouse. It is safe for a client
- to ignore this and always send mouse events.
-
-["busy_on"]
-["busy_off"]
- Nvim started or stopped being busy, and possibly not responsible to user
- input. This could be indicated to the user by hiding the cursor.
-
-["suspend"]
- |:suspend| command or |Ctrl-Z| mapping is used. A terminal client (or other
- client where it makes sense) could suspend itself. Other clients can
- safely ignore it.
-
-["bell"]
-["visual_bell"]
- Notify the user with an audible or visual bell, respectively.
-
-["update_menu"]
- The menu mappings changed.
-
-["mode_info_set", cursor_style_enabled, mode_info]
-`cursor_style_enabled` is a boolean indicating if the UI should set the cursor
-style. `mode_info` is a list of mode property maps. The current mode is given
-by the `mode_idx` field of the `mode_change` event.
-
-Each mode property map may contain these keys:
- KEY DESCRIPTION ~
- `cursor_shape`: "block", "horizontal", "vertical"
- `cell_percentage`: Cell % occupied by the cursor.
- `blinkwait`, `blinkon`, `blinkoff`: See |cursor-blinking|.
- `hl_id`: Cursor highlight group.
- `hl_lm`: Cursor highlight group if 'langmap' is active.
- `short_name`: Mode code name, see 'guicursor'.
- `name`: Mode descriptive name.
- `mouse_shape`: (To be implemented.)
-
-Some keys are missing in some modes.
-
-["mode_change", mode, mode_idx]
-The mode changed. The first parameter `mode` is a string representing the
-current mode. `mode_idx` is an index into the array received in the
-`mode_info_set` event. UIs should change the cursor style according to the
-properties specified in the corresponding item. The set of modes reported will
-change in new versions of Nvim, for instance more submodes and temporary
-states might be represented as separate modes.
-
- *ui-ext-popupmenu*
-["popupmenu_show", items, selected, row, col]
- When `popupmenu_external` is set to true, nvim will not draw the
- popupmenu on the grid, instead when the popupmenu is to be displayed
- this update is sent. `items` is an array of the items to show, the
- items are themselves arrays of the form [word, kind, menu, info]
- as defined at |complete-items|, except that `word` is replaced by
- `abbr` if present. `selected` is the initially selected item, either a
- zero-based index into the array of items, or -1 if no item is
- selected. `row` and `col` is the anchor position, where the first
- character of the completed word will be.
-
-["popupmenu_select", selected]
- An item in the currently displayed popupmenu is selected. `selected`
- is either a zero-based index into the array of items from the last
- `popupmenu_show` event, or -1 if no item is selected.
-
-["popupmenu_hide"]
- The popupmenu is hidden.
-
- *ui-ext-tabline*
-["tabline_update", curtab, tabs]
- Tabline was updated. UIs should present this data in a custom tabline
- widget.
- curtab: Current Tabpage
- tabs: List of Dicts [{ "tab": Tabpage, "name": String }, ...]
-==============================================================================
- vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/nvim.txt b/runtime/doc/nvim.txt
index f3f4305ad5..2420227f6c 100644
--- a/runtime/doc/nvim.txt
+++ b/runtime/doc/nvim.txt
@@ -15,7 +15,7 @@ Nvim is emphatically a fork of Vim, not a clone: compatibility with Vim is
maintained where possible. See |vim_diff.txt| for the complete reference of
differences from Vim.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
Transitioning from Vim *nvim-from-vim*
diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt
index 4527a14710..9dae69ae26 100644
--- a/runtime/doc/nvim_terminal_emulator.txt
+++ b/runtime/doc/nvim_terminal_emulator.txt
@@ -18,7 +18,7 @@ Terminal buffers behave like normal buffers, except:
closing the terminal buffer.
- 'bufhidden' defaults to "hide".
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
Start *terminal-start*
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index d55eb7405c..4df08ca5fb 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -14,7 +14,7 @@ achieve special effects. These options come in three forms:
number has a numeric value
string has a string value
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Setting options *set-option* *E764*
@@ -187,7 +187,7 @@ opt+=val" the expansion is done before the adding or removing.
Handling of local options *local-options*
Some of the options only apply to a window or buffer. Each window or buffer
-has its own copy of this option, thus can each have their own value. This
+has its own copy of this option, thus each can have its own value. This
allows you to set 'list' in one window but not in another. And set
'shiftwidth' to 3 in one buffer and 4 in another.
@@ -3017,6 +3017,8 @@ A jump table for the options with a short description can be found at |Q_op|.
The format of this option is like that of 'statusline'.
'guitabtooltip' is used for the tooltip, see below.
+ The expression will be evaluated in the |sandbox| when set from a
+ modeline, see |sandbox-option|.
Only used when the GUI tab pages line is displayed. 'e' must be
present in 'guioptions'. For the non-GUI tab pages line 'tabline' is
@@ -4482,6 +4484,8 @@ A jump table for the options with a short description can be found at |Q_op|.
and |+postscript| features}
Expression used to print the PostScript produced with |:hardcopy|.
See |pexpr-option|.
+ This option cannot be set from a |modeline| or in the |sandbox|, for
+ security reasons.
*'printfont'* *'pfn'*
'printfont' 'pfn' string (default "courier")
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index f7f561dfa5..8243a3ca7d 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -9,7 +9,7 @@ Patterns and search commands *pattern-searches*
The very basics can be found in section |03.9| of the user manual. A few more
explanations are in chapter 27 |usr_27.txt|.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Search commands *search-commands*
diff --git a/runtime/doc/pi_health.txt b/runtime/doc/pi_health.txt
index f77267288c..99ff519bb9 100644
--- a/runtime/doc/pi_health.txt
+++ b/runtime/doc/pi_health.txt
@@ -2,53 +2,45 @@
Author: TJ DeVries <devries.timothyj@gmail.com>
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
-Introduction *healthcheck* *health.vim-intro*
+Introduction *health*
-Troubleshooting user configuration problems is a time-consuming task that
-developers want to minimize. health.vim provides a simple framework for plugin
-authors to hook into, and for users to invoke, to check and report the user's
-configuration and environment. Type this command to try it: >
+health.vim is a minimal framework to help with troubleshooting user
+configuration. Nvim ships with healthchecks for configuration, performance,
+python support, ruby support, clipboard support, and more.
- :CheckHealth
-<
-For example, some users have broken or unusual Python setups, which breaks the
-|:python| command. |:CheckHealth| detects several common Python configuration
-problems and reports them. If the Neovim Python module is not installed, it
-shows a warning: >
+To run the healthchecks, use this command: >
- You have not installed the Neovim Python module
- You might want to try `pip install Neovim`
-<
-Plugin authors are encouraged to add healthchecks, see |health.vim-dev|.
+ :checkhealth
+<
+Plugin authors are encouraged to write new healthchecks. |health-dev|
==============================================================================
-Commands and functions *health.vim-manual*
-
-Commands
-------------------------------------------------------------------------------
- *:CheckHealth*
-:CheckHealth Run all healthchecks and show the output in a new
- tabpage. These healthchecks are included by default:
- - python2
- - python3
- - ruby
- - remote plugin
-
-:CheckHealth {plugins}
- Run healthchecks for one or more plugins. E.g. to run
+Commands *health-commands*
+
+ *:checkhealth* *:CheckHealth*
+:checkhealth Run all healthchecks.
+ *E5009*
+ Nvim depends on the |$VIMRUNTIME| environment variable
+ to find the standard "runtime files" for syntax
+ highlighting, filetype-specific behavior, and standard
+ plugins such as :checkhealth. If $VIMRUNTIME is invalid
+ then those features will not work.
+
+:checkhealth {plugins}
+ Run healthcheck(s) for one or more plugins. E.g. to run
only the standard Nvim healthcheck: >
- :CheckHealth nvim
+ :checkhealth nvim
< To run the healthchecks for the "foo" and "bar" plugins
(assuming these plugins are on your 'runtimepath' and
they have implemented health#foo#check() and
health#bar#check(), respectively): >
- :CheckHealth foo bar
+ :checkhealth foo bar
<
-Functions
-------------------------------------------------------------------------------
+==============================================================================
+Functions *health-functions*
health.vim functions are for creating new healthchecks. They mostly just do
some layout and formatting, to give users a consistent presentation.
@@ -59,51 +51,49 @@ health#report_start({name}) *health#report_start*
per section.
health#report_info({msg}) *health#report_info*
- Displays an informational message.
+ Reports an informational message.
health#report_ok({msg}) *health#report_ok*
- Displays a "success" message.
+ Reports a "success" message.
health#report_warn({msg}, [{advice}]) *health#report_warn*
- Displays a warning. {advice} is an optional List of suggestions.
+ Reports a warning. {advice} is an optional List of suggestions.
health#report_error({msg}, [{advice}]) *health#report_error*
- Displays an error. {advice} is an optional List of suggestions.
+ Reports an error. {advice} is an optional List of suggestions.
health#{plugin}#check() *health.user_checker*
- This is the form of a healthcheck definition. Call the above functions
- from this function, then |:CheckHealth| does the rest. Example: >
+ Healthcheck function for {plugin}. Called by |:checkhealth|
+ automatically. Example: >
function! health#my_plug#check() abort
silent call s:check_environment_vars()
silent call s:check_python_configuration()
endfunction
<
- The function will be found and called automatically when the user
- invokes |:CheckHealth|.
-
All output will be captured from the healthcheck. Use the
health#report_* functions so that your healthcheck has a format
consistent with the standard healthchecks.
==============================================================================
-Create a healthcheck *health.vim-dev*
+Create a healthcheck *health-dev*
-Healthchecks are functions that check the health of the system. Neovim has
-built-in checkers, found in $VIMRUNTIME/autoload/health/.
+Healthchecks are functions that check the user environment, configuration,
+etc. Nvim has built-in healthchecks in $VIMRUNTIME/autoload/health/.
-To add a new checker for your own plugin, simply define a
+To add a new healthcheck for your own plugin, simply define a
health#{plugin}#check() function in autoload/health/{plugin}.vim.
-|:CheckHealth| automatically finds and invokes such functions.
+|:checkhealth| automatically finds and invokes such functions.
-If your plugin is named "jslint", then its healthcheck function must be >
- health#jslint#check()
+If your plugin is named "foo", then its healthcheck function must be >
+ health#foo#check()
defined in this file on 'runtimepath': >
- autoload/health/jslint.vim
+ autoload/health/foo.vim
-Here's a sample to get started: >
- function! health#jslint#check() abort
+Copy this sample code into autoload/health/foo.vim and replace "foo" with your
+plugin name: >
+ function! health#foo#check() abort
call health#report_start('sanity checks')
" perform arbitrary checks
" ...
@@ -111,8 +101,8 @@ Here's a sample to get started: >
if looks_good
call health#report_ok('found required dependencies')
else
- call health#report_error('cannot find jslint',
- \ ['npm install --save jslint'])
+ call health#report_error('cannot find foo',
+ \ ['npm install --save foo'])
endif
endfunction
diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt
index 01de3a5290..72625a450a 100644
--- a/runtime/doc/print.txt
+++ b/runtime/doc/print.txt
@@ -6,7 +6,7 @@
Printing *printing*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Introduction *print-intro*
diff --git a/runtime/doc/provider.txt b/runtime/doc/provider.txt
index 50307ccbf3..02f3fcab6c 100644
--- a/runtime/doc/provider.txt
+++ b/runtime/doc/provider.txt
@@ -8,7 +8,7 @@ Providers *provider*
Nvim delegates some features to dynamic "providers".
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
Python integration *provider-python*
@@ -20,7 +20,7 @@ Note: Only the Vim 7.3 API is supported; bindeval (Vim 7.4) is not.
PYTHON QUICKSTART ~
If you used a package manager to install Nvim, you might already have the
-required `neovim` Python package. Run |:CheckHealth| to see if your system is
+required `neovim` Python package. Run |:checkhealth| to see if your system is
up-to-date.
Following are steps to install the package with Python's `pip` tool.
@@ -88,7 +88,7 @@ Ruby integration *provider-ruby*
Nvim supports the Vim legacy |ruby-vim| interface via external Ruby
interpreters connected via |RPC|.
-Run |:CheckHealth| to see if your system is up-to-date.
+Run |:checkhealth| to see if your system is up-to-date.
RUBY QUICKSTART ~
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index cad5bf98b5..a647318347 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -6,7 +6,7 @@
This subject is introduced in section |30.1| of the user manual.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
=============================================================================
1. Using QuickFix commands *quickfix* *Quickfix* *E42*
@@ -138,11 +138,15 @@ processing a quickfix or location list command, it will be aborted.
current window is used instead of the quickfix list.
*:cq* *:cquit*
-:cq[uit][!] Quit Vim with an error code, so that the compiler
- will not compile the same file again.
- WARNING: All changes in files are lost! Also when the
- [!] is not used. It works like ":qall!" |:qall|,
- except that Vim returns a non-zero exit code.
+:[count]cq[uit] Quit Nvim with an error code, or the code specified in
+ [count]. Useful when Nvim is called from another
+ program: e.g. `git commit` will abort the comitting
+ process, `fc` (built-in for shells like bash and zsh)
+ will not execute the command.
+
+ WARNING: All changes in files are lost. It works like
+ ":qall!" |:qall|, except that Nvim exits non-zero or
+ [count].
*:cf* *:cfile*
:cf[ile][!] [errorfile] Read the error file and jump to the first error.
@@ -1534,4 +1538,4 @@ by Vim.
- vim:tw=78:ts=8:ft=help:norl:
+ vim:noet:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt
index 2b49af1c96..0533157072 100644
--- a/runtime/doc/recover.txt
+++ b/runtime/doc/recover.txt
@@ -15,7 +15,7 @@ You can recover most of your changes from the files that Vim uses to store
the contents of the file. Mostly you can recover your work with one command:
vim -r filename
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. The swap file *swap-file*
diff --git a/runtime/doc/remote.txt b/runtime/doc/remote.txt
index bdc763b85f..67bfb0b48e 100644
--- a/runtime/doc/remote.txt
+++ b/runtime/doc/remote.txt
@@ -6,7 +6,7 @@
Vim client-server communication *client-server*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Common functionality *clientserver*
diff --git a/runtime/doc/remote_plugin.txt b/runtime/doc/remote_plugin.txt
index cc2efd3d1f..eeb9cf8150 100644
--- a/runtime/doc/remote_plugin.txt
+++ b/runtime/doc/remote_plugin.txt
@@ -6,7 +6,7 @@
Nvim support for remote plugins *remote-plugin*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Introduction *remote-plugin-intro*
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt
index 0b3edc9bba..421ebab100 100644
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -8,7 +8,7 @@ Repeating commands, Vim scripts and debugging *repeating*
Chapter 26 of the user manual introduces repeating |usr_26.txt|.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Single repeats *single-repeat*
diff --git a/runtime/doc/russian.txt b/runtime/doc/russian.txt
index e2c44ce54f..8c6076146c 100644
--- a/runtime/doc/russian.txt
+++ b/runtime/doc/russian.txt
@@ -6,7 +6,7 @@
Russian language localization and support in Vim *russian* *Russian*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
===============================================================================
1. Introduction *russian-intro*
diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt
index 52e5cc9f0c..56af9ab75e 100644
--- a/runtime/doc/scroll.txt
+++ b/runtime/doc/scroll.txt
@@ -16,7 +16,7 @@ upwards in the buffer, the text in the window moves downwards on your screen.
See section |03.7| of the user manual for an introduction.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Scrolling downwards *scroll-down*
diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt
index ced0608e8a..977d73b7b2 100644
--- a/runtime/doc/sign.txt
+++ b/runtime/doc/sign.txt
@@ -7,7 +7,7 @@
Sign Support Features *sign-support*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Introduction *sign-intro* *signs*
diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt
index 5c99db42ba..f2be25097c 100644
--- a/runtime/doc/spell.txt
+++ b/runtime/doc/spell.txt
@@ -6,7 +6,7 @@
Spell checking *spell*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Quick start *spell-quickstart* *E756*
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 4cfc98d5b6..7aba84b454 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -6,7 +6,7 @@
Starting Vim *starting*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Vim arguments *vim-arguments*
@@ -633,54 +633,40 @@ though.
==============================================================================
3. $VIM and $VIMRUNTIME
*$VIM*
-The environment variable "$VIM" is used to locate various user files for Vim,
+The environment variable "$VIM" is used to locate various user files for Nvim,
such as the user startup script |init.vim|. This depends on the system, see
|startup|.
-To avoid the need for every user to set the $VIM environment variable, Vim
-will try to get the value for $VIM in this order:
-1. The value defined by the $VIM environment variable. You can use this to
- make Vim look in a specific directory for its support files. Example: >
- setenv VIM /home/paul/vim
-2. The path from 'helpfile' is used, unless it contains some environment
- variable too (the default is "$VIMRUNTIME/doc/help.txt": chicken-egg
- problem). The file name ("help.txt" or any other) is removed. Then
- trailing directory names are removed, in this order: "doc", "runtime" and
- "vim{version}" (e.g., "vim54").
-3. For MSDOS and Win32 Vim tries to use the directory name of the
- executable. If it ends in "/src", this is removed. This is useful if you
- unpacked the .zip file in some directory, and adjusted the search path to
- find the vim executable. Trailing directory names are removed, in this
- order: "runtime" and "vim{version}" (e.g., "vim54").
-4. For Unix the compile-time defined installation directory is used (see the
- output of ":version").
-
-Once Vim has done this once, it will set the $VIM environment variable. To
-change it later, use a ":let" command like this: >
- :let $VIM = "/home/paul/vim/"
-<
+Nvim will try to get the value for $VIM in this order:
+
+1. Environment variable $VIM, if it is set.
+2. Path derived from the 'helpfile' option, unless it contains some
+ environment variable too (default is "$VIMRUNTIME/doc/help.txt"). File
+ name ("help.txt", etc.) is removed. Trailing directory names are removed,
+ in this order: "doc", "runtime".
+3. Path derived from the location of the `nvim` executable.
+4. Compile-time defined installation directory (see output of ":version").
+
+After doing this once, Nvim sets the $VIM environment variable.
+
*$VIMRUNTIME*
The environment variable "$VIMRUNTIME" is used to locate various support
-files, such as the on-line documentation and files used for syntax
-highlighting. For example, the main help file is normally
-"$VIMRUNTIME/doc/help.txt".
-You don't normally set $VIMRUNTIME yourself, but let Vim figure it out. This
-is the order used to find the value of $VIMRUNTIME:
-1. If the environment variable $VIMRUNTIME is set, it is used. You can use
- this when the runtime files are in an unusual location.
-2. If "$VIM/vim{version}" exists, it is used. {version} is the version
- number of Vim, without any '-' or '.'. For example: "$VIM/vim54". This is
- the normal value for $VIMRUNTIME.
-3. If "$VIM/runtime" exists, it is used.
-4. The value of $VIM is used. This is for backwards compatibility with older
- versions.
+files, such as the documentation and syntax-highlighting files. For example,
+the main help file is normally "$VIMRUNTIME/doc/help.txt".
+
+Nvim will try to get the value for $VIMRUNTIME in this order:
+
+1. Environment variable $VIMRUNTIME, if it is set.
+2. Directory path "$VIM/vim{version}", if it exists, where {version} is the
+ Vim version number without '-' or '.'. For example: "$VIM/vim54".
+3. Directory path "$VIM/runtime", if it exists.
+4. Value of $VIM environment variable. This is for backwards compatibility
+ with older Vim versions.
5. If "../share/nvim/runtime" exists relative to |v:progpath|, it is used.
-6. When the 'helpfile' option is set and doesn't contain a '$', its value is
- used, with "doc/help.txt" removed from the end.
+6. Path derived from the 'helpfile' option (if it doesn't contain '$') with
+ "doc/help.txt" removed from the end.
-Once Vim has done this once, it will set the $VIMRUNTIME environment variable.
-To change it later, use a ":let" command like this: >
- :let $VIMRUNTIME = "/home/piet/vim/vim54"
+After doing this once, Nvim sets the $VIMRUNTIME environment variable.
In case you need the value of $VIMRUNTIME in a shell (e.g., for a script that
greps in the help files) you might be able to use this: >
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 73841edb09..cbaa2916e6 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -20,7 +20,7 @@ In the User Manual:
|usr_06.txt| introduces syntax highlighting.
|usr_44.txt| introduces writing a syntax file.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Quick start *:syn-qstart*
diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt
index 8f1eb9d8cd..6be7cf9746 100644
--- a/runtime/doc/tabpage.txt
+++ b/runtime/doc/tabpage.txt
@@ -10,7 +10,7 @@ The commands which have been added to use multiple tab pages are explained
here. Additionally, there are explanations for commands that work differently
when used in combination with more than one tab page.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Introduction *tab-page-intro*
diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt
index d5a4f4e627..1ceb602512 100644
--- a/runtime/doc/tagsrch.txt
+++ b/runtime/doc/tagsrch.txt
@@ -8,7 +8,7 @@ Tags and special searches *tags-and-searches*
See section |29.1| of the user manual for an introduction.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Jump to a tag *tag-commands*
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index 39eb0673c4..a694185fc9 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -10,7 +10,7 @@ Nvim (except in |--headless| mode) uses information about the terminal you are
using to present a built-in UI. If that information is not correct, the
screen may be messed up or keys may not be recognized.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
Startup *startup-terminal*
diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt
index 0ac9a8303d..011e0f0565 100644
--- a/runtime/doc/tips.txt
+++ b/runtime/doc/tips.txt
@@ -13,7 +13,7 @@ http://www.vim.org
Don't forget to browse the user manual, it also contains lots of useful tips
|usr_toc.txt|.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
Editing C programs *C-editing*
diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt
new file mode 100644
index 0000000000..deac1609c0
--- /dev/null
+++ b/runtime/doc/ui.txt
@@ -0,0 +1,290 @@
+*ui.txt* Nvim
+
+
+ NVIM REFERENCE MANUAL
+
+
+Nvim UI protocol *ui*
+
+ Type |gO| to see the table of contents.
+
+==============================================================================
+Introduction *ui-intro*
+
+GUIs can be implemented as external processes communicating with Nvim over the
+RPC API. The UI model consists of a terminal-like grid with a single,
+monospace font size. Some elements (UI "widgets") can be drawn separately from
+the grid ("externalized").
+
+ *ui-options*
+After connecting to Nvim (usually a spawned, embedded instance) use the
+|nvim_ui_attach| API method to tell Nvim that your program wants to draw the
+Nvim screen grid with a size of width × height cells. `options` must be
+a dictionary with these (optional) keys:
+ `rgb` Decides the color format.
+ Set true (default) for 24-bit RGB colors.
+ Set false for terminal colors (max of 256).
+ *ui-ext-options*
+ `ext_popupmenu` Externalize the popupmenu. |ui-popupmenu|
+ `ext_tabline` Externalize the tabline. |ui-tabline|
+ `ext_cmdline` Externalize the cmdline. |ui-cmdline|
+
+Nvim will then send msgpack-rpc notifications, with the method name "redraw"
+and a single argument, an array of screen update events.
+Update events are tuples whose first element is the event name and remaining
+elements the event parameters.
+
+Events must be handled in order. The user should only see the updated screen
+state after all events in the same "redraw" batch are processed (not any
+intermediate state after processing only part of the array).
+
+Nvim sends |ui-global| and |ui-grid| events unconditionally; these suffice to
+implement a terminal-like interface.
+
+Nvim optionally sends screen elements "semantically" as structured events
+instead of raw grid-lines. Then the UI must decide how to present those
+elements itself; Nvim will not draw those elements on the grid. This is
+controlled by the |ui-ext-options|.
+
+Future versions of Nvim may add new update kinds and may append new parameters
+to existing update kinds. Clients must be prepared to ignore such extensions
+to be forward-compatible. |api-contract|
+
+==============================================================================
+Global Events *ui-global*
+
+["set_title", title]
+["set_icon", icon]
+ Set the window title, and icon (minimized) window title, respectively.
+ In windowing systems not distinguishing between the two, "set_icon"
+ can be ignored.
+
+["mode_info_set", cursor_style_enabled, mode_info]
+ `cursor_style_enabled` is a boolean indicating if the UI should set
+ the cursor style. `mode_info` is a list of mode property maps. The
+ current mode is given by the `mode_idx` field of the `mode_change`
+ event.
+
+ Each mode property map may contain these keys:
+
+ KEY DESCRIPTION ~
+ `cursor_shape`: "block", "horizontal", "vertical"
+ `cell_percentage`: Cell % occupied by the cursor.
+ `blinkwait`, `blinkon`, `blinkoff`: See |cursor-blinking|.
+ `hl_id`: Cursor highlight group.
+ `hl_lm`: Cursor highlight group if 'langmap' is active.
+ `short_name`: Mode code name, see 'guicursor'.
+ `name`: Mode descriptive name.
+ `mouse_shape`: (To be implemented.)
+
+ Some keys are missing in some modes.
+
+["mode_change", mode, mode_idx]
+ The mode changed. The first parameter `mode` is a string representing
+ the current mode. `mode_idx` is an index into the array received in
+ the `mode_info_set` event. UIs should change the cursor style
+ according to the properties specified in the corresponding item. The
+ set of modes reported will change in new versions of Nvim, for
+ instance more submodes and temporary states might be represented as
+ separate modes.
+
+["mouse_on"]
+["mouse_off"]
+ Tells the client whether mouse support, as determined by |'mouse'|
+ option, is considered to be active in the current mode. This is mostly
+ useful for a terminal frontend, or other situations where nvim mouse
+ would conflict with other usages of the mouse. It is safe for a client
+ to ignore this and always send mouse events.
+
+["busy_on"]
+["busy_off"]
+ Nvim started or stopped being busy, and possibly not responsive to
+ user input. This could be indicated to the user by hiding the cursor.
+
+["suspend"]
+ |:suspend| command or |Ctrl-Z| mapping is used. A terminal client (or other
+ client where it makes sense) could suspend itself. Other clients can
+ safely ignore it.
+
+["update_menu"]
+ The menu mappings changed.
+
+["bell"]
+["visual_bell"]
+ Notify the user with an audible or visual bell, respectively.
+
+==============================================================================
+Grid Events *ui-grid*
+
+["resize", width, height]
+ The grid is resized to `width` and `height` cells.
+
+["clear"]
+ Clear the grid.
+
+["eol_clear"]
+ Clear from the cursor position to the end of the current line.
+
+["cursor_goto", row, col]
+ Move the cursor to position (row, col). Currently, the same cursor is
+ used to define the position for text insertion and the visible cursor.
+ However, only the last cursor position, after processing the entire
+ array in the "redraw" event, is intended to be a visible cursor
+ position.
+
+["update_fg", color]
+["update_bg", color]
+["update_sp", color]
+ Set the default foreground, background and special colors
+ respectively.
+
+ *ui-event-highlight_set*
+["highlight_set", attrs]
+ Set the attributes that the next text put on the grid will have.
+ `attrs` is a dict with the keys below. Any absent key is reset
+ to its default value. Color defaults are set by the `update_fg` etc
+ updates. All boolean keys default to false.
+
+ `foreground`: foreground color.
+ `background`: backround color.
+ `special`: color to use for underline and undercurl, when present.
+ `reverse`: reverse video. Foreground and background colors are
+ switched.
+ `italic`: italic text.
+ `bold`: bold text.
+ `underline`: underlined text. The line has `special` color.
+ `undercurl`: undercurled text. The curl has `special` color.
+
+["put", text]
+ The (utf-8 encoded) string `text` is put at the cursor position
+ (and the cursor is advanced), with the highlights as set by the
+ last `highlight_set` update.
+
+["set_scroll_region", top, bot, left, right]
+ Define the scroll region used by `scroll` below.
+
+["scroll", count]
+ Scroll the text in the scroll region. The diagrams below illustrate
+ what will happen, depending on the scroll direction. "=" is used to
+ represent the SR(scroll region) boundaries and "-" the moved rectangles.
+ Note that dst and src share a common region.
+
+ If count is bigger than 0, move a rectangle in the SR up, this can
+ happen while scrolling down.
+>
+ +-------------------------+
+ | (clipped above SR) | ^
+ |=========================| dst_top |
+ | dst (still in SR) | |
+ +-------------------------+ src_top |
+ | src (moved up) and dst | |
+ |-------------------------| dst_bot |
+ | src (cleared) | |
+ +=========================+ src_bot
+<
+ If count is less than zero, move a rectangle in the SR down, this can
+ happen while scrolling up.
+>
+ +=========================+ src_top
+ | src (cleared) | |
+ |------------------------ | dst_top |
+ | src (moved down) and dst| |
+ +-------------------------+ src_bot |
+ | dst (still in SR) | |
+ |=========================| dst_bot |
+ | (clipped below SR) | v
+ +-------------------------+
+<
+==============================================================================
+Popupmenu Events *ui-popupmenu*
+
+Only sent if `ext_popupmenu` option is set in |ui-options|
+
+["popupmenu_show", items, selected, row, col]
+ `items` is an array of the items to show, the
+ items are themselves arrays of the form [word, kind, menu, info]
+ as defined at |complete-items|, except that `word` is replaced by
+ `abbr` if present. `selected` is the initially selected item, either a
+ zero-based index into the array of items, or -1 if no item is
+ selected. `row` and `col` is the anchor position, where the first
+ character of the completed word will be.
+
+["popupmenu_select", selected]
+ An item in the currently displayed popupmenu is selected. `selected`
+ is either a zero-based index into the array of items from the last
+ `popupmenu_show` event, or -1 if no item is selected.
+
+["popupmenu_hide"]
+ The popupmenu is hidden.
+
+==============================================================================
+Tabline Events *ui-tabline*
+
+Only sent if `ext_tabline` option is set in |ui-options|
+
+["tabline_update", curtab, tabs]
+ Tabline was updated. UIs should present this data in a custom tabline
+ widget.
+ curtab: Current Tabpage
+ tabs: List of Dicts [{ "tab": Tabpage, "name": String }, ...]
+
+==============================================================================
+Cmdline Events *ui-cmdline*
+
+Only sent if `ext_cmdline` option is set in |ui-options|
+
+["cmdline_show", content, pos, firstc, prompt, indent, level]
+ content: List of [attrs, string]
+ [[{}, "t"], [attrs, "est"], ...]
+
+ Triggered when the user types in the cmdline.
+ The `content` is the full content that should be displayed in the
+ cmdline, and the `pos` is the position of the cursor that in the
+ cmdline. The content is divided into chunks with different highlight
+ attributes represented as a dict (see |ui-event-highlight_set|).
+
+ `firstc` and `prompt` are text, that if non-empty should be
+ displayed in front of the command line. `firstc` always indicates
+ built-in command lines such as `:` (ex command) and `/` `?` (search),
+ while `prompt` is an |input()| prompt. `indent` tells how many spaces
+ the content should be indented.
+
+ The Nvim command line can be invoked recursively, for instance by
+ typing `<c-r>=` at the command line prompt. The `level` field is used
+ to distinguish different command lines active at the same time. The
+ first invoked command line has level 1, the next recursively-invoked
+ prompt has level 2. A command line invoked from the |cmd-line-window|
+ has a higher level than than the edited command line.
+
+["cmdline_pos", pos, level]
+ Change the cursor position in the cmdline.
+
+["cmdline_special_char", c, shift, level]
+ Display a special char in the cmdline at the cursor position. This is
+ typically used to indicate a pending state, e.g. after |c_CTRL-V|. If
+ `shift` is true the text after the cursor should be shifted, otherwise
+ it should overwrite the char at the cursor.
+
+ Should be hidden at next cmdline_pos.
+
+["cmdline_hide"]
+ Hide the cmdline.
+
+["cmdline_block_show", lines]
+ Show a block of context to the current command line. For example if
+ the user defines a |:function| interactively: >
+ :function Foo()
+ : echo "foo"
+ :
+<
+ `lines` is a list of lines of highlighted chunks, in the same form as
+ the "cmdline_show" `contents` parameter.
+
+["cmdline_block_append", line]
+ Append a line at the end of the currently shown block.
+
+["cmdline_block_hide"]
+ Hide the block.
+
+==============================================================================
+ vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/undo.txt b/runtime/doc/undo.txt
index cbce868cec..f8f6049119 100644
--- a/runtime/doc/undo.txt
+++ b/runtime/doc/undo.txt
@@ -8,7 +8,7 @@ Undo and redo *undo-redo*
The basics are explained in section |02.5| of the user manual.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Undo and redo commands *undo-commands*
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 223a0135b2..9150f3a809 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -6,7 +6,7 @@
Various commands *various*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Various commands *various-cmds*
@@ -608,6 +608,13 @@ which it was defined is reported.
the keyword. Only works when the highlighted text is
not more than one line.
+ *gO*
+gO Show a filetype-specific, navigable "outline" of the
+ current buffer. For example, in a |help| buffer this
+ shows the table of contents.
+
+ Currently works in |help| and |:Man| buffers.
+
[N]gs *gs* *:sl* *:sleep*
:[N]sl[eep] [N] [m] Do nothing for [N] seconds. When [m] is included,
sleep for [N] milliseconds. The count for "gs" always
@@ -646,4 +653,4 @@ LessInitFunc in your vimrc, for example: >
endfunc
<
- vim:tw=78:ts=8:ft=help:norl:
+ vim:noet:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt
index b8bfcaa586..917e0e6f80 100644
--- a/runtime/doc/vi_diff.txt
+++ b/runtime/doc/vi_diff.txt
@@ -6,7 +6,7 @@
Differences between Vim and Vi *vi-differences*
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Limits *limits*
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 861fa65c3a..c92fcd8994 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -9,7 +9,7 @@ Differences between Nvim and Vim *vim-differences*
Nvim differs from Vim in many ways, big and small. This document is
a complete and centralized reference of those differences.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Configuration *nvim-configuration*
@@ -100,7 +100,7 @@ by Nvim developers.
FEATURES ~
-"Outline": Type <M-]> in |:Man| and |:help| pages to see a document outline.
+"Outline": Type |gO| in |:Man| and |:help| pages to see a document outline.
|META| (ALT) chords are recognized, even in the terminal. Any |<M-| mapping
will work. Some examples: <M-1>, <M-2>, <M-BS>, <M-Del>, <M-Ins>, <M-/>,
@@ -127,7 +127,7 @@ Variables:
|v:windowid| is always available (for use by external UIs)
Commands:
- |:CheckHealth|
+ |:checkhealth|
|:drop| is available on all platforms
|:Man| is available by default, with many improvements such as completion
@@ -281,8 +281,8 @@ other arguments if used).
|input()| and |inputdialog()| support user-defined cmdline highlighting.
Highlight groups:
- |hl-ColorColumn|, |hl-CursorColumn|, |hl-CursorLine| are lower priority than
- (overridden by) most other highlight groups.
+ |hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other
+ groups
==============================================================================
5. Missing legacy features *nvim-features-missing*
diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt
index cf804444e5..6c4d44edb6 100644
--- a/runtime/doc/visual.txt
+++ b/runtime/doc/visual.txt
@@ -11,7 +11,7 @@ operator. It is the only way to select a block of text.
This is introduced in section |04.4| of the user manual.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Using Visual mode *visual-use*
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index f5d5321a5e..c37362a497 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -13,7 +13,7 @@ differently when used in combination with more than one window.
The basics are explained in chapter 7 and 8 of the user manual |usr_07.txt|
|usr_08.txt|.
- Type <M-]> to see the table of contents.
+ Type |gO| to see the table of contents.
==============================================================================
1. Introduction *windows-intro* *window*
@@ -677,6 +677,8 @@ can also get to them with the buffer list commands, like ":bnext".
- If the file is not open in a window edit the file in the
current window. If the current buffer can't be |abandon|ed,
the window is split first.
+ - Windows that are not in the argument list or are not full
+ width will be closed if possible.
The |argument-list| is set, like with the |:next| command.
The purpose of this command is that it can be used from a
program that wants Vim to edit another file, e.g., a debugger.
diff --git a/runtime/ftplugin/help.vim b/runtime/ftplugin/help.vim
index 9d2361b413..e6d48454d9 100644
--- a/runtime/ftplugin/help.vim
+++ b/runtime/ftplugin/help.vim
@@ -90,7 +90,7 @@ if !exists('g:no_plugin_maps')
let w:qf_toc = bufname
endfunction
- nnoremap <silent><buffer> <M-]> :call <sid>show_toc()<cr>
+ nnoremap <silent><buffer> gO :call <sid>show_toc()<cr>
endif
let &cpo = s:cpo_save
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim
index 27c8b88e44..e36dfc5a90 100644
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -31,7 +31,7 @@ setlocal nolist
setlocal nofoldenable
if !exists('g:no_plugin_maps') && !exists('g:no_man_maps')
- nnoremap <silent> <buffer> <M-]> :call man#show_toc()<CR>
+ nnoremap <silent> <buffer> gO :call man#show_toc()<CR>
nnoremap <silent> <buffer> <C-]> :Man<CR>
nnoremap <silent> <buffer> K :Man<CR>
nnoremap <silent> <buffer> <C-T> :call man#pop_tag()<CR>
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index cc99f674a1..16c7ce4d92 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2016 Nov 17
+" Last Change: 2016 Nov 18
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -363,23 +363,23 @@ syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>"
if !exists("c_no_if0")
syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
- syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
+ syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
if !exists("c_no_if0_fold")
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
else
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
endif
- syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
+ syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
- syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
+ syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
if !exists("c_no_if0_fold")
- syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
+ syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
else
- syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
+ syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
endif
- syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
- syn region cCppOutSkip contained start="^\s*\zs\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
- syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
+ syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
+ syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
+ syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
endif
syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match cIncluded display contained "<[^>]*>"