diff options
Diffstat (limited to 'runtime/doc/vim_diff.txt')
-rw-r--r-- | runtime/doc/vim_diff.txt | 204 |
1 files changed, 139 insertions, 65 deletions
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 508712ca75..20002c1118 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -12,8 +12,8 @@ these differences. 1. Configuration |nvim-configuration| 2. Defaults |nvim-defaults| -3. Changed features |nvim-features-changed| -4. New features |nvim-features-new| +3. New features |nvim-features| +4. Changed features |nvim-features-changed| 5. Missing legacy features |nvim-features-missing| 6. Removed features |nvim-features-removed| @@ -36,9 +36,10 @@ these differences. - 'autoindent' is set by default - 'autoread' is set by default - 'backspace' defaults to "indent,eol,start" +- 'backupdir' defaults to .,~/.local/share/nvim/backup (|xdg|) - 'complete' doesn't include "i" +- 'directory' defaults to ~/.local/share/nvim/swap// (|xdg|), auto-created - 'display' defaults to "lastline" -- 'encoding' defaults to "utf-8" - 'formatoptions' defaults to "tcqj" - 'history' defaults to 10000 (the maximum) - 'hlsearch' is set by default @@ -46,7 +47,6 @@ these differences. - 'langnoremap' is set by default - 'laststatus' defaults to 2 (statusline is always shown) - 'listchars' defaults to "tab:> ,trail:-,nbsp:+" -- 'mouse' defaults to "a" - 'nocompatible' is always set - 'nrformats' defaults to "bin,hex" - 'sessionoptions' doesn't include "options" @@ -54,11 +54,94 @@ these differences. - 'tabpagemax' defaults to 50 - 'tags' defaults to "./tags;,tags" - 'ttyfast' is always set +- 'undodir' defaults to ~/.local/share/nvim/undo (|xdg|), auto-created - 'viminfo' includes "!" - 'wildmenu' is set by default ============================================================================== -3. Changed features *nvim-features-changed* +3. New Features *nvim-features* + + +MAJOR COMPONENTS ~ + +Embedded terminal emulator |terminal-emulator| +RPC API |RPC| +Shared data |shada| +XDG base directories |xdg| +Job control |job-control| +Remote plugins |remote-plugin| +Python plugins |provider-python| +Clipboard integration |provider-clipboard| + + +USER EXPERIENCE ~ + +Working intuitively and consistently is a major goal of Nvim. Examples: + +- Nvim does not have `-X`, a platform-specific option "sometimes" available in + Vim (with potential surprises: http://stackoverflow.com/q/14635295). Nvim + avoids features that cannot be provided on all platforms--instead that is + delegated to external plugins/extensions. + +- Test-only globals and functions such as test_autochdir(), test_settime(), + etc., are not exposed (because they don't exist). + +ARCHITECTURE ~ + +External plugins run in separate processes. |remote-plugin| This improves +stability and allows those plugins to perform tasks 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. + + +FEATURES ~ + +|bracketed-paste-mode| is built-in and enabled by default. + +|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-/>, +<M-\>, <M-Space>, <M-Enter>, <M-=>, <M-->, <M-?>, <M-$>, ... +META chords are case-sensitive: <M-a> and <M-A> are two different keycodes. + +Some `CTRL-SHIFT-...` key chords are distinguished from `CTRL-...` variants +(even in the terminal). Specifically, the following are known to work: + <C-Tab>, <C-S-Tab>, <C-BS>, <C-S-BS>, <C-Enter>, <C-S-Enter> + +Options: + 'inccommand' shows results while typing a |:substitute| command + 'statusline' supports unlimited alignment sections + 'tabline' %@Func@foo%X can call any function on mouse-click + +Variables: + |v:event| + |v:windowid| is always available (for use by external UIs) + +Commands: + |:CheckHealth| + |:drop| is available on all platforms + |:Man| is available by default, with many improvements such as completion + +Functions: + |dictwatcheradd()| notifies a callback whenever a |Dict| is modified + |dictwatcherdel()| + |execute()| works with |:redir| + |msgpackdump()|, |msgpackparse()| provide msgpack de/serialization + +Events: + |DirChanged| + |TabNewEntered| + |TermClose| + |TermOpen| + |TextYankPost| + +Highlight groups: + |hl-QuickFixLine| + |hl-Substitute| + |hl-TermCursor| + |hl-TermCursorNC| + +============================================================================== +4. Changed features *nvim-features-changed* Nvim always builds with all features, in contrast to Vim which may have certain features removed/added at compile-time. This is like if Vim's "HUGE" @@ -68,7 +151,16 @@ build). If a Python interpreter is available on your `$PATH`, |:python| and |:python3| are always available and may be used simultaneously in separate plugins. The `neovim` pip package must be installed to use Python plugins in Nvim (see -|nvim-python|). +|provider-python|). + +|:!| does not support "interactive" commands. Use |:terminal| instead. +(GUI Vim has a similar limitation, see ":help gui-pty" in Vim.) + +|system()| does not support writing/reading "backgrounded" commands. |E5677| + +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. |mkdir()| behaviour changed: 1. Assuming /tmp/foo does not exist and /tmp can be written to @@ -78,7 +170,7 @@ are always available and may be used simultaneously in separate plugins. The 'p')) mkdir() will silently exit. In Vim this was an error. 3. mkdir() error messages now include strerror() text when mkdir fails. -'encoding' cannot be changed after startup. +'encoding' is always "utf-8". |string()| and |:echo| behaviour changed: 1. No maximum recursion depth limit is applied to nested container @@ -127,7 +219,6 @@ Additional differences: compatibility reasons. - |:wviminfo| was renamed to |:wshada|, |:rviminfo| to |:rshada|. Old commands are still kept. -- |:oldfiles| supports !. - When writing (|:wshada| without bang or at exit) it merges much more data, and does this according to the timestamp. Vim merges only marks. |shada-merging| @@ -141,47 +232,13 @@ Additional differences: - ShaDa file keeps search direction (|v:searchforward|), viminfo does not. ============================================================================== -4. New Features *nvim-features-new* - -See |nvim-intro| for a list of Nvim's largest new features. - -|bracketed-paste-mode| is built-in and enabled by default. - -Meta (alt) chords are recognized (even in the terminal). - <M-1>, <M-2>, ... - <M-BS>, <M-Del>, <M-Ins>, ... - <M-/>, <M-\>, ... - <M-Space>, <M-Enter>, <M-=>, <M-->, <M-?>, <M-$>, ... - - Note: Meta chords are case-sensitive (<M-a> is distinguished from <M-A>). - -Some `CTRL-SHIFT-...` key chords are distinguished from `CTRL-...` variants -(even in the terminal). Specifically, the following are known to work: - <C-Tab>, <C-S-Tab> - <C-BS>, <C-S-BS> - <C-Enter>, <C-S-Enter> - -Events: - |TabNew| - |TabNewEntered| - |TabClosed| - |TermOpen| - |TermClose| - -Highlight groups: - |hl-EndOfBuffer| - |hl-TermCursor| - |hl-TermCursorNC| - -============================================================================== 5. Missing legacy features *nvim-features-missing* - *if_ruby* *if_lua* *if_perl* *if_mzscheme* *if_tcl* + *if_lua* *if_perl* *if_mzscheme* *if_tcl* These legacy Vim features may be implemented in the future, but they are not planned for the current milestone. -- vim.bindeval() (new feature in Vim 7.4 Python interface) -- |if_ruby| +- |if_py|: vim.bindeval() and vim.Function() are not supported - |if_lua| - |if_perl| - |if_mzscheme| @@ -192,10 +249,12 @@ planned for the current milestone. These features are in Vim, but have been intentionally removed from Nvim. -Vi-compatible mode: + *'cp'* *'nocompatible'* *'nocp'* *'compatible'* +Nvim is always "non-compatible" with Vi. ":set nocompatible" is ignored ":set compatible" is an error + *'ed'* *'edcompatible'* *'noed'* *'noedcompatible'* Ed-compatible mode: ":set noedcompatible" is ignored ":set edcompatible" is an error @@ -205,8 +264,8 @@ Ed-compatible mode: ":set nottyfast" is an error Encryption support: - 'cryptmethod' - 'key' + *'cryptmethod'* *'cm'* + *'key'* MS-DOS support: 'bioskey' @@ -215,29 +274,43 @@ MS-DOS support: Highlight groups: |hl-VisualNOS| +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_settime() + Other options: 'antialias' - 'cpoptions' ('g', 'w', 'H', '*', '-', 'j', and all POSIX flags were removed) - 'guioptions' (only the 't' flag was removed) - 'guipty' - 'imactivatefunc' - 'imactivatekey' - 'imstatusfunc' - 'macatsui' - 'restorescreen' + 'cpoptions' ("g", "w", "H", "*", "-", "j", and all POSIX flags were removed) + 'encoding' ("utf-8" is always used) + 'guioptions' "t" flag was removed + *'guipty'* (Nvim uses pipes and PTYs consistently on all platforms.) + *'imactivatefunc'* *'imaf'* + *'imactivatekey'* *'imak'* + *'imstatusfunc'* *'imsf'* + *'macatsui'* + *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'* 'shelltype' - 'shortname' - 'swapsync' - 'term' - 'termencoding' (Vim 7.4.852 also removed this for Windows) + *'shortname'* *'sn'* *'noshortname'* *'nosn'* + *'swapsync'* *'sws'* + *'term'* *E529* *E530* *E531* + *'termencoding'* *'tenc'* (Vim 7.4.852 also removed this for Windows) 'textauto' 'textmode' - 'toolbar' - 'toolbariconsize' - 'ttybuiltin' - 'ttymouse' - 'ttyscroll' - 'ttytype' + *'toolbar'* *'tb'* + *'toolbariconsize'* *'tbis'* + *'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'* + *'ttymouse'* *'ttym'* + *'ttyscroll'* *'tsl'* + *'ttytype'* *'tty'* 'weirdinvert' Other commands: @@ -247,6 +320,7 @@ Other commands: :mode (no longer accepts an argument) :open :shell + :smile :tearoff Other compile-time features: |