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

DEPRECATED IN 0.11 deprecated-0.11

API

nvim_subscribe() Plugins must maintain their own "multicast" channels list.
nvim_unsubscribe() Plugins must maintain their own "multicast" channels list.

LUA

vim.region() Use getregionpos() instead.

DIAGNOSTICS

vim.diagnostic.goto_next() Use vim.diagnostic.jump() with {count=1, float=true} instead.
vim.diagnostic.goto_prev() Use vim.diagnostic.jump() with {count=-1, float=true} instead.
vim.diagnostic.get_next_pos() Use the "lnum" and "col" fields from the return value of vim.diagnostic.get_next() instead.
vim.diagnostic.get_prev_pos() Use the "lnum" and "col" fields from the return value of vim.diagnostic.get_prev() instead.
The "win_id" parameter used by various functions is deprecated in favor of "winid" winid
The "cursor_position" parameter of vim.diagnostic.JumpOpts is renamed to "pos"

DEPRECATED IN 0.10 deprecated-0.10

DIAGNOSTICS

Configuring diagnostic-signs using :sign-define or sign_define(). Use the "signs" key of vim.diagnostic.config() instead.
vim.diagnostic functions:
Legacy signature: vim.diagnostic.enable(buf:number, namespace:number)

OPTIONS

The "term_background" UI option ui-ext-options is deprecated and no longer populated. Background color detection is now performed in Lua by the Nvim core, not the TUI.

TREESITTER

DEPRECATED IN 0.9 deprecated-0.9

LUA

nvim_exec() Use nvim_exec2() instead.

DEPRECATED IN 0.8 OR EARLIER

COMMANDS

:rv :rviminfo Deprecated alias to :rshada command.
:wv :wviminfo Deprecated 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().

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.

LUA

vim.register_keystroke_callback() Use vim.on_key() 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.
'langnoremap' Deprecated alias to 'nolangremap'.
'sessionoptions' Flags "unix", "slash" are ignored and always enabled.
'viewoptions' Flags "unix", "slash" are ignored and always enabled.
'viminfo' Deprecated alias to 'shada' option.
'viminfofile' Deprecated alias to 'shadafile' 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 Use jobpid(&channel) instead.
b:terminal_job_id Use &channel instead. To access in non-current buffer:
Lua: vim.bo[bufnr].channel
Vimscript: getbufvar(bufnr, '&channel')
Main
Commands index
Quick reference