deprecated.txt 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. *deprecated.txt* Nvim
  2. NVIM REFERENCE MANUAL
  3. Nvim *deprecated*
  4. The items listed below are deprecated: they will be removed in the future.
  5. They should not be used in new scripts, and old scripts should be updated.
  6. ==============================================================================
  7. Deprecated features
  8. API
  9. - *nvim_buf_clear_highlight()* Use |nvim_buf_clear_namespace()| instead.
  10. - *nvim_buf_set_virtual_text()* Use |nvim_buf_set_extmark()| instead.
  11. - *nvim_command_output()* Use |nvim_exec()| instead.
  12. - *nvim_execute_lua()* Use |nvim_exec_lua()| instead.
  13. COMMANDS
  14. - *:rv* *:rviminfo* Deprecated alias to |:rshada| command.
  15. - *:wv* *:wviminfo* Deprecated alias to |:wshada| command.
  16. ENVIRONMENT VARIABLES
  17. - *$NVIM_LISTEN_ADDRESS*
  18. - Deprecated way to:
  19. - set the server name (use |--listen| or |serverstart()| instead)
  20. - get the server name (use |v:servername| instead)
  21. - detect a parent Nvim (use |$NVIM| instead)
  22. - Ignored if --listen is given.
  23. - Unset by |terminal| and |jobstart()| unless explicitly given by the "env"
  24. option. Example: >
  25. call jobstart(['foo'], { 'env': { 'NVIM_LISTEN_ADDRESS': v:servername } })
  26. <
  27. EVENTS
  28. - *BufCreate* Use |BufAdd| instead.
  29. - *EncodingChanged* Never fired; 'encoding' is always "utf-8".
  30. - *FileEncoding* Never fired; equivalent to |EncodingChanged|.
  31. - *GUIEnter* Never fired; use |UIEnter| instead.
  32. - *GUIFailed* Never fired.
  33. KEYCODES
  34. - *<MouseDown>* Use <ScrollWheelUp> instead.
  35. - *<MouseUp>* Use <ScrollWheelDown> instead.
  36. FUNCTIONS
  37. - *buffer_exists()* Obsolete name for |bufexists()|.
  38. - *buffer_name()* Obsolete name for |bufname()|.
  39. - *buffer_number()* Obsolete name for |bufnr()|.
  40. - *file_readable()* Obsolete name for |filereadable()|.
  41. - *health#report_error* Use Lua |vim.health.report_error()| instead.
  42. - *health#report_info* Use Lua |vim.health.report_info()| instead.
  43. - *health#report_ok* Use Lua |vim.health.report_ok()| instead.
  44. - *health#report_start* Use Lua |vim.health.report_start()| instead.
  45. - *health#report_warn* Use Lua |vim.health.report_warn()| instead.
  46. - *highlight_exists()* Obsolete name for |hlexists()|.
  47. - *highlightID()* Obsolete name for |hlID()|.
  48. - *inputdialog()* Use |input()| instead.
  49. - *jobclose()* Obsolete name for |chanclose()|
  50. - *jobsend()* Obsolete name for |chansend()|
  51. - *last_buffer_nr()* Obsolete name for bufnr("$").
  52. - *rpcstop()* Use |jobstop()| instead to stop any job, or
  53. `chanclose(id, "rpc")` to close RPC communication
  54. without stopping the job. Use chanclose(id) to close
  55. any socket.
  56. HIGHLIGHTS
  57. - *hl-VertSplit* Use |hl-WinSeparator| instead.
  58. LSP DIAGNOSTICS
  59. For each of the functions below, use the corresponding function in
  60. |vim.diagnostic| instead (unless otherwise noted). For example, use
  61. |vim.diagnostic.get()| instead of |vim.lsp.diagnostic.get()|.
  62. - *vim.lsp.diagnostic.clear()* Use |vim.diagnostic.hide()| instead.
  63. - *vim.lsp.diagnostic.disable()*
  64. - *vim.lsp.diagnostic.display()* Use |vim.diagnostic.show()| instead.
  65. - *vim.lsp.diagnostic.enable()*
  66. - *vim.lsp.diagnostic.get()*
  67. - *vim.lsp.diagnostic.get_all()* Use |vim.diagnostic.get()| instead.
  68. - *vim.lsp.diagnostic.get_count()* Use |vim.diagnostic.get()| instead.
  69. - *vim.lsp.diagnostic.get_line_diagnostics()* Use |vim.diagnostic.get()| instead.
  70. - *vim.lsp.diagnostic.get_next()*
  71. - *vim.lsp.diagnostic.get_next_pos()*
  72. - *vim.lsp.diagnostic.get_prev()*
  73. - *vim.lsp.diagnostic.get_prev_pos()*
  74. - *vim.lsp.diagnostic.get_virtual_text_chunks_for_line()* No replacement. Use
  75. options provided by |vim.diagnostic.config()| to customize virtual text.
  76. - *vim.lsp.diagnostic.goto_next()*
  77. - *vim.lsp.diagnostic.goto_prev()*
  78. - *vim.lsp.diagnostic.redraw()* Use |vim.diagnostic.show()| instead.
  79. - *vim.lsp.diagnostic.reset()*
  80. - *vim.lsp.diagnostic.save()* Use |vim.diagnostic.set()| instead.
  81. - *vim.lsp.diagnostic.set_loclist()* Use |vim.diagnostic.setloclist()| instead.
  82. - *vim.lsp.diagnostic.set_qflist()* Use |vim.diagnostic.setqflist()| instead.
  83. - *vim.lsp.diagnostic.show_line_diagnostics()* Use |vim.diagnostic.open_float()| instead.
  84. - *vim.lsp.diagnostic.show_position_diagnostics()* Use |vim.diagnostic.open_float()| instead.
  85. The following are deprecated without replacement. These functions are moved
  86. internally and are no longer exposed as part of the API. Instead, use
  87. |vim.diagnostic.config()| and |vim.diagnostic.show()|.
  88. - *vim.lsp.diagnostic.set_signs()*
  89. - *vim.lsp.diagnostic.set_underline()*
  90. - *vim.lsp.diagnostic.set_virtual_text()*
  91. LSP FUNCTIONS
  92. - *vim.lsp.util.diagnostics_to_items()* Use |vim.diagnostic.toqflist()| instead.
  93. - *vim.lsp.util.set_qflist()* Use |setqflist()| instead.
  94. - *vim.lsp.util.set_loclist()* Use |setloclist()| instead.
  95. - *vim.lsp.buf_get_clients()* Use |vim.lsp.get_active_clients()| with
  96. {buffer = bufnr} instead.
  97. - vim.lsp.buf.formatting() Use |vim.lsp.buf.format()| with
  98. {async = true} instead.
  99. - vim.lsp.buf.range_formatting() Use |vim.lsp.formatexpr()|
  100. or |vim.lsp.buf.format()| instead.
  101. LUA
  102. - *vim.register_keystroke_callback()* Use |vim.on_key()| instead.
  103. NORMAL COMMANDS
  104. - *]f* *[f* Same as "gf".
  105. OPTIONS
  106. - *cpo-<* *:menu-<special>* *:menu-special* *:map-<special>* *:map-special*
  107. `<>` notation is always enabled.
  108. - *'cscopeverbose'* Enabled by default. Use |:silent| instead.
  109. - *'exrc'* *'ex'* Security risk: downloaded files could include
  110. a malicious .nvimrc or .exrc file. See 'secure'.
  111. Recommended alternative: define an autocommand in your
  112. |vimrc| to set options for a matching directory.
  113. - 'gdefault' Enables the |:substitute| flag 'g' by default.
  114. - *'fe'* 'fenc'+'enc' before Vim 6.0; no longer used.
  115. - *'highlight'* *'hl'* Names of builtin |highlight-groups| cannot be changed.
  116. - *'langnoremap'* Deprecated alias to 'nolangremap'.
  117. - 'sessionoptions' Flags "unix", "slash" are ignored and always enabled.
  118. - *'vi'*
  119. - 'viewoptions' Flags "unix", "slash" are ignored and always enabled.
  120. - *'viminfo'* Deprecated alias to 'shada' option.
  121. - *'viminfofile'* Deprecated alias to 'shadafile' option.
  122. UI EXTENSIONS
  123. - *ui-wildmenu* Use |ui-cmdline| with |ui-popupmenu| instead. Enabled
  124. by the `ext_wildmenu` |ui-option|. Emits these events:
  125. - `["wildmenu_show", items]`
  126. - `["wildmenu_select", selected]`
  127. - `["wildmenu_hide"]`
  128. VARIABLES
  129. - *b:terminal_job_pid* PID of the top-level process in a |:terminal|.
  130. Use `jobpid(&channel)` instead.
  131. vim:noet:tw=78:ts=8:ft=help:norl: