docs: vim_diff.txt #34502

Problem:
- Missing some important Vim features
- Since Nvim 0.5, package.path and package.cpath don't include
  `'runtimepath'` (thought `require()` can still find modules in
  `runtimepath`)

Closes #33938

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
This commit is contained in:
Phạm Bình An
2025-06-18 20:19:00 +07:00
committed by GitHub
parent 5cf135f9a0
commit 8e17b72094
2 changed files with 13 additions and 11 deletions

View File

@ -164,7 +164,7 @@ the cache manually first:
< <
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
See also: See also:
• |lua-module-load| • |lua-module-load|: how `require()` finds modules
• |pcall()| • |pcall()|
============================================================================== ==============================================================================
@ -235,7 +235,6 @@ See also:
• |builtin-functions|: alphabetic list of all Vimscript functions • |builtin-functions|: alphabetic list of all Vimscript functions
• |function-list|: list of all Vimscript functions grouped by topic • |function-list|: list of all Vimscript functions grouped by topic
• |:runtime|: run all Lua scripts matching a pattern in |'runtimepath'| • |:runtime|: run all Lua scripts matching a pattern in |'runtimepath'|
• |package.path|: list of all paths searched by `require()`
============================================================================== ==============================================================================
Variables *lua-guide-variables* Variables *lua-guide-variables*

View File

@ -301,7 +301,7 @@ Commands:
- |:Man| is available by default, with many improvements such as completion - |:Man| is available by default, with many improvements such as completion
- |:match| can be invoked before highlight group is defined - |:match| can be invoked before highlight group is defined
- |:source| works with Lua - |:source| works with Lua
User commands can support |:command-preview| to show results as you type - User commands can support |:command-preview| to show results as you type
- |:write| with "++p" flag creates parent directories. - |:write| with "++p" flag creates parent directories.
Editor: Editor:
@ -495,6 +495,8 @@ These Nvim features were later integrated into Vim.
- |:source| works with anonymous (no file) scripts - |:source| works with anonymous (no file) scripts
- 'statusline' supports unlimited alignment sections - 'statusline' supports unlimited alignment sections
- |vim-tutor-mode| - |vim-tutor-mode|
- Lua: `require()` also searches for modules in 'runtimepath'.
- Lua: vim.g, vim.w, vim.b, vim.t, vim.v, vim.fn, vim.call()
============================================================================== ==============================================================================
Other changes *nvim-changed* Other changes *nvim-changed*
@ -566,7 +568,6 @@ coerced to strings. See |id()| for more details, currently it uses
|CursorMoved| triggers when moving between windows. |CursorMoved| triggers when moving between windows.
Lua interface (|lua.txt|): Lua interface (|lua.txt|):
- `:lua print("a\0b")` will print `a^@b`, like with `:echomsg "a\nb"` . In Vim - `: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 that prints `a` and `b` on separate lines, exactly like
`:lua print("a\nb")` . `:lua print("a\nb")` .
@ -574,8 +575,6 @@ Lua interface (|lua.txt|):
E5108: Lua: [string "<Vimscript compiled string>"]:1: TEST E5108: Lua: [string "<Vimscript compiled string>"]:1: TEST
< whereas Vim emits only "TEST". < whereas Vim emits only "TEST".
- Lua has direct access to Nvim |API| via `vim.api`. - 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: Commands:
- |:doautocmd| does not warn about "No matching autocommands". - |:doautocmd| does not warn about "No matching autocommands".
@ -653,6 +652,10 @@ Options:
the default behaviour. The implementation is equivalent to setting the default behaviour. The implementation is equivalent to setting
'titlestring' to `%t%(\ %M%)%(\ \(%{expand(\"%:~:h\")}\)%)%a\ -\ Nvim`. 'titlestring' to `%t%(\ %M%)%(\ \(%{expand(\"%:~:h\")}\)%)%a\ -\ Nvim`.
|packages|:
- "start" packages are not explicitly reported in 'runtimepath' (though they
are still searched for runtime files). See |runtime-search-path|
============================================================================== ==============================================================================
Missing features *nvim-missing* Missing features *nvim-missing*
@ -713,10 +716,11 @@ Compile-time features:
- Emacs tags support - Emacs tags support
- X11 integration (see |x11-selection|) - X11 integration (see |x11-selection|)
Cscope: Editor:
*cscope* - *cscope* support was removed in favour of plugin-based solutions such as:
- Cscope support was removed in favour of plugin-based solutions such as:
https://github.com/dhananjaylatkar/cscope_maps.nvim https://github.com/dhananjaylatkar/cscope_maps.nvim
- *popup-window* : Use |floating-windows| instead.
- *textprop* : Use |extmarks| instead.
Eval: Eval:
- *Vim9script* (the Vim 9+ flavor of Vimscript) is not supported. - *Vim9script* (the Vim 9+ flavor of Vimscript) is not supported.
@ -841,7 +845,6 @@ Options:
- weirdinvert - weirdinvert
Plugins: Plugins:
- logiPat - logiPat
- rrhelper - rrhelper
- *vimball* - *vimball*
@ -849,9 +852,9 @@ Plugins:
- tools/check_colors.vim - tools/check_colors.vim
- macros/{justify,matchit,shellmenu,swapmous}.vim: use `packadd! justify` etc. - macros/{justify,matchit,shellmenu,swapmous}.vim: use `packadd! justify` etc.
directly directly
- HelpToc: Use |gO| instead.
Providers: Providers:
- *if_lua* : Nvim |Lua| API is not compatible with Vim's "if_lua". - *if_lua* : Nvim |Lua| API is not compatible with Vim's "if_lua".
- *if_mzscheme* - *if_mzscheme*
- |if_pyth|: *python-bindeval* *python-Function* are not supported. - |if_pyth|: *python-bindeval* *python-Function* are not supported.