Deprecated

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


Nvim
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

COMMANDS

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

ENVIRONMENT VARIABLES

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  } })

EVENTS

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.

KEYCODES

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

FUNCTIONS

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.

HIGHLIGHTS

LSP DIAGNOSTICS

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 vim.diagnostic.show().
Configuring diagnostic-signs with :sign-define or sign_define() is no longer supported. Use the "signs" key of vim.diagnostic.config() instead.

LSP FUNCTIONS

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.

LUA

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

NORMAL COMMANDS

]f [f Same as "gf".

OPTIONS

'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 EXTENSIONS

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]
["wildmenu_hide"]
term_background Unused. The terminal background color is now detected by the Nvim core directly instead of the TUI.

VARIABLES

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