Nvim :help pages, generated from source using the tree-sitter-vimdoc parser.

The items listed below are deprecated: they will be removed in the future. They should not be used in new scripts, and old scripts should be updated.

Deprecated features


:rv :rviminfoDeprecated alias to :rshada command.
:wv :wviminfoDeprecated alias to :wshada command.


Deprecated way to:
set the server name (use --listen or serverstart() instead)
get the server name (use v:servername instead)
detect a parent Nvim (use $NVIM instead)
Ignored if --listen is given.
Unset by terminal and jobstart() unless explicitly given by the "env" option. Example:
call jobstart(['foo'], { 'env': { 'NVIM_LISTEN_ADDRESS': v:servername  } })


BufCreate Use BufAdd instead.
EncodingChanged Never fired; 'encoding' is always "utf-8".
FileEncoding Never fired; equivalent to EncodingChanged.
GUIEnter Never fired; use UIEnter instead.
GUIFailed Never fired.


<MouseDown> Use <ScrollWheelUp> instead.
<MouseUp> Use <ScrollWheelDown> instead.


buffer_exists() Obsolete name for bufexists().
buffer_name() Obsolete name for bufname().
buffer_number() Obsolete name for bufnr().
file_readable() Obsolete name for filereadable().
highlight_exists() Obsolete name for hlexists().
highlightID() Obsolete name for hlID().
inputdialog() Use input() instead.
jobclose() Obsolete name for chanclose()
jobsend() Obsolete name for chansend()
last_buffer_nr() Obsolete name for bufnr("$").
rpcstop() Use jobstop() instead to stop any job, or chanclose(id, "rpc") to close RPC communication without stopping the job. Use chanclose(id) to close any socket.


For each of the functions below, use the corresponding function in vim.diagnostic instead (unless otherwise noted). For example, use vim.diagnostic.get() instead of vim.lsp.diagnostic.get().
The following are deprecated without replacement. These functions are moved internally and are no longer exposed as part of the API. Instead, use vim.diagnostic.config() and
Configuring diagnostic-signs with :sign-define or sign_define() is no longer supported. Use the "signs" key of vim.diagnostic.config() instead.


vim.lsp.buf.server_ready() Use LspAttach instead, depending on your use-case. "Server ready" is not part of the LSP spec, so the Nvim LSP client cannot meaningfully implement it. "Ready" is ambiguous because:
Language servers may finish analyzing the workspace, but edits can always re-trigger analysis/builds.
Language servers can serve some requests even while processing changes.
vim.lsp.buf_get_clients() Use vim.lsp.get_clients() with {buffer=bufnr} instead.
vim.lsp.buf.formatting() Use vim.lsp.buf.format() with {async=true} instead.
vim.lsp.buf.formatting_sync() Use vim.lsp.buf.format() with {async=false} instead.
vim.lsp.util.lookup_section() Use vim.tbl_get() and vim.split() with {plain=true} instead.
vim.lsp.util.trim_empty_lines() Use vim.split() with trimempty instead.


vim.register_keystroke_callback() Use vim.on_key() instead.
vim.loop Use vim.uv instead.


]f [f Same as "gf".


'fe' 'fenc'+'enc' before Vim 6.0; no longer used.
'highlight' 'hl' Names of builtin highlight-groups cannot be changed.
'sessionoptions' Flags "unix", "slash" are ignored and always enabled.
'viewoptions' Flags "unix", "slash" are ignored and always enabled.
'viminfo'Deprecated alias to 'shada' option.
'paste' 'nopaste' Just Paste It.™ The 'paste' option is obsolete: paste is handled automatically when you paste text using your terminal's or GUI's paste feature (CTRL-SHIFT-v, CMD-v (macOS), middle-click, …). Enables "paste mode":
Disables mappings in Insert, Cmdline mode.
Disables abbreviations.
Treats 'formatoptions' as empty.
Disables the effect of these options:


ui-wildmenu Use ui-cmdline with ui-popupmenu instead. Enabled by the ext_wildmenu ui-option. Emits these events:
["wildmenu_show", items]
["wildmenu_select", selected]
term_background Unused. The terminal background color is now detected by the Nvim core directly instead of the TUI.


b:terminal_job_pid PID of the top-level process in a :terminal. Use jobpid(&channel) instead.
Commands index
Quick reference