2017-03-21 09:08:19 -07:00
|
|
|
|
*vim_diff.txt* Nvim
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NVIM REFERENCE MANUAL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Differences between Nvim and Vim *vim-differences*
|
|
|
|
|
|
2017-08-17 12:23:28 -07:00
|
|
|
|
Nvim differs from Vim in many ways, big and small. This document is
|
|
|
|
|
a complete and centralized reference of those differences.
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2017-10-20 17:33:58 -07:00
|
|
|
|
Type |gO| to see the table of contents.
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
|
|
|
|
==============================================================================
|
|
|
|
|
1. Configuration *nvim-configuration*
|
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
- Use `$XDG_CONFIG_HOME/nvim/init.vim` instead of `.vimrc` for configuration.
|
2015-10-17 07:25:53 -07:00
|
|
|
|
- Use `$XDG_CONFIG_HOME/nvim` instead of `.vim` to store configuration files.
|
2016-04-07 18:36:14 -07:00
|
|
|
|
- Use `$XDG_DATA_HOME/nvim/shada/main.shada` instead of `.viminfo` for persistent
|
2017-12-27 11:30:23 -07:00
|
|
|
|
session information. |shada|
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
|
|
|
|
==============================================================================
|
2015-05-16 00:10:38 -07:00
|
|
|
|
2. Defaults *nvim-defaults*
|
|
|
|
|
|
|
|
|
|
- Syntax highlighting is enabled by default
|
2016-04-10 22:59:32 -07:00
|
|
|
|
- ":filetype plugin indent on" is enabled by default
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2015-07-14 04:53:45 -07:00
|
|
|
|
- 'autoindent' is set by default
|
2015-06-20 12:39:40 -07:00
|
|
|
|
- 'autoread' is set by default
|
2015-05-12 16:49:24 -07:00
|
|
|
|
- 'backspace' defaults to "indent,eol,start"
|
2016-10-06 00:45:24 -07:00
|
|
|
|
- 'backupdir' defaults to .,~/.local/share/nvim/backup (|xdg|)
|
2017-02-09 19:39:00 -07:00
|
|
|
|
- 'belloff' defaults to "all"
|
2015-06-18 13:11:51 -07:00
|
|
|
|
- 'complete' doesn't include "i"
|
2018-01-15 14:26:48 -07:00
|
|
|
|
- 'cscopeverbose' is enabled
|
2016-10-06 00:45:24 -07:00
|
|
|
|
- 'directory' defaults to ~/.local/share/nvim/swap// (|xdg|), auto-created
|
2018-03-31 02:12:27 -07:00
|
|
|
|
- 'display' defaults to "lastline,msgsep"
|
2017-12-27 11:30:23 -07:00
|
|
|
|
- 'encoding' is UTF-8 (cf. 'fileencoding' for file-content encoding)
|
2017-10-16 15:31:43 -07:00
|
|
|
|
- 'fillchars' defaults (in effect) to "vert:│,fold:·"
|
2017-12-27 11:30:23 -07:00
|
|
|
|
- 'fsync' is disabled
|
2015-05-15 22:23:16 -07:00
|
|
|
|
- 'formatoptions' defaults to "tcqj"
|
2015-06-20 11:59:25 -07:00
|
|
|
|
- 'history' defaults to 10000 (the maximum)
|
2015-06-20 13:40:03 -07:00
|
|
|
|
- 'hlsearch' is set by default
|
2015-06-18 19:02:36 -07:00
|
|
|
|
- 'incsearch' is set by default
|
2017-04-01 08:33:32 -07:00
|
|
|
|
- 'langnoremap' is enabled by default
|
|
|
|
|
- 'langremap' is disabled by default
|
2015-06-20 14:45:03 -07:00
|
|
|
|
- 'laststatus' defaults to 2 (statusline is always shown)
|
2015-06-20 13:16:10 -07:00
|
|
|
|
- 'listchars' defaults to "tab:> ,trail:-,nbsp:+"
|
2015-05-12 16:49:24 -07:00
|
|
|
|
- 'nocompatible' is always set
|
2016-02-15 11:55:51 -07:00
|
|
|
|
- 'nrformats' defaults to "bin,hex"
|
2017-02-09 19:39:00 -07:00
|
|
|
|
- 'ruler' is set by default
|
2015-06-20 12:39:40 -07:00
|
|
|
|
- 'sessionoptions' doesn't include "options"
|
2017-02-09 19:39:00 -07:00
|
|
|
|
- 'showcmd' is set by default
|
2018-02-07 17:11:54 -07:00
|
|
|
|
- 'sidescroll' defaults to 1
|
2015-06-18 13:23:29 -07:00
|
|
|
|
- 'smarttab' is set by default
|
2015-06-20 12:10:29 -07:00
|
|
|
|
- 'tabpagemax' defaults to 50
|
2015-05-15 22:33:26 -07:00
|
|
|
|
- 'tags' defaults to "./tags;,tags"
|
2015-05-12 16:49:24 -07:00
|
|
|
|
- 'ttyfast' is always set
|
2016-10-06 00:45:24 -07:00
|
|
|
|
- 'undodir' defaults to ~/.local/share/nvim/undo (|xdg|), auto-created
|
2015-06-20 12:23:38 -07:00
|
|
|
|
- 'viminfo' includes "!"
|
2015-05-16 11:09:40 -07:00
|
|
|
|
- 'wildmenu' is set by default
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
|
|
|
|
==============================================================================
|
2016-06-15 18:33:47 -07:00
|
|
|
|
3. New Features *nvim-features*
|
|
|
|
|
|
2016-10-30 19:50:19 -07:00
|
|
|
|
MAJOR COMPONENTS ~
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
2017-08-19 05:13:14 -07:00
|
|
|
|
API |API|
|
|
|
|
|
Lua scripting |lua|
|
2016-06-15 18:33:47 -07:00
|
|
|
|
Job control |job-control|
|
|
|
|
|
Remote plugins |remote-plugin|
|
2017-08-19 05:13:14 -07:00
|
|
|
|
Providers
|
|
|
|
|
Clipboard |provider-clipboard|
|
2018-06-12 00:18:25 -07:00
|
|
|
|
Node.js plugins |provider-nodejs|
|
2017-08-19 05:13:14 -07:00
|
|
|
|
Python plugins |provider-python|
|
|
|
|
|
Ruby plugins |provider-ruby|
|
|
|
|
|
Shared data |shada|
|
|
|
|
|
Embedded terminal |terminal|
|
2017-12-16 13:33:59 -07:00
|
|
|
|
VimL parser |nvim_parse_expression()|
|
2017-08-19 05:13:14 -07:00
|
|
|
|
XDG base directories |xdg|
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
2016-10-15 18:54:22 -07:00
|
|
|
|
USER EXPERIENCE ~
|
|
|
|
|
|
2017-08-17 12:23:28 -07:00
|
|
|
|
Working intuitively and consistently is a major goal of Nvim.
|
2016-10-15 18:54:22 -07:00
|
|
|
|
|
2017-08-17 12:23:28 -07:00
|
|
|
|
*feature-compile*
|
|
|
|
|
- Nvim always includes ALL features, in contrast to Vim (which ships with
|
|
|
|
|
various combinations of 100+ optional features). Think of it as a leaner
|
|
|
|
|
version of Vim's "HUGE" build. This reduces surface area for bugs, and
|
|
|
|
|
removes a common source of confusion and friction for users.
|
|
|
|
|
|
|
|
|
|
- Nvim avoids features that cannot be provided on all platforms; instead that
|
|
|
|
|
is delegated to external plugins/extensions. E.g. the `-X` platform-specific
|
|
|
|
|
option is "sometimes" available in Vim (with potential surprises:
|
|
|
|
|
http://stackoverflow.com/q/14635295).
|
2017-01-03 21:32:46 -07:00
|
|
|
|
|
2017-07-28 15:28:41 -07:00
|
|
|
|
- Vim's internal test functions (test_autochdir(), test_settime(), etc.) are
|
|
|
|
|
not exposed (nor implemented); instead Nvim has a robust API.
|
2016-10-15 18:54:22 -07:00
|
|
|
|
|
2017-08-19 05:13:14 -07:00
|
|
|
|
- Behaviors, options, documentation are removed if they cost users more time
|
|
|
|
|
than they save.
|
|
|
|
|
|
|
|
|
|
Usability details have been improved where the benefit outweighs any
|
|
|
|
|
backwards-compatibility cost. Some examples:
|
|
|
|
|
|
|
|
|
|
- |K| in help documents can be used like |CTRL-]|.
|
|
|
|
|
- Directories for 'directory' and 'undodir' are auto-created.
|
|
|
|
|
- Terminal features such as 'guicursor' are enabled where possible.
|
|
|
|
|
|
2016-10-30 19:50:19 -07:00
|
|
|
|
ARCHITECTURE ~
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
2016-10-30 19:50:19 -07:00
|
|
|
|
External plugins run in separate processes. |remote-plugin| This improves
|
2017-05-20 14:49:46 -07:00
|
|
|
|
stability and allows those plugins to work without blocking the editor. Even
|
|
|
|
|
"legacy" Python and Ruby plugins which use the old Vim interfaces (|if_py| and
|
|
|
|
|
|if_ruby|) run out-of-process.
|
2016-10-30 19:50:19 -07:00
|
|
|
|
|
2017-07-28 15:28:41 -07:00
|
|
|
|
Platform and I/O facilities are built upon libuv. Nvim benefits from libuv
|
|
|
|
|
features and bug fixes, and other projects benefit from improvements to libuv
|
|
|
|
|
by Nvim developers.
|
2016-10-30 19:50:19 -07:00
|
|
|
|
|
|
|
|
|
FEATURES ~
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Command-line highlighting:
|
|
|
|
|
The expression prompt (|@=|, |c_CTRL-R_=|, |i_CTRL-R_=|) is highlighted
|
|
|
|
|
using a built-in VimL expression parser. |expr-highlight|
|
|
|
|
|
*E5408* *E5409*
|
|
|
|
|
|input()|, |inputdialog()| support custom highlighting. |input()-highlight|
|
|
|
|
|
*g:Nvim_color_cmdline*
|
|
|
|
|
(Experimental) Command-line (|:|) is colored by callback defined in
|
|
|
|
|
`g:Nvim_color_cmdline` (this callback is for testing only, and will be
|
|
|
|
|
removed in the future).
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
|
|
|
|
Commands:
|
2017-10-15 11:31:12 -07:00
|
|
|
|
|:checkhealth|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
|:cquit| can use [count] to set the exit code
|
|
|
|
|
|:drop| is always available
|
2016-08-07 20:17:56 -07:00
|
|
|
|
|:Man| is available by default, with many improvements such as completion
|
2017-08-19 05:13:14 -07:00
|
|
|
|
|:tchdir| tab-local |current-directory|
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
|
|
|
|
Events:
|
2017-01-13 03:03:43 -07:00
|
|
|
|
|DirChanged|
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|TabNewEntered|
|
|
|
|
|
|TermClose|
|
2016-10-30 19:50:19 -07:00
|
|
|
|
|TermOpen|
|
2016-08-20 16:37:18 -07:00
|
|
|
|
|TextYankPost|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
|VimResume|
|
|
|
|
|
|VimSuspend|
|
|
|
|
|
|
|
|
|
|
Functions:
|
|
|
|
|
|dictwatcheradd()| notifies a callback whenever a |Dict| is modified
|
|
|
|
|
|dictwatcherdel()|
|
|
|
|
|
|menu_get()|
|
|
|
|
|
|msgpackdump()|, |msgpackparse()| provide msgpack de/serialization
|
|
|
|
|
|stdpath()|
|
|
|
|
|
|system()|, |systemlist()| can run {cmd} directly (without 'shell')
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
|
|
|
|
Highlight groups:
|
2017-12-27 11:30:23 -07:00
|
|
|
|
|expr-highlight| highlight groups (prefixed with "Nvim")
|
2017-11-09 18:44:18 -07:00
|
|
|
|
|hl-NormalNC| highlights non-current windows
|
2018-03-31 02:12:27 -07:00
|
|
|
|
|hl-MsgSeparator| highlights separator for scrolled messages
|
2016-08-22 01:51:32 -07:00
|
|
|
|
|hl-QuickFixLine|
|
2016-10-30 19:50:19 -07:00
|
|
|
|
|hl-Substitute|
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|hl-TermCursor|
|
|
|
|
|
|hl-TermCursorNC|
|
2017-03-26 03:15:52 -07:00
|
|
|
|
|hl-Whitespace| highlights 'listchars' whitespace
|
2017-12-09 10:47:34 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Input:
|
|
|
|
|
ALT (|META|) chords always work (even in the |TUI|). Map |<M-| with any key:
|
|
|
|
|
<M-1>, <M-BS>, <M-Del>, <M-Ins>, <M-/>, <M-\>, <M-Space>, <M-Enter>, etc.
|
|
|
|
|
Case-sensitive: <M-a> and <M-A> are two different keycodes.
|
|
|
|
|
|
|
|
|
|
ALT in insert-mode behaves like <Esc> if not mapped. |i_ALT|
|
|
|
|
|
|
|
|
|
|
Mappings:
|
|
|
|
|
|<Cmd>| pseudokey
|
|
|
|
|
|
|
|
|
|
Normal commands:
|
|
|
|
|
"Outline": Type |gO| in |:Man| and |:help| pages to see a document outline.
|
|
|
|
|
|
|
|
|
|
Options:
|
|
|
|
|
'cpoptions' flags: |cpo-_|
|
|
|
|
|
'display' flag `msgsep` to minimize scrolling when showing messages
|
|
|
|
|
'guicursor' works in the terminal
|
2018-06-13 09:21:25 -07:00
|
|
|
|
'fillchars' flags: `msgsep` (see 'display' above)
|
|
|
|
|
and `eob` for |EndOfBuffer| marker
|
2017-12-27 11:30:23 -07:00
|
|
|
|
'inccommand' shows interactive results for |:substitute|-like commands
|
|
|
|
|
'scrollback'
|
|
|
|
|
'statusline' supports unlimited alignment sections
|
|
|
|
|
'tabline' %@Func@foo%X can call any function on mouse-click
|
|
|
|
|
'winhighlight' window-local highlights
|
|
|
|
|
|
|
|
|
|
Variables:
|
|
|
|
|
|v:event|
|
|
|
|
|
|v:exiting|
|
|
|
|
|
|v:progpath| is always absolute ("full")
|
|
|
|
|
|v:windowid| is always available (for use by external UIs)
|
2017-07-26 02:31:01 -07:00
|
|
|
|
|
2016-06-15 18:33:47 -07:00
|
|
|
|
==============================================================================
|
|
|
|
|
4. Changed features *nvim-features-changed*
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
|
|
|
|
Nvim always builds with all features, in contrast to Vim which may have
|
2017-12-27 11:30:23 -07:00
|
|
|
|
certain features removed/added at compile-time. |feature-compile|
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
|
|
|
|
If a Python interpreter is available on your `$PATH`, |:python| and |:python3|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
are always available and may be used simultaneously. See |provider-python|.
|
2017-05-29 00:02:39 -07:00
|
|
|
|
|
system('foo &', 'bar'): Show error, don't crash.
Closes #3529
Closes #5241
In Vim,
:echo system('cat - &', 'foo')
works because for both system() and :! Vim writes input to a temp file and uses
shell syntax to redirect the file to the backgrounded `cat` (get_cmd_output()
.. make_filter_cmd()).
In Nvim,
:echo system('cat - &', 'foo')
fails because we write the input directly via pipes (shell.c:do_os_system()),
but (per POSIX[1]) backgrounded process input stream is redirected from
/dev/null (unless overridden by shell redirection; supported only by some shells
[2]), so our writes are ignored, the process exits quickly, and if we are
writing data larger than the buffer size we'll see EPIPE.
This still works:
:%w !tee > foo1358.txt &
but this does not:
:%w !tee foo1358.txt &
though it *should* (why doesn't it?) because we still do the temp file dance
in do_bang() .. do_filter().
[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02
[2] http://unix.stackexchange.com/a/71218
2016-10-18 05:39:08 -07:00
|
|
|
|
|:!| does not support "interactive" commands. Use |:terminal| instead.
|
|
|
|
|
(GUI Vim has a similar limitation, see ":help gui-pty" in Vim.)
|
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
:!start is not special-cased on Windows.
|
|
|
|
|
|
system('foo &', 'bar'): Show error, don't crash.
Closes #3529
Closes #5241
In Vim,
:echo system('cat - &', 'foo')
works because for both system() and :! Vim writes input to a temp file and uses
shell syntax to redirect the file to the backgrounded `cat` (get_cmd_output()
.. make_filter_cmd()).
In Nvim,
:echo system('cat - &', 'foo')
fails because we write the input directly via pipes (shell.c:do_os_system()),
but (per POSIX[1]) backgrounded process input stream is redirected from
/dev/null (unless overridden by shell redirection; supported only by some shells
[2]), so our writes are ignored, the process exits quickly, and if we are
writing data larger than the buffer size we'll see EPIPE.
This still works:
:%w !tee > foo1358.txt &
but this does not:
:%w !tee foo1358.txt &
though it *should* (why doesn't it?) because we still do the temp file dance
in do_bang() .. do_filter().
[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02
[2] http://unix.stackexchange.com/a/71218
2016-10-18 05:39:08 -07:00
|
|
|
|
|system()| does not support writing/reading "backgrounded" commands. |E5677|
|
2016-06-26 15:26:10 -07:00
|
|
|
|
|
2017-08-15 15:20:37 -07:00
|
|
|
|
|:redir| nested in |execute()| works.
|
|
|
|
|
|
2016-10-07 04:18:24 -07:00
|
|
|
|
Nvim may throttle (skip) messages from shell commands (|:!|, |:grep|, |:make|)
|
|
|
|
|
if there is too much output. No data is lost, this only affects display and
|
|
|
|
|
makes things faster. |:terminal| output is never throttled.
|
2016-09-29 17:33:50 -07:00
|
|
|
|
|
2015-07-18 02:23:42 -07:00
|
|
|
|
|mkdir()| behaviour changed:
|
2016-04-07 18:36:14 -07:00
|
|
|
|
1. Assuming /tmp/foo does not exist and /tmp can be written to
|
2015-07-18 02:23:42 -07:00
|
|
|
|
mkdir('/tmp/foo/bar', 'p', 0700) will create both /tmp/foo and /tmp/foo/bar
|
|
|
|
|
with 0700 permissions. Vim mkdir will create /tmp/foo with 0755.
|
2016-04-07 18:36:14 -07:00
|
|
|
|
2. If you try to create an existing directory with `'p'` (e.g. mkdir('/',
|
2015-07-18 02:23:42 -07:00
|
|
|
|
'p')) mkdir() will silently exit. In Vim this was an error.
|
|
|
|
|
3. mkdir() error messages now include strerror() text when mkdir fails.
|
|
|
|
|
|
2015-09-20 08:04:33 -07:00
|
|
|
|
|string()| and |:echo| behaviour changed:
|
2016-04-07 18:36:14 -07:00
|
|
|
|
1. No maximum recursion depth limit is applied to nested container
|
2015-09-20 08:04:33 -07:00
|
|
|
|
structures.
|
2016-04-07 18:36:14 -07:00
|
|
|
|
2. |string()| fails immediately on nested containers, not when recursion limit
|
2015-09-20 08:04:33 -07:00
|
|
|
|
was exceeded.
|
|
|
|
|
2. When |:echo| encounters duplicate containers like >
|
|
|
|
|
|
|
|
|
|
let l = []
|
|
|
|
|
echo [l, l]
|
|
|
|
|
<
|
2016-04-07 18:36:14 -07:00
|
|
|
|
it does not use "[...]" (was: "[[], [...]]", now: "[[], []]"). "..." is
|
2015-09-20 08:04:33 -07:00
|
|
|
|
only used for recursive containers.
|
2016-04-07 18:36:14 -07:00
|
|
|
|
3. |:echo| printing nested containers adds "@level" after "..." designating
|
|
|
|
|
the level at which recursive container was printed: |:echo-self-refer|.
|
|
|
|
|
Same thing applies to |string()| (though it uses construct like
|
|
|
|
|
"{E724@level}"), but this is not reliable because |string()| continues to
|
2015-09-20 08:04:33 -07:00
|
|
|
|
error out.
|
2016-04-07 18:36:14 -07:00
|
|
|
|
4. Stringifyed infinite and NaN values now use |str2float()| and can be evaled
|
2016-02-21 11:58:58 -07:00
|
|
|
|
back.
|
2016-02-06 10:54:42 -07:00
|
|
|
|
5. (internal) Trying to print or stringify VAR_UNKNOWN in Vim results in
|
|
|
|
|
nothing, |E908|, in Neovim it is internal error.
|
2015-09-20 08:04:33 -07:00
|
|
|
|
|
2016-02-13 11:39:28 -07:00
|
|
|
|
|json_decode()| behaviour changed:
|
2016-02-01 11:22:07 -07:00
|
|
|
|
1. It may output |msgpack-special-dict|.
|
2016-02-13 11:39:28 -07:00
|
|
|
|
2. |msgpack-special-dict| is emitted also in case of duplicate keys, while in
|
|
|
|
|
Vim it errors out.
|
|
|
|
|
3. It accepts only valid JSON. Trailing commas are not accepted.
|
2016-02-01 11:22:07 -07:00
|
|
|
|
|
2016-02-13 11:39:28 -07:00
|
|
|
|
|json_encode()| behaviour slightly changed: now |msgpack-special-dict| values
|
|
|
|
|
are accepted, but |v:none| is not.
|
|
|
|
|
|
|
|
|
|
*v:none* variable is absent. In Vim it represents “no value” in “js” strings
|
|
|
|
|
like "[,]" parsed as "[v:none]" by |js_decode()|.
|
|
|
|
|
|
|
|
|
|
*js_encode()* and *js_decode()* functions are also absent.
|
2016-02-05 16:46:23 -07:00
|
|
|
|
|
2016-04-07 18:36:14 -07:00
|
|
|
|
Viminfo text files were replaced with binary (messagepack) ShaDa files.
|
2015-07-05 04:08:50 -07:00
|
|
|
|
Additional differences:
|
|
|
|
|
|
|
|
|
|
- |shada-c| has no effect.
|
|
|
|
|
- |shada-s| now limits size of every item and not just registers.
|
2016-04-07 18:36:14 -07:00
|
|
|
|
- 'viminfo' option got renamed to 'shada'. Old option is kept as an alias for
|
2015-07-05 16:26:44 -07:00
|
|
|
|
compatibility reasons.
|
2016-04-07 18:36:14 -07:00
|
|
|
|
- |:wviminfo| was renamed to |:wshada|, |:rviminfo| to |:rshada|. Old
|
2015-08-15 04:50:04 -07:00
|
|
|
|
commands are still kept.
|
2016-04-07 18:36:14 -07:00
|
|
|
|
- ShaDa file format was designed with forward and backward compatibility in
|
2015-07-26 11:02:56 -07:00
|
|
|
|
mind. |shada-compatibility|
|
2016-04-07 18:36:14 -07:00
|
|
|
|
- Some errors make ShaDa code keep temporary file in-place for user to decide
|
|
|
|
|
what to do with it. Vim deletes temporary file in these cases.
|
2015-08-15 04:50:04 -07:00
|
|
|
|
|shada-error-handling|
|
2015-11-01 11:26:53 -07:00
|
|
|
|
- ShaDa file keeps search direction (|v:searchforward|), viminfo does not.
|
2015-07-05 04:08:50 -07:00
|
|
|
|
|
2017-02-11 11:47:02 -07:00
|
|
|
|
|printf()| returns something meaningful when used with `%p` argument: in Vim
|
|
|
|
|
it used to return useless address of the string (strings are copied to the
|
|
|
|
|
newly allocated memory all over the place) and fail on types which cannot be
|
|
|
|
|
coerced to strings. See |id()| for more details, currently it uses
|
|
|
|
|
`printf("%p", {expr})` internally.
|
|
|
|
|
|
2017-02-18 15:15:27 -07:00
|
|
|
|
|c_CTRL-R| pasting a non-special register into |cmdline| omits the last <CR>.
|
2017-02-17 18:39:07 -07:00
|
|
|
|
|
2017-01-29 12:07:24 -07:00
|
|
|
|
Lua interface (|if_lua.txt|):
|
|
|
|
|
|
|
|
|
|
- `:lua print("a\0b")` will print `a^@b`, like with `:echomsg "a\nb"` . In Vim
|
|
|
|
|
that prints `a` and `b` on separate lines, exactly like
|
|
|
|
|
`:lua print("a\nb")` .
|
|
|
|
|
- `:lua error('TEST')` will print “TEST” as the error in Vim and “E5105: Error
|
|
|
|
|
while calling lua chunk: [string "<VimL compiled string>"]:1: TEST” in
|
|
|
|
|
Neovim.
|
2017-05-11 08:45:11 -07:00
|
|
|
|
- Lua has direct access to Nvim |API| via `vim.api`.
|
2017-05-22 14:46:57 -07:00
|
|
|
|
- Lua package.path and package.cpath are automatically updated according to
|
|
|
|
|
'runtimepath': |lua-require|.
|
2017-01-29 12:07:24 -07:00
|
|
|
|
|
2017-08-17 12:23:28 -07:00
|
|
|
|
|input()| and |inputdialog()| support for each other’s features (return on
|
|
|
|
|
cancel and completion respectively) via dictionary argument (replaces all
|
2017-05-13 08:16:41 -07:00
|
|
|
|
other arguments if used).
|
|
|
|
|
|
2017-08-17 12:23:28 -07:00
|
|
|
|
|input()| and |inputdialog()| support user-defined cmdline highlighting.
|
2017-07-26 02:31:01 -07:00
|
|
|
|
|
2017-10-07 06:55:25 -07:00
|
|
|
|
Highlight groups:
|
2017-10-15 23:18:03 -07:00
|
|
|
|
|hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other
|
|
|
|
|
groups
|
2017-10-07 06:55:25 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Macro/|recording| behavior
|
|
|
|
|
Replay of a macro recorded during :lmap produces the same actions as when it
|
|
|
|
|
was recorded. In Vim if a macro is recorded while using :lmap'ped keys then
|
|
|
|
|
the behaviour during record and replay differs.
|
|
|
|
|
|
|
|
|
|
'keymap' is implemented via :lmap instead of :lnoremap so that you can use
|
|
|
|
|
macros and 'keymap' at the same time. This also means you can use |:imap| on
|
|
|
|
|
the results of keys from 'keymap'.
|
|
|
|
|
|
2018-06-03 17:06:32 -07:00
|
|
|
|
Normal commands:
|
|
|
|
|
|Q| is the same as |gQ|
|
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Options:
|
|
|
|
|
'ttimeout', 'ttimeoutlen' behavior was simplified
|
|
|
|
|
|
|
|
|
|
Startup:
|
2018-06-03 17:06:32 -07:00
|
|
|
|
|-e| and |-es| invoke the same "improved Ex mode" as -E and -Es.
|
|
|
|
|
|-E| and |-Es| reads stdin as text (into buffer 1).
|
2017-12-27 11:30:23 -07:00
|
|
|
|
|-s| reads Normal commands from stdin if the script name is "-".
|
|
|
|
|
Reading text (instead of commands) from stdin |--|:
|
|
|
|
|
- works by default: "-" file is optional
|
|
|
|
|
- works in more cases: |-Es|, file args
|
|
|
|
|
|
|
|
|
|
TUI:
|
|
|
|
|
*:set-termcap*
|
|
|
|
|
Start Nvim with 'verbose' level 3 to show terminal capabilities: >
|
|
|
|
|
nvim -V3
|
|
|
|
|
<
|
|
|
|
|
*'term'* *E529* *E530* *E531*
|
|
|
|
|
'term' reflects the terminal type derived from |$TERM| and other environment
|
|
|
|
|
checks. For debugging only; not reliable during startup. >
|
|
|
|
|
:echo &term
|
|
|
|
|
< "builtin_x" means one of the |builtin-terms| was chosen, because the expected
|
|
|
|
|
terminfo file was not found on the system.
|
|
|
|
|
|
|
|
|
|
Nvim will use 256-colour capability on Linux virtual terminals. Vim uses
|
|
|
|
|
only 8 colours plus bright foreground on Linux VTs.
|
|
|
|
|
|
|
|
|
|
Vim combines what is in its |builtin-terms| with what it reads from terminfo,
|
|
|
|
|
and has a |ttybuiltin| setting to control how that combination works. Nvim
|
|
|
|
|
uses one or the other, it does not attempt to merge the two.
|
|
|
|
|
|
2017-11-14 02:47:49 -07:00
|
|
|
|
VimL (Vim script) compatibility:
|
|
|
|
|
`count` does not alias to |v:count|
|
2017-11-08 18:20:12 -07:00
|
|
|
|
|
2015-01-30 05:19:43 -07:00
|
|
|
|
==============================================================================
|
|
|
|
|
5. Missing legacy features *nvim-features-missing*
|
|
|
|
|
|
2017-05-11 08:45:11 -07:00
|
|
|
|
Some legacy Vim features are not implemented:
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2016-11-03 12:09:22 -07:00
|
|
|
|
- |if_py|: vim.bindeval() and vim.Function() are not supported
|
2017-12-27 11:30:23 -07:00
|
|
|
|
- |if_lua|: the `vim` object is missing some legacy methods
|
2017-05-11 08:45:11 -07:00
|
|
|
|
- *if_perl*
|
|
|
|
|
- *if_mzscheme*
|
|
|
|
|
- *if_tcl*
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
|
|
|
|
==============================================================================
|
|
|
|
|
6. Removed features *nvim-features-removed*
|
|
|
|
|
|
2017-08-17 12:23:28 -07:00
|
|
|
|
These Vim features were intentionally removed from Nvim.
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Aliases:
|
|
|
|
|
ex (alias for "nvim -e")
|
|
|
|
|
exim (alias for "nvim -E")
|
|
|
|
|
gex (GUI)
|
|
|
|
|
gview (GUI)
|
|
|
|
|
gvim (GUI)
|
|
|
|
|
gvimdiff (GUI)
|
|
|
|
|
rgview (GUI)
|
|
|
|
|
rgvim (GUI)
|
|
|
|
|
rview (alias for "nvim -RZ")
|
|
|
|
|
rvim (alias for "nvim -Z")
|
|
|
|
|
view (alias for "nvim -R")
|
|
|
|
|
vimdiff (alias for "nvim -d" |diff-mode|)
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Commands:
|
|
|
|
|
:fixdel
|
|
|
|
|
:helpfind
|
|
|
|
|
:mode (no longer accepts an argument)
|
|
|
|
|
:open
|
|
|
|
|
:Print
|
|
|
|
|
:shell
|
|
|
|
|
:smile
|
|
|
|
|
:tearoff
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Compile-time features:
|
|
|
|
|
EBCDIC
|
|
|
|
|
Emacs tags support
|
|
|
|
|
X11 integration (see |x11-selection|)
|
2017-01-03 21:32:46 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Options:
|
2015-11-24 14:46:52 -07:00
|
|
|
|
'antialias'
|
2017-12-27 11:30:23 -07:00
|
|
|
|
'bioskey' (MS-DOS)
|
|
|
|
|
'conskey' (MS-DOS)
|
|
|
|
|
*'cp'* *'nocompatible'* *'nocp'* *'compatible'* (Nvim is always "nocompatible".)
|
|
|
|
|
'cpoptions' (gjkHw<*- and all POSIX flags were removed)
|
|
|
|
|
*'cryptmethod'* *'cm'* *'key'* (Vim encryption implementation)
|
|
|
|
|
*'ed'* *'edcompatible'* *'noed'* *'noedcompatible'*
|
2016-01-27 04:20:44 -07:00
|
|
|
|
'encoding' ("utf-8" is always used)
|
2017-02-18 06:01:20 -07:00
|
|
|
|
'esckeys'
|
2016-09-24 06:07:49 -07:00
|
|
|
|
'guioptions' "t" flag was removed
|
|
|
|
|
*'guipty'* (Nvim uses pipes and PTYs consistently on all platforms.)
|
2017-11-06 16:51:03 -07:00
|
|
|
|
'highlight' (Names of builtin |highlight-groups| cannot be changed.)
|
2016-09-24 06:07:49 -07:00
|
|
|
|
*'imactivatefunc'* *'imaf'*
|
|
|
|
|
*'imactivatekey'* *'imak'*
|
|
|
|
|
*'imstatusfunc'* *'imsf'*
|
|
|
|
|
*'macatsui'*
|
2018-05-02 01:09:51 -07:00
|
|
|
|
'maxmem' Nvim delegates memory-management to the OS.
|
|
|
|
|
'maxmemtot' Nvim delegates memory-management to the OS.
|
2018-02-19 08:46:44 -07:00
|
|
|
|
'maxcombine' (6 is always used)
|
2016-09-24 06:07:49 -07:00
|
|
|
|
*'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
|
2015-04-24 16:10:59 -07:00
|
|
|
|
'shelltype'
|
2016-09-24 06:07:49 -07:00
|
|
|
|
*'shortname'* *'sn'* *'noshortname'* *'nosn'*
|
|
|
|
|
*'swapsync'* *'sws'*
|
|
|
|
|
*'termencoding'* *'tenc'* (Vim 7.4.852 also removed this for Windows)
|
2015-04-24 16:10:59 -07:00
|
|
|
|
'textauto'
|
|
|
|
|
'textmode'
|
2016-09-24 06:07:49 -07:00
|
|
|
|
*'toolbar'* *'tb'*
|
|
|
|
|
*'toolbariconsize'* *'tbis'*
|
|
|
|
|
*'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'*
|
|
|
|
|
*'ttymouse'* *'ttym'*
|
|
|
|
|
*'ttyscroll'* *'tsl'*
|
|
|
|
|
*'ttytype'* *'tty'*
|
2017-12-27 11:30:23 -07:00
|
|
|
|
'ttyfast'
|
2015-05-05 19:00:43 -07:00
|
|
|
|
'weirdinvert'
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2018-05-28 22:22:15 -07:00
|
|
|
|
Startup:
|
|
|
|
|
--literal (file args are always literal; to expand wildcards on Windows, use
|
|
|
|
|
|:n| e.g. `nvim +"n *"`)
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Easy mode: eview, evim, nvim -y
|
|
|
|
|
Vi mode: nvim -v
|
2018-05-28 22:22:15 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Test functions:
|
|
|
|
|
test_alloc_fail()
|
|
|
|
|
test_autochdir()
|
|
|
|
|
test_disable_char_avail()
|
|
|
|
|
test_garbagecollect_now()
|
|
|
|
|
test_null_channel()
|
|
|
|
|
test_null_dict()
|
|
|
|
|
test_null_job()
|
|
|
|
|
test_null_list()
|
|
|
|
|
test_null_partial()
|
|
|
|
|
test_null_string()
|
|
|
|
|
test_override()
|
|
|
|
|
test_settime()
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
TUI:
|
|
|
|
|
*t_xx* *termcap-options* *t_AB* *t_Sb* *t_vb* *t_SI*
|
|
|
|
|
Nvim does not have special `t_XX` options nor <t_XX> keycodes to configure
|
|
|
|
|
terminal capabilities. Instead Nvim treats the terminal as any other UI,
|
|
|
|
|
e.g. 'guicursor' sets the terminal cursor style if possible.
|
|
|
|
|
|
|
|
|
|
*termcap*
|
|
|
|
|
Nvim never uses the termcap database, only |terminfo| and |builtin-terms|.
|
|
|
|
|
|
|
|
|
|
*xterm-8bit* *xterm-8-bit*
|
|
|
|
|
Xterm can be run in a mode where it uses true 8-bit CSI. Supporting this
|
|
|
|
|
requires autodetection of whether the terminal is in UTF-8 mode or non-UTF-8
|
|
|
|
|
mode, as the 8-bit CSI character has to be written differently in each case.
|
|
|
|
|
Vim issues a "request version" sequence to the terminal at startup and looks
|
|
|
|
|
at how the terminal is sending CSI. Nvim does not issue such a sequence and
|
|
|
|
|
always uses 7-bit control sequences.
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
|
|
|
|
==============================================================================
|
2018-06-03 17:06:32 -07:00
|
|
|
|
vim:tw=78:ts=8:sw=2:noet:ft=help:norl:
|