changed:
- 1. Assuming /tmp/foo does not exist and /tmp can be written to
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.
- 2. If you try to create an existing directory with `'p'` (e.g. mkdir('/',
'p')) mkdir() will silently exit. In Vim this was an error.
- 3. mkdir() error messages now include strerror() text when mkdir fails.
|string()| and |:echo| behaviour changed:
- 1. No maximum recursion depth limit is applied to nested container
structures.
- 2. |string()| fails immediately on nested containers, not when recursion
limit was exceeded.
- 3. When |:echo| encounters duplicate containers like >vim
let l = []
echo [l, l]
< it does not use "[...]" (was: "[[], [...]]", now: "[[], []]"). "..." is
only used for recursive containers.
- 4. |: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
error out.
- 5. Stringifyed infinite and NaN values now use |str2float()| and can be
evaled back.
- 6. (internal) Trying to print or stringify VAR_UNKNOWN in Vim results in
nothing, E908, in Nvim it is internal error.
|json_decode()| behaviour changed:
- 1. It may output |msgpack-special-dict|.
- 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.
|json_encode()| behaviour slightly changed: now |msgpack-special-dict| values
are accepted, but |v:none| is not.
Viminfo text files were replaced with binary (messagepack) |shada| files.
Additional differences:
- |shada-c| has no effect.
- |shada-s| now limits size of every item and not just registers.
- 'viminfo' option got renamed to 'shada'. Old option is kept as an alias for
compatibility reasons.
- |:wviminfo| was renamed to |:wshada|, |:rviminfo| to |:rshada|. Old
commands are still kept.
- ShaDa file format was designed with forward and backward compatibility in
mind. |shada-compatibility|
- 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.
|shada-error-handling|
- ShaDa file keeps search direction (|v:searchforward|), viminfo does not.
|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.
|c_CTRL-R| pasting a non-special register into |cmdline| omits the last <CR>.
|CursorMoved| triggers when moving between windows.
Lua interface (|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')` emits the error: >
E5108: Lua: [string "<Vimscript compiled string>"]:1: TEST
< whereas Vim emits only "TEST".
- Lua has direct access to Nvim |API| via `vim.api`.
- Lua package.path and package.cpath are automatically updated according to
'runtimepath'. |lua-module-load|
Commands:
- |:doautocmd| does not warn about "No matching autocommands".
- |:wincmd| accepts a count.
- `:write!` does not show a prompt if the file was updated externally.
- |:=| does not accept |ex-flags|. With an arg it is equivalent to |:lua=|
Command-line:
- The meanings of arrow keys do not change depending on 'wildoptions'.
Functions:
- |input()| and |inputdialog()| support for each other’s features (return on
cancel and completion respectively) via dictionary argument (replaces all
other arguments