2017-03-21 09:08:19 -07:00
|
|
|
|
*vim_diff.txt* Nvim
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
|
|
|
|
|
2024-04-30 09:37:45 -07:00
|
|
|
|
NVIM REFERENCE MANUAL
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
|
|
|
|
|
2024-04-30 09:37:45 -07:00
|
|
|
|
Differences between Nvim and Vim *vim-differences*
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2021-08-27 03:59:13 -07:00
|
|
|
|
Nvim differs from Vim in many ways, although editor and Vimscript (not
|
|
|
|
|
Vim9script) features are mostly identical. This document is a complete and
|
|
|
|
|
centralized reference of the differences.
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2024-04-30 09:37:45 -07:00
|
|
|
|
Type |gO| to see the table of contents.
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
|
|
|
|
==============================================================================
|
2024-04-30 09:37:45 -07:00
|
|
|
|
Configuration *nvim-config*
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2023-06-19 02:24:44 -07:00
|
|
|
|
User configuration and data files are found in standard |base-directories|
|
|
|
|
|
(see also |$NVIM_APPNAME|). Note in particular:
|
|
|
|
|
|
2021-08-27 03:59:13 -07:00
|
|
|
|
- Use `$XDG_CONFIG_HOME/nvim/init.vim` instead of `.vimrc` for your |config|.
|
2015-10-17 07:25:53 -07:00
|
|
|
|
- Use `$XDG_CONFIG_HOME/nvim` instead of `.vim` to store configuration files.
|
2021-09-06 10:35:34 -07:00
|
|
|
|
- Use `$XDG_STATE_HOME/nvim/shada/main.shada` instead of `.viminfo` for persistent
|
2017-12-27 11:30:23 -07:00
|
|
|
|
session information. |shada|
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
|
|
|
|
==============================================================================
|
2024-04-30 09:37:45 -07:00
|
|
|
|
Defaults *nvim-defaults*
|
2015-05-16 00:10:38 -07:00
|
|
|
|
|
2022-01-18 12:46:41 -07:00
|
|
|
|
- Filetype detection is enabled by default. This can be disabled by adding
|
|
|
|
|
":filetype off" to |init.vim|.
|
|
|
|
|
- Syntax highlighting is enabled by default. This can be disabled by adding
|
|
|
|
|
":syntax off" to |init.vim|.
|
2023-12-12 09:07:45 -07:00
|
|
|
|
- Default color scheme has been updated. This can result in color schemes
|
|
|
|
|
looking differently due to them relying on how highlight groups are defined
|
2023-12-21 05:53:43 -07:00
|
|
|
|
by default. Add ":colorscheme vim" to |init.vim| or
|
|
|
|
|
":source $VIMRUNTIME/colors/vim.lua" to your color scheme file to restore
|
|
|
|
|
the old default links and colors.
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2019-07-01 14:59:24 -07:00
|
|
|
|
- 'autoindent' is enabled
|
2023-06-19 02:24:44 -07:00
|
|
|
|
- 'autoread' is enabled (works in all UIs, including terminal)
|
2019-07-01 14:59:24 -07:00
|
|
|
|
- 'background' defaults to "dark" (unless set automatically by the terminal/UI)
|
2015-05-12 16:49:24 -07:00
|
|
|
|
- 'backspace' defaults to "indent,eol,start"
|
2021-09-06 10:35:34 -07:00
|
|
|
|
- 'backupdir' defaults to .,~/.local/state/nvim/backup// (|xdg|), auto-created
|
2017-02-09 19:39:00 -07:00
|
|
|
|
- 'belloff' defaults to "all"
|
2023-08-09 15:33:53 -07:00
|
|
|
|
- 'comments' includes "fb:•"
|
2023-04-02 08:01:48 -07:00
|
|
|
|
- 'commentstring' defaults to ""
|
2019-07-01 14:59:24 -07:00
|
|
|
|
- 'compatible' is always disabled
|
|
|
|
|
- 'complete' excludes "i"
|
2023-06-06 09:26:29 -07:00
|
|
|
|
- 'define' defaults to "". The C ftplugin sets it to "^\\s*#\\s*define"
|
2021-09-06 10:35:34 -07:00
|
|
|
|
- 'directory' defaults to ~/.local/state/nvim/swap// (|xdg|), auto-created
|
2022-09-27 07:19:15 -07:00
|
|
|
|
- 'display' defaults to "lastline"
|
2017-12-27 11:30:23 -07:00
|
|
|
|
- 'encoding' is UTF-8 (cf. 'fileencoding' for file-content encoding)
|
2023-09-23 20:20:23 -07:00
|
|
|
|
- 'fillchars' defaults (in effect) to "vert:│,fold:·,foldsep:│"
|
2015-05-15 22:23:16 -07:00
|
|
|
|
- 'formatoptions' defaults to "tcqj"
|
2024-04-28 09:00:48 -07:00
|
|
|
|
- 'grepprg' uses the -H and -I flags for regular grep,
|
|
|
|
|
and defaults to using ripgrep if available
|
2021-08-17 11:12:09 -07:00
|
|
|
|
- 'hidden' is enabled
|
2015-06-20 11:59:25 -07:00
|
|
|
|
- 'history' defaults to 10000 (the maximum)
|
2019-07-01 14:59:24 -07:00
|
|
|
|
- 'hlsearch' is enabled
|
2023-06-06 09:26:29 -07:00
|
|
|
|
- 'include' defaults to "". The C ftplugin sets it to "^\\s*#\\s*include"
|
2019-07-01 14:59:24 -07:00
|
|
|
|
- 'incsearch' is enabled
|
2023-10-06 03:59:39 -07:00
|
|
|
|
- 'isfname' does not include ":" (on Windows). Drive letters are handled
|
|
|
|
|
correctly without it. (Use |gF| for filepaths suffixed with ":line:col").
|
2021-08-17 11:12:47 -07:00
|
|
|
|
- 'joinspaces' is disabled
|
2024-09-19 03:32:50 -07:00
|
|
|
|
- 'jumpoptions' defaults to "clean"
|
2019-07-01 14:59:24 -07:00
|
|
|
|
- 'langnoremap' is enabled
|
|
|
|
|
- 'langremap' is disabled
|
2015-06-20 14:45:03 -07:00
|
|
|
|
- 'laststatus' defaults to 2 (statusline is always shown)
|
2015-06-20 13:16:10 -07:00
|
|
|
|
- 'listchars' defaults to "tab:> ,trail:-,nbsp:+"
|
2022-07-17 04:14:04 -07:00
|
|
|
|
- 'mouse' defaults to "nvi"
|
|
|
|
|
- 'mousemodel' defaults to "popup_setpos"
|
2016-02-15 11:55:51 -07:00
|
|
|
|
- 'nrformats' defaults to "bin,hex"
|
2023-06-06 09:26:29 -07:00
|
|
|
|
- 'path' defaults to ".,,". The C ftplugin adds "/usr/include" if it exists.
|
2019-07-01 14:59:24 -07:00
|
|
|
|
- 'ruler' is enabled
|
2020-08-15 19:19:06 -07:00
|
|
|
|
- 'sessionoptions' includes "unix,slash", excludes "options"
|
2023-06-05 02:19:05 -07:00
|
|
|
|
- 'shortmess' includes "CF", excludes "S"
|
2019-07-01 14:59:24 -07:00
|
|
|
|
- 'showcmd' is enabled
|
2018-02-07 17:11:54 -07:00
|
|
|
|
- 'sidescroll' defaults to 1
|
2019-07-01 14:59:24 -07:00
|
|
|
|
- 'smarttab' is enabled
|
2019-10-01 07:14:00 -07:00
|
|
|
|
- 'startofline' is disabled
|
2021-08-16 11:20:46 -07:00
|
|
|
|
- 'switchbuf' defaults to "uselast"
|
2015-06-20 12:10:29 -07:00
|
|
|
|
- 'tabpagemax' defaults to 50
|
2015-05-15 22:33:26 -07:00
|
|
|
|
- 'tags' defaults to "./tags;,tags"
|
2023-12-05 11:01:32 -07:00
|
|
|
|
- 'termguicolors' is enabled by default if Nvim can detect support from the
|
|
|
|
|
host terminal
|
2024-03-11 22:51:53 -07:00
|
|
|
|
- 'ttimeout' is enabled
|
2018-09-01 09:17:49 -07:00
|
|
|
|
- 'ttimeoutlen' defaults to 50
|
2015-05-12 16:49:24 -07:00
|
|
|
|
- 'ttyfast' is always set
|
2021-09-06 10:35:34 -07:00
|
|
|
|
- 'undodir' defaults to ~/.local/state/nvim/undo// (|xdg|), auto-created
|
2021-08-16 13:05:24 -07:00
|
|
|
|
- 'viewoptions' includes "unix,slash", excludes "options"
|
2015-06-20 12:23:38 -07:00
|
|
|
|
- 'viminfo' includes "!"
|
2019-07-01 14:59:24 -07:00
|
|
|
|
- 'wildmenu' is enabled
|
|
|
|
|
- 'wildoptions' defaults to "pum,tagfile"
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2022-12-14 11:58:18 -07:00
|
|
|
|
- |editorconfig| plugin is enabled, .editorconfig settings are applied.
|
2022-09-02 07:20:29 -07:00
|
|
|
|
- |man.lua| plugin is enabled, so |:Man| is available by default.
|
2022-11-22 10:41:00 -07:00
|
|
|
|
- |matchit| plugin is enabled. To disable it in your config: >vim
|
2019-08-01 06:29:47 -07:00
|
|
|
|
:let loaded_matchit = 1
|
|
|
|
|
|
2021-03-27 16:43:06 -07:00
|
|
|
|
- |g:vimsyn_embed| defaults to "l" to enable Lua highlighting
|
|
|
|
|
|
2023-01-10 07:49:39 -07:00
|
|
|
|
DEFAULT MOUSE
|
2024-04-30 09:37:45 -07:00
|
|
|
|
*default-mouse* *disable-mouse*
|
2022-10-06 06:16:00 -07:00
|
|
|
|
By default the mouse is enabled, and <RightMouse> opens a |popup-menu| with
|
|
|
|
|
standard actions ("Cut", "Copy", "Paste", …). Mouse is NOT enabled in
|
|
|
|
|
|command-mode| or the |more-prompt|, so you can temporarily disable it just by
|
|
|
|
|
typing ":".
|
|
|
|
|
|
|
|
|
|
If you don't like this you can disable the mouse in your |config| using any of
|
|
|
|
|
the following:
|
2022-11-22 10:41:00 -07:00
|
|
|
|
- Disable mouse completely by unsetting the 'mouse' option: >vim
|
2022-07-17 04:14:04 -07:00
|
|
|
|
set mouse=
|
2022-11-22 10:41:00 -07:00
|
|
|
|
- Pressing <RightMouse> extends selection instead of showing popup-menu: >vim
|
2022-07-17 04:14:04 -07:00
|
|
|
|
set mousemodel=extend
|
2022-11-22 10:41:00 -07:00
|
|
|
|
- Pressing <A-LeftMouse> releases mouse until the cursor moves: >vim
|
2022-10-06 06:16:00 -07:00
|
|
|
|
nnoremap <A-LeftMouse> <Cmd>
|
2022-07-17 04:14:04 -07:00
|
|
|
|
\ set mouse=<Bar>
|
|
|
|
|
\ echo 'mouse OFF until next cursor-move'<Bar>
|
|
|
|
|
\ autocmd CursorMoved * ++once set mouse&<Bar>
|
|
|
|
|
\ echo 'mouse ON'<CR>
|
|
|
|
|
<
|
2022-12-12 18:43:49 -07:00
|
|
|
|
To remove the "How-to disable mouse" menu item and the separator above it: >vim
|
|
|
|
|
aunmenu PopUp.How-to\ disable\ mouse
|
|
|
|
|
aunmenu PopUp.-1-
|
|
|
|
|
<
|
2023-01-10 07:49:39 -07:00
|
|
|
|
DEFAULT MAPPINGS
|
2024-04-30 09:37:45 -07:00
|
|
|
|
*default-mappings*
|
2021-08-27 03:59:13 -07:00
|
|
|
|
Nvim creates the following default mappings at |startup|. You can disable any
|
|
|
|
|
of these in your config by simply removing the mapping, e.g. ":unmap Y".
|
2023-07-05 10:47:43 -07:00
|
|
|
|
|
2023-07-12 10:27:14 -07:00
|
|
|
|
- Y |Y-default|
|
|
|
|
|
- <C-U> |i_CTRL-U-default|
|
|
|
|
|
- <C-W> |i_CTRL-W-default|
|
|
|
|
|
- <C-L> |CTRL-L-default|
|
|
|
|
|
- & |&-default|
|
2023-12-26 16:26:18 -07:00
|
|
|
|
- Q |v_Q-default|
|
|
|
|
|
- @ |v_@-default|
|
2023-07-12 10:27:14 -07:00
|
|
|
|
- # |v_#-default|
|
|
|
|
|
- * |v_star-default|
|
feat(comment): add built-in commenting
Design
- Enable commenting support only through `gc` mappings for simplicity.
No ability to configure, no Lua module, no user commands. Yet.
- Overall implementation is a simplified version of 'mini.comment'
module of 'echasnovski/mini.nvim' adapted to be a better suit for
core. It basically means reducing code paths which use only specific
fixed set of plugin config.
All used options are default except `pad_comment_parts = false`. This
means that 'commentstring' option is used as is without forcing single
space inner padding.
As 'tpope/vim-commentary' was considered for inclusion earlier, here is
a quick summary of how this commit differs from it:
- **User-facing features**. Both implement similar user-facing mappings.
This commit does not include `gcu` which is essentially a `gcgc`.
There are no commands, events, or configuration in this commit.
- **Size**. Both have reasonably comparable number of lines of code,
while this commit has more comments in tricky areas.
- **Maintainability**. This commit has (purely subjectively) better
readability, tests, and Lua types.
- **Configurability**. This commit has no user configuration, while
'vim-commentary' has some (partially as a counter-measure to possibly
modifying 'commentstring' option).
- **Extra features**:
- This commit supports tree-sitter by computing `'commentstring'`
option under cursor, which can matter in presence of tree-sitter
injected languages.
- This commit comments blank lines while 'tpope/vim-commentary' does
not. At the same time, blank lines are not taken into account when
deciding the toggle action.
- This commit has much better speed on larger chunks of lines (like
above 1000). This is thanks to using `nvim_buf_set_lines()` to set
all new lines at once, and not with `vim.fn.setline()`.
2024-04-04 08:10:12 -07:00
|
|
|
|
- gc |gc-default| |v_gc-default| |o_gc-default|
|
|
|
|
|
- gcc |gcc-default|
|
2024-04-26 11:16:12 -07:00
|
|
|
|
- ]d |]d-default|
|
|
|
|
|
- [d |[d-default|
|
|
|
|
|
- <C-W>d |CTRL-W_d-default|
|
2023-07-12 10:27:14 -07:00
|
|
|
|
- Nvim LSP client defaults |lsp-defaults|
|
|
|
|
|
- K |K-lsp-default|
|
2023-06-05 20:05:51 -07:00
|
|
|
|
|
2023-01-10 07:49:39 -07:00
|
|
|
|
DEFAULT AUTOCOMMANDS
|
2024-04-30 09:37:45 -07:00
|
|
|
|
*default-autocmds*
|
2021-09-02 04:17:04 -07:00
|
|
|
|
Default autocommands exist in the following groups. Use ":autocmd! {group}" to
|
|
|
|
|
remove them and ":autocmd {group}" to see how they're defined.
|
|
|
|
|
|
|
|
|
|
nvim_terminal:
|
2021-09-02 10:29:59 -07:00
|
|
|
|
- BufReadCmd: Treats "term://" buffers as |terminal| buffers. |terminal-start|
|
2023-08-10 07:53:56 -07:00
|
|
|
|
- TermClose: A |terminal| buffer started with no arguments (which thus uses
|
|
|
|
|
'shell') and which exits with no error is closed automatically.
|
2024-01-15 09:12:07 -07:00
|
|
|
|
- TermRequest: The terminal emulator responds to OSC background and foreground
|
|
|
|
|
requests, indicating (1) a black background and white foreground when Nvim
|
|
|
|
|
option 'background' is "dark" or (2) a white background and black foreground
|
|
|
|
|
when 'background' is "light". While this may not reflect the actual
|
|
|
|
|
foreground/background color, it permits 'background' to be retained for a
|
|
|
|
|
nested Nvim instance running in the terminal emulator.
|
2021-09-02 04:17:04 -07:00
|
|
|
|
|
|
|
|
|
nvim_cmdwin:
|
2021-09-02 10:29:59 -07:00
|
|
|
|
- CmdwinEnter: Limits syntax sync to maxlines=1 in the |cmdwin|.
|
2021-08-15 21:24:59 -07:00
|
|
|
|
|
2023-10-04 06:31:25 -07:00
|
|
|
|
nvim_swapfile:
|
|
|
|
|
- SwapExists: Skips the swapfile prompt (sets |v:swapchoice| to "e") when the
|
|
|
|
|
swapfile is owned by a running Nvim process. Shows |W325| "Ignoring
|
|
|
|
|
swapfile…" message.
|
|
|
|
|
|
2015-01-30 05:19:43 -07:00
|
|
|
|
==============================================================================
|
2024-04-30 09:37:45 -07:00
|
|
|
|
New Features *nvim-features*
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
2022-12-11 19:41:26 -07:00
|
|
|
|
MAJOR COMPONENTS
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
2023-01-10 07:49:39 -07:00
|
|
|
|
- API |API|
|
|
|
|
|
- Job control |job-control|
|
|
|
|
|
- LSP framework |lsp|
|
|
|
|
|
- Lua scripting |lua|
|
|
|
|
|
- Parsing engine |treesitter|
|
|
|
|
|
- Providers
|
|
|
|
|
- Clipboard |provider-clipboard|
|
|
|
|
|
- Node.js plugins |provider-nodejs|
|
|
|
|
|
- Python plugins |provider-python|
|
|
|
|
|
- Ruby plugins |provider-ruby|
|
|
|
|
|
- Remote plugins |remote-plugin|
|
|
|
|
|
- Shared data |shada|
|
|
|
|
|
- Terminal emulator |terminal|
|
|
|
|
|
- UI |ui| |--listen| |--server|
|
|
|
|
|
- Vimscript parser |nvim_parse_expression()|
|
|
|
|
|
- XDG base directories |xdg|
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
2022-12-11 19:41:26 -07:00
|
|
|
|
USER EXPERIENCE
|
2016-10-15 18:54:22 -07:00
|
|
|
|
|
2017-08-17 12:23:28 -07:00
|
|
|
|
Working intuitively and consistently is a major goal of Nvim.
|
2016-10-15 18:54:22 -07:00
|
|
|
|
|
2024-04-30 09:37:45 -07:00
|
|
|
|
*feature-compile*
|
2023-01-10 07:49:39 -07:00
|
|
|
|
- Nvim always includes ALL features, in contrast to Vim (which ships various
|
|
|
|
|
combinations of 100+ optional features). |feature-compile| Think of it as
|
|
|
|
|
a leaner version of Vim's "HUGE" build. This reduces surface area for bugs,
|
|
|
|
|
and removes a common source of confusion and friction for users.
|
2017-08-17 12:23:28 -07:00
|
|
|
|
|
|
|
|
|
- Nvim avoids features that cannot be provided on all platforms; instead that
|
|
|
|
|
is delegated to external plugins/extensions. E.g. the `-X` platform-specific
|
|
|
|
|
option is "sometimes" available in Vim (with potential surprises:
|
2022-10-14 08:01:13 -07:00
|
|
|
|
https://stackoverflow.com/q/14635295).
|
2017-01-03 21:32:46 -07:00
|
|
|
|
|
2017-07-28 15:28:41 -07:00
|
|
|
|
- Vim's internal test functions (test_autochdir(), test_settime(), etc.) are
|
|
|
|
|
not exposed (nor implemented); instead Nvim has a robust API.
|
2016-10-15 18:54:22 -07:00
|
|
|
|
|
2017-08-19 05:13:14 -07:00
|
|
|
|
- Behaviors, options, documentation are removed if they cost users more time
|
|
|
|
|
than they save.
|
|
|
|
|
|
|
|
|
|
Usability details have been improved where the benefit outweighs any
|
|
|
|
|
backwards-compatibility cost. Some examples:
|
|
|
|
|
|
|
|
|
|
- Directories for 'directory' and 'undodir' are auto-created.
|
|
|
|
|
- Terminal features such as 'guicursor' are enabled where possible.
|
2023-01-10 07:49:39 -07:00
|
|
|
|
- Various "nvim" |cli-arguments| were redesigned.
|
2017-08-19 05:13:14 -07:00
|
|
|
|
|
2020-05-18 06:49:50 -07:00
|
|
|
|
Some features are built in that otherwise required external plugins:
|
|
|
|
|
|
2023-07-17 08:39:57 -07:00
|
|
|
|
- Highlighting the yanked region, see |vim.highlight|.
|
2020-05-18 06:49:50 -07:00
|
|
|
|
|
2022-12-11 19:41:26 -07:00
|
|
|
|
ARCHITECTURE
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
2023-01-10 07:49:39 -07:00
|
|
|
|
The Nvim UI is "decoupled" from the core editor: all UIs, including the
|
|
|
|
|
builtin |TUI| are just plugins that connect to a Nvim server (via |--server|
|
|
|
|
|
or |--embed|). Multiple Nvim UI clients can connect to the same Nvim editor
|
|
|
|
|
server.
|
|
|
|
|
|
2016-10-30 19:50:19 -07:00
|
|
|
|
External plugins run in separate processes. |remote-plugin| This improves
|
2017-05-20 14:49:46 -07:00
|
|
|
|
stability and allows those plugins to work without blocking the editor. Even
|
2018-08-25 07:38:24 -07:00
|
|
|
|
"legacy" Python and Ruby plugins which use the old Vim interfaces (|if_pyth|,
|
2023-06-19 02:24:44 -07:00
|
|
|
|
|if_ruby|) run out-of-process, so they cannot crash Nvim.
|
2016-10-30 19:50:19 -07:00
|
|
|
|
|
2017-07-28 15:28:41 -07:00
|
|
|
|
Platform and I/O facilities are built upon libuv. Nvim benefits from libuv
|
|
|
|
|
features and bug fixes, and other projects benefit from improvements to libuv
|
|
|
|
|
by Nvim developers.
|
2016-10-30 19:50:19 -07:00
|
|
|
|
|
2022-12-11 19:41:26 -07:00
|
|
|
|
FEATURES
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
2023-01-10 07:49:39 -07:00
|
|
|
|
Command-line:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- The expression prompt (|@=|, |c_CTRL-R_=|, |i_CTRL-R_=|) is highlighted
|
2021-08-27 03:59:13 -07:00
|
|
|
|
using a built-in Vimscript expression parser. |expr-highlight|
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- *E5408* *E5409* |input()|, |inputdialog()| support custom highlighting.
|
|
|
|
|
|input()-highlight|
|
|
|
|
|
- (Experimental) *g:Nvim_color_cmdline* Command-line (|:|) is colored by
|
|
|
|
|
callback defined in `g:Nvim_color_cmdline` (this callback is for testing
|
|
|
|
|
only, and will be removed in the future).
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
|
|
|
|
Commands:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |:checkhealth|
|
|
|
|
|
- |:drop| is always available
|
|
|
|
|
- |:Man| is available by default, with many improvements such as completion
|
|
|
|
|
- |:match| can be invoked before highlight group is defined
|
|
|
|
|
- |:source| works with Lua
|
2022-04-20 04:02:18 -07:00
|
|
|
|
User commands can support |:command-preview| to show results as you type
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |:write| with "++p" flag creates parent directories.
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
|
|
|
|
Events:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |RecordingEnter|
|
|
|
|
|
- |RecordingLeave|
|
|
|
|
|
- |SearchWrapped|
|
|
|
|
|
- |Signal|
|
|
|
|
|
- |TabNewEntered|
|
|
|
|
|
- |TermClose|
|
|
|
|
|
- |TermOpen|
|
|
|
|
|
- |UIEnter|
|
|
|
|
|
- |UILeave|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
|
|
|
|
|
Functions:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |dictwatcheradd()| notifies a callback whenever a |Dict| is modified
|
|
|
|
|
- |dictwatcherdel()|
|
|
|
|
|
- |menu_get()|
|
|
|
|
|
- |msgpackdump()|, |msgpackparse()| provide msgpack de/serialization
|
|
|
|
|
- |stdpath()|
|
|
|
|
|
- |system()|, |systemlist()| can run {cmd} directly (without 'shell')
|
|
|
|
|
- |matchadd()| can be called before highlight group is defined
|
|
|
|
|
- |tempname()| tries to recover if the Nvim |tempdir| disappears.
|
|
|
|
|
- |writefile()| with "p" flag creates parent directories.
|
2016-06-15 18:33:47 -07:00
|
|
|
|
|
|
|
|
|
Highlight groups:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |highlight-blend| controls blend level for a highlight group
|
|
|
|
|
- |expr-highlight| highlight groups (prefixed with "Nvim")
|
|
|
|
|
- |hl-NormalFloat| highlights floating window
|
|
|
|
|
- |hl-FloatBorder| highlights border of a floating window
|
|
|
|
|
- |hl-FloatTitle| highlights title of a floating window
|
|
|
|
|
- |hl-FloatFooter| highlights footer of a floating window
|
|
|
|
|
- |hl-NormalNC| highlights non-current windows
|
|
|
|
|
- |hl-MsgArea| highlights messages/cmdline area
|
|
|
|
|
- |hl-MsgSeparator| highlights separator for scrolled messages
|
|
|
|
|
- |hl-Substitute|
|
|
|
|
|
- |hl-TermCursor|
|
|
|
|
|
- |hl-TermCursorNC|
|
|
|
|
|
- |hl-WinSeparator| highlights window separators
|
|
|
|
|
- |hl-Whitespace| highlights 'listchars' whitespace
|
|
|
|
|
- |hl-WinBar| highlights 'winbar'
|
|
|
|
|
- |hl-WinBarNC| highlights non-current window 'winbar'
|
2017-12-09 10:47:34 -07:00
|
|
|
|
|
2020-08-31 00:51:35 -07:00
|
|
|
|
Input/Mappings:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- ALT (|META|) chords always work (even in the |TUI|). Map |<M-| with any key:
|
2017-12-27 11:30:23 -07:00
|
|
|
|
<M-1>, <M-BS>, <M-Del>, <M-Ins>, <M-/>, <M-\>, <M-Space>, <M-Enter>, etc.
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- Case-sensitive: <M-a> and <M-A> are two different keycodes.
|
|
|
|
|
- ALT may behave like <Esc> if not mapped. |i_ALT| |v_ALT| |c_ALT|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
|
|
|
|
|
Normal commands:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |gO| shows a filetype-defined "outline" of the current buffer.
|
|
|
|
|
- |Q| replays the last recorded macro instead of switching to Ex mode (|gQ|).
|
2017-12-27 11:30:23 -07:00
|
|
|
|
|
|
|
|
|
Options:
|
2024-04-30 04:30:21 -07:00
|
|
|
|
|
|
|
|
|
Local values for global-local number/boolean options are unset when the option
|
|
|
|
|
is set without a scope (e.g. by using |:set|), similarly to how global-local
|
|
|
|
|
string options work.
|
|
|
|
|
|
|
|
|
|
- 'autoread' works in the terminal (if it supports "focus" events)
|
|
|
|
|
- 'cpoptions' flags: |cpo-_|
|
|
|
|
|
- 'diffopt' "linematch" feature
|
|
|
|
|
- 'exrc' searches for ".nvim.lua", ".nvimrc", or ".exrc" files. The
|
2023-01-10 07:49:39 -07:00
|
|
|
|
user is prompted whether to trust the file.
|
2024-04-30 04:30:21 -07:00
|
|
|
|
- 'fillchars' flags: "msgsep", "horiz", "horizup", "horizdown",
|
2023-10-01 04:07:16 -07:00
|
|
|
|
"vertleft", "vertright", "verthoriz"
|
2024-04-30 04:30:21 -07:00
|
|
|
|
- 'foldcolumn' supports up to 9 dynamic/fixed columns
|
|
|
|
|
- 'guicursor' works in the terminal (TUI)
|
|
|
|
|
- 'inccommand' shows interactive results for |:substitute|-like commands
|
2022-04-20 04:02:18 -07:00
|
|
|
|
and |:command-preview| commands
|
2024-04-30 04:30:21 -07:00
|
|
|
|
- 'jumpoptions' "view" tries to restore the |mark-view| when moving through
|
2024-09-19 03:32:50 -07:00
|
|
|
|
"clean" removes unloaded buffer from the jumplist
|
2024-04-30 04:30:21 -07:00
|
|
|
|
- the |jumplist|, |changelist|, |alternate-file| or using |mark-motions|.
|
|
|
|
|
- 'laststatus' global statusline support
|
|
|
|
|
- 'mousescroll' amount to scroll by when scrolling with a mouse
|
|
|
|
|
- 'pumblend' pseudo-transparent popupmenu
|
|
|
|
|
- 'scrollback'
|
|
|
|
|
- 'shortmess'
|
|
|
|
|
- "F" flag does not affect output from autocommands.
|
|
|
|
|
- "q" flag fully hides macro recording message.
|
|
|
|
|
- 'signcolumn' supports up to 9 dynamic/fixed columns
|
|
|
|
|
- 'statuscolumn' full control of columns using 'statusline' format
|
|
|
|
|
- 'tabline' middle-click on tabpage label closes tabpage,
|
2024-02-18 20:22:00 -07:00
|
|
|
|
and %@Func@foo%X can call any function on mouse-click
|
2024-04-30 04:30:21 -07:00
|
|
|
|
- 'termpastefilter'
|
|
|
|
|
- 'ttimeout', 'ttimeoutlen' behavior was simplified
|
|
|
|
|
- 'winblend' pseudo-transparency in floating windows |api-floatwin|
|
|
|
|
|
- 'winhighlight' window-local highlights
|
2023-01-10 07:49:39 -07:00
|
|
|
|
|
|
|
|
|
Providers:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- If a Python interpreter is available on your `$PATH`, |:python| and
|
2023-01-10 07:49:39 -07:00
|
|
|
|
|:python3| are always available. See |provider-python|.
|
|
|
|
|
|
|
|
|
|
Shell:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- Shell output (|:!|, |:make|, …) is always routed through the UI, so it
|
2023-01-10 07:49:39 -07:00
|
|
|
|
cannot "mess up" the screen. (You can still use "chansend(v:stderr,…)" if
|
|
|
|
|
you want to mess up the screen :)
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- Nvim throttles (skips) messages from shell commands (|:!|, |:grep|, |:make|)
|
2023-01-10 07:49:39 -07:00
|
|
|
|
if there is too much output. No data is lost, this only affects display and
|
|
|
|
|
improves performance. |:terminal| output is never throttled.
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |:!| does not support "interactive" commands. Use |:terminal| instead.
|
2023-01-10 07:49:39 -07:00
|
|
|
|
(GUI Vim has a similar limitation, see ":help gui-pty" in Vim.)
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- :!start is not special-cased on Windows.
|
|
|
|
|
- |system()| does not support writing/reading "backgrounded" commands. |E5677|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
|
signs: support multiple columns #9295
closes #990
closes #9295
- Support for multiple auto-adjusted sign columns.
With this change, having more than one sign on a line, and with the
'auto' setting on 'signcolumn', extra columns will shown automatically
to accomodate all the existing signs.
For example, suppose we have this view:
5147 }
5148
5149 return sign->typenr;
5150 }
5151 }
5152 return 0;
5153 }
5154
We have GitGutter installed, so it tells us about modified lines that
are not commmited. So let's change line 5152:
5147 }
5148
5149 return sign->typenr;
5150 }
5151 }
~ 5152 return 0;
5153 }
5154
Now we add a mark over line 5152 using 'ma' in normal mode:
5147 }
5148
5149 return sign->typenr;
5150 }
5151 }
a ~ 5152 return 0;
5153 }
5154
Previously, Vim/Nvim would have picked only one of the signs,
because there was no support for having multiple signs in a line.
- Remove signs from deleted lines.
Suppose we have highlights on a group of lines and we delete them:
+ 6 use std::ops::Deref;
--+ 7 use std::borrow::Cow;
--+ 8 use std::io::{Cursor};
9 use proc_macro2::TokenStream;
10 use syn::export::ToTokens;
--+ 11 use std::io::Write;
>> 12 use std::ops::Deref;
Without this change, these signs will momentarily accumulate in
the sign column until the plugins wake up to refresh them.
+ --+ --+ --+ >> 6
Discussion: It may be better to extend the API a bit and allow this
to happen for only certain types of signs. For example, VIM marks
and vim-gitgutter removal signs may want to be presreved, unlike
line additions and linter highlights.
- 'signcolumn': support 'auto:NUM' and 'yes:NUM' settings
- sort signs according to id, from lowest to highest. If you have
git-gutter, vim-signature, and ALE, it would appear in this order:
git-gutter - vim-signature - ALE.
- recalculate size before screen update
- If no space for all signs, prefer the higher ids (while keeping the
rendering order from low to high).
- Prevent duplicate signs. Duplicate signs were invisible to the user,
before using our extended non-standard signcolumn settings.
- multi signcols: fix bug related to wrapped lines.
In wrapped lines, the wrapped parts of a line did not include the extra
columns if they existed. The result was a misdrawing of the wrapped
parts. Fix the issue by:
1. initializing the signcol counter to 0 when we are on a wrap boundary
2. allowing for the draw of spaces in that case.
2019-03-24 18:16:58 -07:00
|
|
|
|
Signs:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- Signs are removed if the associated line is deleted.
|
|
|
|
|
- Signs placed twice with the same identifier in the same group are moved.
|
signs: support multiple columns #9295
closes #990
closes #9295
- Support for multiple auto-adjusted sign columns.
With this change, having more than one sign on a line, and with the
'auto' setting on 'signcolumn', extra columns will shown automatically
to accomodate all the existing signs.
For example, suppose we have this view:
5147 }
5148
5149 return sign->typenr;
5150 }
5151 }
5152 return 0;
5153 }
5154
We have GitGutter installed, so it tells us about modified lines that
are not commmited. So let's change line 5152:
5147 }
5148
5149 return sign->typenr;
5150 }
5151 }
~ 5152 return 0;
5153 }
5154
Now we add a mark over line 5152 using 'ma' in normal mode:
5147 }
5148
5149 return sign->typenr;
5150 }
5151 }
a ~ 5152 return 0;
5153 }
5154
Previously, Vim/Nvim would have picked only one of the signs,
because there was no support for having multiple signs in a line.
- Remove signs from deleted lines.
Suppose we have highlights on a group of lines and we delete them:
+ 6 use std::ops::Deref;
--+ 7 use std::borrow::Cow;
--+ 8 use std::io::{Cursor};
9 use proc_macro2::TokenStream;
10 use syn::export::ToTokens;
--+ 11 use std::io::Write;
>> 12 use std::ops::Deref;
Without this change, these signs will momentarily accumulate in
the sign column until the plugins wake up to refresh them.
+ --+ --+ --+ >> 6
Discussion: It may be better to extend the API a bit and allow this
to happen for only certain types of signs. For example, VIM marks
and vim-gitgutter removal signs may want to be presreved, unlike
line additions and linter highlights.
- 'signcolumn': support 'auto:NUM' and 'yes:NUM' settings
- sort signs according to id, from lowest to highest. If you have
git-gutter, vim-signature, and ALE, it would appear in this order:
git-gutter - vim-signature - ALE.
- recalculate size before screen update
- If no space for all signs, prefer the higher ids (while keeping the
rendering order from low to high).
- Prevent duplicate signs. Duplicate signs were invisible to the user,
before using our extended non-standard signcolumn settings.
- multi signcols: fix bug related to wrapped lines.
In wrapped lines, the wrapped parts of a line did not include the extra
columns if they existed. The result was a misdrawing of the wrapped
parts. Fix the issue by:
1. initializing the signcol counter to 0 when we are on a wrap boundary
2. allowing for the draw of spaces in that case.
2019-03-24 18:16:58 -07:00
|
|
|
|
|
2023-01-10 07:49:39 -07:00
|
|
|
|
Startup:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |-e| and |-es| invoke the same "improved Ex mode" as -E and -Es.
|
|
|
|
|
- |-E| and |-Es| read stdin as text (into buffer 1).
|
|
|
|
|
- |-es| and |-Es| have improved behavior:
|
2023-01-10 07:49:39 -07:00
|
|
|
|
- Quits automatically, don't need "-c qa!".
|
|
|
|
|
- Skips swap-file dialog.
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |-s| reads Normal commands from stdin if the script name is "-".
|
|
|
|
|
- Reading text (instead of commands) from stdin |--|:
|
2023-01-10 07:49:39 -07:00
|
|
|
|
- works by default: "-" file is optional
|
|
|
|
|
- works in more cases: |-Es|, file args
|
|
|
|
|
|
|
|
|
|
TUI:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
*:set-termcap*
|
|
|
|
|
- Start Nvim with 'verbose' level 3 to show terminal capabilities: >
|
|
|
|
|
nvim -V3
|
2023-01-10 07:49:39 -07:00
|
|
|
|
<
|
2024-04-30 09:37:45 -07:00
|
|
|
|
*'term'* *E529* *E530* *E531*
|
|
|
|
|
- 'term' reflects the terminal type derived from |$TERM| and other environment
|
2023-01-10 07:49:39 -07:00
|
|
|
|
checks. For debugging only; not reliable during startup. >vim
|
2024-04-30 09:37:45 -07:00
|
|
|
|
:echo &term
|
|
|
|
|
- "builtin_x" means one of the |builtin-terms| was chosen, because the expected
|
2023-01-10 07:49:39 -07:00
|
|
|
|
terminfo file was not found on the system.
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- Nvim will use 256-colour capability on Linux virtual terminals. Vim uses
|
2023-01-10 07:49:39 -07:00
|
|
|
|
only 8 colours plus bright foreground on Linux VTs.
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- Vim combines what is in its |builtin-terms| with what it reads from terminfo,
|
2023-01-10 07:49:39 -07:00
|
|
|
|
and has a 'ttybuiltin' setting to control how that combination works. Nvim
|
|
|
|
|
uses one or the other, it does not attempt to merge the two.
|
|
|
|
|
|
|
|
|
|
UI/Display:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |Visual| selection highlights the character at cursor. |visual-use|
|
|
|
|
|
- messages: When showing messages longer than 'cmdheight', only
|
2023-01-10 07:49:39 -07:00
|
|
|
|
scroll the message lines, not the entire screen. The
|
|
|
|
|
separator line is decorated by |hl-MsgSeparator| and
|
|
|
|
|
the "msgsep" flag of 'fillchars'. *msgsep*
|
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Variables:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |v:progpath| is always absolute ("full")
|
|
|
|
|
- |v:windowid| is always available (for use by external UIs)
|
|
|
|
|
- |OptionSet| autocommand args |v:option_new|, |v:option_old|,
|
|
|
|
|
- |v:option_oldlocal|, |v:option_oldglobal| have the type of the option
|
2023-10-14 09:19:11 -07:00
|
|
|
|
instead of always being strings. |v:option_old| is now the old global value
|
|
|
|
|
for all global-local options, instead of just string global-local options.
|
2017-07-26 02:31:01 -07:00
|
|
|
|
|
2023-01-10 07:49:39 -07:00
|
|
|
|
Vimscript:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |:redir| nested in |execute()| works.
|
2023-01-10 07:49:39 -07:00
|
|
|
|
|
2016-06-15 18:33:47 -07:00
|
|
|
|
==============================================================================
|
2024-04-30 09:37:45 -07:00
|
|
|
|
Upstreamed features *nvim-upstreamed*
|
2022-12-11 19:41:26 -07:00
|
|
|
|
|
|
|
|
|
These Nvim features were later integrated into Vim.
|
|
|
|
|
|
|
|
|
|
- 'fillchars' flags: "eob"
|
2023-10-01 04:07:16 -07:00
|
|
|
|
- 'jumpoptions' "stack" behavior
|
2022-12-11 19:41:26 -07:00
|
|
|
|
- 'wildoptions' flags: "pum" enables popupmenu for wildmode completion
|
|
|
|
|
- |<Cmd>|
|
|
|
|
|
- |WinClosed|
|
|
|
|
|
- |WinScrolled|
|
|
|
|
|
- |:sign-define| "numhl" argument
|
|
|
|
|
- |:source| works with anonymous (no file) scripts
|
2023-02-11 05:00:31 -07:00
|
|
|
|
- 'statusline' supports unlimited alignment sections
|
2022-12-11 19:41:26 -07:00
|
|
|
|
|
|
|
|
|
==============================================================================
|
2024-04-30 09:37:45 -07:00
|
|
|
|
Other changes *nvim-changed*
|
2021-10-19 07:37:11 -07:00
|
|
|
|
|
2023-06-19 02:24:44 -07:00
|
|
|
|
This section documents various low-level behavior changes.
|
2017-08-15 15:20:37 -07:00
|
|
|
|
|
2015-07-18 02:23:42 -07:00
|
|
|
|
|mkdir()| behaviour changed:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- 1. Assuming /tmp/foo does not exist and /tmp can be written to
|
|
|
|
|
mkdir('/tmp/foo/bar', 'p', 0700) will create both /tmp/foo and
|
|
|
|
|
/tmp/foo/bar with 0700 permissions. Vim mkdir will create /tmp/foo with
|
|
|
|
|
0755.
|
|
|
|
|
- 2. If you try to create an existing directory with `'p'` (e.g. mkdir('/',
|
|
|
|
|
'p')) mkdir() will silently exit. In Vim this was an error.
|
|
|
|
|
- 3. mkdir() error messages now include strerror() text when mkdir fails.
|
2015-07-18 02:23:42 -07:00
|
|
|
|
|
2015-09-20 08:04:33 -07:00
|
|
|
|
|string()| and |:echo| behaviour changed:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- 1. No maximum recursion depth limit is applied to nested container
|
|
|
|
|
structures.
|
|
|
|
|
- 2. |string()| fails immediately on nested containers, not when recursion
|
|
|
|
|
limit was exceeded.
|
|
|
|
|
- 3. When |:echo| encounters duplicate containers like >vim
|
2015-09-20 08:04:33 -07:00
|
|
|
|
let l = []
|
|
|
|
|
echo [l, l]
|
2024-04-30 09:37:45 -07:00
|
|
|
|
< it does not use "[...]" (was: "[[], [...]]", now: "[[], []]"). "..." is
|
|
|
|
|
only used for recursive containers.
|
|
|
|
|
- 4. |:echo| printing nested containers adds "@level" after "..." designating
|
|
|
|
|
the level at which recursive container was printed: |:echo-self-refer|.
|
|
|
|
|
Same thing applies to |string()| (though it uses construct like
|
|
|
|
|
"{E724@level}"), but this is not reliable because |string()| continues to
|
|
|
|
|
error out.
|
|
|
|
|
- 5. Stringifyed infinite and NaN values now use |str2float()| and can be
|
|
|
|
|
evaled back.
|
|
|
|
|
- 6. (internal) Trying to print or stringify VAR_UNKNOWN in Vim results in
|
|
|
|
|
nothing, E908, in Nvim it is internal error.
|
2015-09-20 08:04:33 -07:00
|
|
|
|
|
2016-02-13 11:39:28 -07:00
|
|
|
|
|json_decode()| behaviour changed:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- 1. It may output |msgpack-special-dict|.
|
|
|
|
|
- 2. |msgpack-special-dict| is emitted also in case of duplicate keys, while
|
|
|
|
|
in Vim it errors out.
|
|
|
|
|
- 3. It accepts only valid JSON. Trailing commas are not accepted.
|
2016-02-01 11:22:07 -07:00
|
|
|
|
|
2023-07-25 05:07:13 -07:00
|
|
|
|
|json_encode()| behaviour slightly changed: now |msgpack-special-dict| values
|
2016-02-13 11:39:28 -07:00
|
|
|
|
are accepted, but |v:none| is not.
|
|
|
|
|
|
2023-01-10 07:49:39 -07:00
|
|
|
|
Viminfo text files were replaced with binary (messagepack) |shada| files.
|
2015-07-05 04:08:50 -07:00
|
|
|
|
Additional differences:
|
|
|
|
|
|
|
|
|
|
- |shada-c| has no effect.
|
|
|
|
|
- |shada-s| now limits size of every item and not just registers.
|
2016-04-07 18:36:14 -07:00
|
|
|
|
- 'viminfo' option got renamed to 'shada'. Old option is kept as an alias for
|
2015-07-05 16:26:44 -07:00
|
|
|
|
compatibility reasons.
|
2016-04-07 18:36:14 -07:00
|
|
|
|
- |:wviminfo| was renamed to |:wshada|, |:rviminfo| to |:rshada|. Old
|
2015-08-15 04:50:04 -07:00
|
|
|
|
commands are still kept.
|
2016-04-07 18:36:14 -07:00
|
|
|
|
- ShaDa file format was designed with forward and backward compatibility in
|
2015-07-26 11:02:56 -07:00
|
|
|
|
mind. |shada-compatibility|
|
2016-04-07 18:36:14 -07:00
|
|
|
|
- Some errors make ShaDa code keep temporary file in-place for user to decide
|
|
|
|
|
what to do with it. Vim deletes temporary file in these cases.
|
2015-08-15 04:50:04 -07:00
|
|
|
|
|shada-error-handling|
|
2015-11-01 11:26:53 -07:00
|
|
|
|
- ShaDa file keeps search direction (|v:searchforward|), viminfo does not.
|
2015-07-05 04:08:50 -07:00
|
|
|
|
|
2023-07-25 05:07:13 -07:00
|
|
|
|
|printf()| returns something meaningful when used with `%p` argument: in Vim
|
|
|
|
|
it used to return useless address of the string (strings are copied to the
|
|
|
|
|
newly allocated memory all over the place) and fail on types which cannot be
|
|
|
|
|
coerced to strings. See |id()| for more details, currently it uses
|
2017-02-11 11:47:02 -07:00
|
|
|
|
`printf("%p", {expr})` internally.
|
|
|
|
|
|
2017-02-18 15:15:27 -07:00
|
|
|
|
|c_CTRL-R| pasting a non-special register into |cmdline| omits the last <CR>.
|
2017-02-17 18:39:07 -07:00
|
|
|
|
|
2023-08-11 18:50:17 -07:00
|
|
|
|
|CursorMoved| triggers when moving between windows.
|
2022-02-07 17:19:06 -07:00
|
|
|
|
|
2019-11-17 20:06:59 -07:00
|
|
|
|
Lua interface (|lua.txt|):
|
2017-01-29 12:07:24 -07:00
|
|
|
|
|
2018-08-25 07:38:24 -07:00
|
|
|
|
- `:lua print("a\0b")` will print `a^@b`, like with `:echomsg "a\nb"` . In Vim
|
2017-01-29 12:07:24 -07:00
|
|
|
|
that prints `a` and `b` on separate lines, exactly like
|
|
|
|
|
`:lua print("a\nb")` .
|
2023-06-23 03:16:55 -07:00
|
|
|
|
- `:lua error('TEST')` emits the error: >
|
|
|
|
|
E5108: Error executing lua: [string "<Vimscript compiled string>"]:1: TEST
|
|
|
|
|
< whereas Vim emits only "TEST".
|
2017-05-11 08:45:11 -07:00
|
|
|
|
- Lua has direct access to Nvim |API| via `vim.api`.
|
2017-05-22 14:46:57 -07:00
|
|
|
|
- Lua package.path and package.cpath are automatically updated according to
|
2023-08-03 08:35:10 -07:00
|
|
|
|
'runtimepath'. |lua-module-load|
|
2017-01-29 12:07:24 -07:00
|
|
|
|
|
2019-08-04 18:33:45 -07:00
|
|
|
|
Commands:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |:doautocmd| does not warn about "No matching autocommands".
|
|
|
|
|
- |:wincmd| accepts a count.
|
|
|
|
|
- `:write!` does not show a prompt if the file was updated externally.
|
|
|
|
|
- |:=| does not accept |ex-flags|. With an arg it is equivalent to |:lua=|
|
2019-08-04 18:33:45 -07:00
|
|
|
|
|
2023-01-10 07:49:39 -07:00
|
|
|
|
Command-line:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- The meanings of arrow keys do not change depending on 'wildoptions'.
|
2022-08-21 06:31:25 -07:00
|
|
|
|
|
2019-11-17 20:06:59 -07:00
|
|
|
|
Functions:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |input()| and |inputdialog()| support for each other’s features (return on
|
2019-11-17 20:06:59 -07:00
|
|
|
|
cancel and completion respectively) via dictionary argument (replaces all
|
2022-07-13 23:47:25 -07:00
|
|
|
|
other arguments if used), and "cancelreturn" can have any type if passed in
|
|
|
|
|
a dictionary.
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |input()| and |inputdialog()| support user-defined cmdline highlighting.
|
2019-11-17 20:06:59 -07:00
|
|
|
|
|
2017-10-07 06:55:25 -07:00
|
|
|
|
Highlight groups:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other
|
2017-10-15 23:18:03 -07:00
|
|
|
|
groups
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |hl-CurSearch| highlights match under cursor instead of last match found
|
2022-04-11 09:20:24 -07:00
|
|
|
|
using |n| or |N|
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- |hl-CursorLine| is low-priority unless foreground color is set
|
|
|
|
|
- |hl-VertSplit| superseded by |hl-WinSeparator|
|
|
|
|
|
- Highlight groups names are allowed to contain `@` characters.
|
|
|
|
|
- It is an error to define a highlight group with a name that doesn't match
|
|
|
|
|
the regexp `[a-zA-Z0-9_.@-]*` (see |group-name|).
|
|
|
|
|
|
|
|
|
|
Macro (|recording|) behavior:
|
|
|
|
|
- Replay of a macro recorded during :lmap produces the same actions as when it
|
2017-12-27 11:30:23 -07:00
|
|
|
|
was recorded. In Vim if a macro is recorded while using :lmap'ped keys then
|
|
|
|
|
the behaviour during record and replay differs.
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- 'keymap' is implemented via :lmap instead of :lnoremap so that you can use
|
2017-12-27 11:30:23 -07:00
|
|
|
|
macros and 'keymap' at the same time. This also means you can use |:imap| on
|
|
|
|
|
the results of keys from 'keymap'.
|
|
|
|
|
|
2022-04-27 06:27:58 -07:00
|
|
|
|
Mappings:
|
2023-04-08 05:29:23 -07:00
|
|
|
|
- Creating a mapping for a simplifiable key (e.g. <C-I>) doesn't replace an
|
2022-04-27 06:27:58 -07:00
|
|
|
|
existing mapping for its simplified form (e.g. <Tab>).
|
2023-04-08 05:29:23 -07:00
|
|
|
|
- "#" followed by a digit doesn't stand for a function key at the start of the
|
|
|
|
|
lhs of a mapping.
|
2022-04-27 06:27:58 -07:00
|
|
|
|
|
2019-04-01 15:50:28 -07:00
|
|
|
|
Motion:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- The |jumplist| avoids useless/phantom jumps.
|
2019-04-01 15:50:28 -07:00
|
|
|
|
|
2023-07-12 10:27:14 -07:00
|
|
|
|
Performance:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- Folds are not updated during insert-mode.
|
2023-07-12 10:27:14 -07:00
|
|
|
|
|
2021-07-27 13:13:48 -07:00
|
|
|
|
Syntax highlighting:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- syncolor.vim has been removed. Nvim now sets up default highlighting groups
|
2021-07-27 13:13:48 -07:00
|
|
|
|
automatically for both light and dark backgrounds, regardless of whether or
|
|
|
|
|
not syntax highlighting is enabled. This means that |:syntax-on| and
|
|
|
|
|
|:syntax-enable| are now identical. Users who previously used an
|
|
|
|
|
after/syntax/syncolor.vim file should transition that file into a
|
|
|
|
|
colorscheme. |:colorscheme|
|
|
|
|
|
|
2021-08-27 03:59:13 -07:00
|
|
|
|
Vimscript compatibility:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- `count` does not alias to |v:count|
|
|
|
|
|
- `errmsg` does not alias to |v:errmsg|
|
|
|
|
|
- `shell_error` does not alias to |v:shell_error|
|
|
|
|
|
- `this_session` does not alias to |v:this_session|
|
2017-11-08 18:20:12 -07:00
|
|
|
|
|
2023-01-10 07:49:39 -07:00
|
|
|
|
Working directory (Vim implemented some of these after Nvim):
|
2022-02-10 21:44:47 -07:00
|
|
|
|
- |DirChanged| and |DirChangedPre| can be triggered when switching to another
|
|
|
|
|
window or tab.
|
2021-10-19 07:37:11 -07:00
|
|
|
|
- |getcwd()| and |haslocaldir()| may throw errors if the tab page or window
|
|
|
|
|
cannot be found. *E5000* *E5001* *E5002*
|
|
|
|
|
- |haslocaldir()| checks for tab-local directory if and only if -1 is passed as
|
|
|
|
|
window number, and its only possible returns values are 0 and 1.
|
|
|
|
|
- `getcwd(-1)` is equivalent to `getcwd(-1, 0)` instead of returning the global
|
|
|
|
|
working directory. Use `getcwd(-1, -1)` to get the global working directory.
|
|
|
|
|
|
2023-07-24 07:10:55 -07:00
|
|
|
|
Autocommands:
|
|
|
|
|
- Fixed inconsistent behavior in execution of nested autocommands:
|
|
|
|
|
https://github.com/neovim/neovim/issues/23368
|
2023-11-06 11:42:40 -07:00
|
|
|
|
- |TermResponse| is fired for any OSC sequence received from the terminal,
|
|
|
|
|
instead of the Primary Device Attributes response. |v:termresponse|
|
2023-07-24 07:10:55 -07:00
|
|
|
|
|
2015-01-30 05:19:43 -07:00
|
|
|
|
==============================================================================
|
2024-04-30 09:37:45 -07:00
|
|
|
|
Missing features *nvim-missing*
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2023-01-10 07:49:39 -07:00
|
|
|
|
These legacy Vim features are not yet implemented:
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2023-07-04 10:22:04 -07:00
|
|
|
|
- *:gui*
|
|
|
|
|
- *:gvim*
|
|
|
|
|
- *'completepopup'*
|
|
|
|
|
- *'previewpopup'*
|
2022-09-25 16:58:27 -07:00
|
|
|
|
|
2015-01-30 05:19:43 -07:00
|
|
|
|
==============================================================================
|
2024-04-30 09:37:45 -07:00
|
|
|
|
Removed legacy features *nvim-removed*
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2017-08-17 12:23:28 -07:00
|
|
|
|
These Vim features were intentionally removed from Nvim.
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Aliases:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- ex (alias for "nvim -e")
|
|
|
|
|
- exim (alias for "nvim -E")
|
|
|
|
|
- gex (GUI)
|
|
|
|
|
- gview (GUI)
|
|
|
|
|
- gvim (GUI)
|
|
|
|
|
- gvimdiff (GUI)
|
|
|
|
|
- rgview (GUI)
|
|
|
|
|
- rgvim (GUI)
|
|
|
|
|
- rview
|
|
|
|
|
- rvim
|
|
|
|
|
- view (alias for "nvim -R")
|
|
|
|
|
- vimdiff (alias for "nvim -d" |diff-mode|)
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Commands:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- :behave
|
|
|
|
|
- :fixdel
|
|
|
|
|
- *hardcopy* `:hardcopy` was removed. Instead, use `:TOhtml` and print the
|
2023-06-20 00:49:49 -07:00
|
|
|
|
resulting HTML using a web browser or other HTML viewer.
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- :helpfind
|
|
|
|
|
- :mode (no longer accepts an argument)
|
|
|
|
|
- :open
|
|
|
|
|
- :Print
|
|
|
|
|
- :promptfind
|
|
|
|
|
- :promptrepl
|
|
|
|
|
- :scriptversion (always version 1)
|
|
|
|
|
- :shell
|
|
|
|
|
- :sleep! (does not hide the cursor; same as :sleep)
|
|
|
|
|
- :smile
|
|
|
|
|
- :tearoff
|
|
|
|
|
- :cstag
|
|
|
|
|
- :cscope
|
|
|
|
|
- :lcscope
|
|
|
|
|
- :scscope
|
|
|
|
|
- :Vimuntar
|
|
|
|
|
- `:TOhtml` was replaced by a Lua version (with various differences)
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Compile-time features:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- Emacs tags support
|
|
|
|
|
- X11 integration (see |x11-selection|)
|
2017-01-03 21:32:46 -07:00
|
|
|
|
|
2023-06-20 00:49:49 -07:00
|
|
|
|
Cscope:
|
|
|
|
|
*cscope*
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- Cscope support was removed in favour of plugin-based solutions such as:
|
2023-06-20 00:49:49 -07:00
|
|
|
|
https://github.com/dhananjaylatkar/cscope_maps.nvim
|
|
|
|
|
|
2020-01-13 00:41:55 -07:00
|
|
|
|
Eval:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- Vim9script
|
|
|
|
|
- *cscope_connection()*
|
|
|
|
|
- *err_teapot()*
|
|
|
|
|
- *js_encode()*
|
|
|
|
|
- *js_decode()*
|
|
|
|
|
- *v:none* (used by Vim to represent JavaScript "undefined"); use |v:null| instead.
|
|
|
|
|
- *v:sizeofint*
|
|
|
|
|
- *v:sizeoflong*
|
|
|
|
|
- *v:sizeofpointer*
|
2020-01-13 00:41:55 -07:00
|
|
|
|
|
2020-10-21 21:30:07 -07:00
|
|
|
|
Events:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- *SafeStateAgain*
|
|
|
|
|
- *SigUSR1* Use |Signal| to detect `SIGUSR1` signal instead.
|
2020-10-21 21:30:07 -07:00
|
|
|
|
|
2019-09-08 00:21:54 -07:00
|
|
|
|
Highlight groups:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- *hl-StatusLineTerm* *hl-StatusLineTermNC* are unnecessary because Nvim
|
|
|
|
|
supports 'winhighlight' window-local highlights. For example, to mimic Vim's
|
|
|
|
|
StatusLineTerm: >vim
|
2019-09-08 00:21:54 -07:00
|
|
|
|
hi StatusLineTerm ctermfg=black ctermbg=green
|
|
|
|
|
hi StatusLineTermNC ctermfg=green
|
|
|
|
|
autocmd TermOpen,WinEnter * if &buftype=='terminal'
|
|
|
|
|
\|setlocal winhighlight=StatusLine:StatusLineTerm,StatusLineNC:StatusLineTermNC
|
|
|
|
|
\|else|setlocal winhighlight=|endif
|
|
|
|
|
<
|
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Options:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- *'aleph'* *'al'*
|
|
|
|
|
- antialias
|
|
|
|
|
- 'backspace' no longer supports number values. Instead:
|
2023-07-17 06:27:21 -07:00
|
|
|
|
- for `backspace=0` set `backspace=` (empty)
|
|
|
|
|
- for `backspace=1` set `backspace=indent,eol`
|
|
|
|
|
- for `backspace=2` set `backspace=indent,eol,start` (default behavior in Nvim)
|
|
|
|
|
- for `backspace=3` set `backspace=indent,eol,nostop`
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- *'balloondelay'* *'bdlay'*
|
|
|
|
|
- *'ballooneval'* *'beval'* *'noballooneval'* *'nobeval'*
|
|
|
|
|
- *'balloonexpr'* *'bexpr'*
|
|
|
|
|
- bioskey (MS-DOS)
|
|
|
|
|
- conskey (MS-DOS)
|
|
|
|
|
- *'cp'* *'nocompatible'* *'nocp'* *'compatible'* (Nvim is always "nocompatible".)
|
|
|
|
|
- 'cpoptions' (gjpkHw<*- and all POSIX flags were removed)
|
|
|
|
|
- *'cryptmethod'* *'cm'* *'key'* (Vim encryption implementation)
|
|
|
|
|
- cscopepathcomp
|
|
|
|
|
- cscopeprg
|
|
|
|
|
- cscopequickfix
|
|
|
|
|
- cscoperelative
|
|
|
|
|
- cscopetag
|
|
|
|
|
- cscopetagorder
|
|
|
|
|
- cscopeverbose
|
|
|
|
|
- *'ed'* *'edcompatible'* *'noed'* *'noedcompatible'*
|
|
|
|
|
- 'encoding' ("utf-8" is always used)
|
|
|
|
|
- esckeys
|
|
|
|
|
- 'guioptions' "t" flag was removed
|
|
|
|
|
- *'guifontset'* *'gfs'* (Use 'guifont' instead.)
|
|
|
|
|
- *'guipty'* (Nvim uses pipes and PTYs consistently on all platforms.)
|
|
|
|
|
- 'highlight' (Names of builtin |highlight-groups| cannot be changed.)
|
|
|
|
|
- *'hkmap'* *'hk'* use `set keymap=hebrew` instead.
|
|
|
|
|
- *'hkmapp'* *'hkp'* use `set keymap=hebrewp` instead.
|
|
|
|
|
- keyprotocol
|
|
|
|
|
- *'pastetoggle'* *'pt'* Just Paste It.™ |paste| is handled automatically when
|
2023-06-19 02:24:44 -07:00
|
|
|
|
you paste text using your terminal's or GUI's paste feature (CTRL-SHIFT-v,
|
|
|
|
|
CMD-v (macOS), middle-click, …).
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- *'imactivatefunc'* *'imaf'*
|
|
|
|
|
- *'imactivatekey'* *'imak'*
|
|
|
|
|
- *'imstatusfunc'* *'imsf'*
|
|
|
|
|
- *'insertmode'* *'im'* Use the following script to emulate 'insertmode': >vim
|
2022-06-16 17:16:33 -07:00
|
|
|
|
autocmd BufWinEnter * startinsert
|
|
|
|
|
inoremap <Esc> <C-X><C-Z><C-]>
|
|
|
|
|
inoremap <C-C> <C-X><C-Z>
|
|
|
|
|
inoremap <C-L> <C-X><C-Z><C-]><Esc>
|
|
|
|
|
inoremap <C-Z> <C-X><C-Z><Cmd>suspend<CR>
|
|
|
|
|
noremap <C-C> <Esc>
|
|
|
|
|
snoremap <C-C> <Esc>
|
|
|
|
|
noremap <C-\><C-G> <C-\><C-N><Cmd>startinsert<CR>
|
|
|
|
|
cnoremap <C-\><C-G> <C-\><C-N><Cmd>startinsert<CR>
|
|
|
|
|
inoremap <C-\><C-G> <C-X><C-Z>
|
|
|
|
|
autocmd CmdWinEnter * noremap <buffer> <C-C> <C-C>
|
|
|
|
|
autocmd CmdWinEnter * inoremap <buffer> <C-C> <C-C>
|
|
|
|
|
|
|
|
|
|
lua << EOF
|
|
|
|
|
vim.on_key(function(c)
|
|
|
|
|
if c == '\27' then
|
|
|
|
|
local mode = vim.api.nvim_get_mode().mode
|
|
|
|
|
if mode:find('^[nvV\22sS\19]') and vim.fn.getcmdtype() == '' then
|
|
|
|
|
vim.schedule(function()
|
|
|
|
|
vim.cmd('startinsert')
|
|
|
|
|
end)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end)
|
|
|
|
|
EOF
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- *'macatsui'*
|
|
|
|
|
- *'maxcombine'* *'mco'* : Nvim counts maximum character sizes in bytes, not
|
|
|
|
|
codepoints. This is guaranteed to be big enough to always fit all chars
|
|
|
|
|
properly displayed in vim with 'maxcombine' set to 6.
|
|
|
|
|
- You can still edit text with larger characters than fits in the screen
|
|
|
|
|
buffer, you just can't see them. Use |g8| or |ga|. See |mbyte-combining|.
|
|
|
|
|
- NOTE: the rexexp engine still has a hard-coded limit of considering
|
2023-11-06 06:52:27 -07:00
|
|
|
|
6 composing chars only.
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- *'maxmem'* Nvim delegates memory-management to the OS.
|
|
|
|
|
- *'maxmemtot'* Nvim delegates memory-management to the OS.
|
|
|
|
|
- printoptions
|
|
|
|
|
- *'printdevice'*
|
|
|
|
|
- *'printencoding'*
|
|
|
|
|
- *'printexpr'*
|
|
|
|
|
- *'printfont'*
|
|
|
|
|
- *'printheader'*
|
|
|
|
|
- *'printmbcharset'*
|
|
|
|
|
- *'prompt'* *'noprompt'*
|
|
|
|
|
- *'remap'* *'noremap'*
|
|
|
|
|
- *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
|
|
|
|
|
- *'secure'* : Everything is allowed in 'exrc' files, because they must be
|
|
|
|
|
explicitly marked as "trusted".
|
|
|
|
|
- *'shelltype'*
|
|
|
|
|
- 'shortmess' flags: *shm-f* *shm-n* *shm-x* *shm-i* (behave like always on)
|
|
|
|
|
- *'shortname'* *'sn'* *'noshortname'* *'nosn'*
|
|
|
|
|
- *'swapsync'* *'sws'*
|
|
|
|
|
- *'termencoding'* *'tenc'* (Vim 7.4.852 also removed this for Windows)
|
|
|
|
|
- *'terse'* *'noterse'* (Add "s" to 'shortmess' instead)
|
|
|
|
|
- textauto
|
|
|
|
|
- textmode
|
|
|
|
|
- *'toolbar'* *'tb'*
|
|
|
|
|
- *'toolbariconsize'* *'tbis'*
|
|
|
|
|
- *'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'*
|
|
|
|
|
- *'ttyfast'* *'tf'* *'nottyfast'* *'notf'*
|
|
|
|
|
- *'ttymouse'* *'ttym'*
|
|
|
|
|
- *'ttyscroll'* *'tsl'*
|
|
|
|
|
- *'ttytype'* *'tty'*
|
|
|
|
|
- weirdinvert
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2023-06-19 02:24:44 -07:00
|
|
|
|
Plugins:
|
|
|
|
|
|
|
|
|
|
- logiPat
|
|
|
|
|
- rrhelper
|
2023-06-20 00:49:49 -07:00
|
|
|
|
- *vimball*
|
2023-06-19 02:24:44 -07:00
|
|
|
|
|
2023-01-10 07:49:39 -07:00
|
|
|
|
Providers:
|
|
|
|
|
|
|
|
|
|
- *if_lua* : Nvim |Lua| API is not compatible with Vim's "if_lua".
|
|
|
|
|
- *if_mzscheme*
|
|
|
|
|
- |if_pyth|: *python-bindeval* *python-Function* are not supported.
|
|
|
|
|
- *if_tcl*
|
|
|
|
|
|
2018-05-28 22:22:15 -07:00
|
|
|
|
Startup:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- `--literal`: File args are always literal; to expand wildcards on Windows,
|
|
|
|
|
use |:n| e.g. `nvim +"n *"`
|
|
|
|
|
- Easy mode: eview, evim, nvim -y
|
|
|
|
|
- Restricted mode: rview, rvim, nvim -Z
|
|
|
|
|
- Vi mode: nvim -v
|
2018-05-28 22:22:15 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
Test functions:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
- test_alloc_fail()
|
|
|
|
|
- test_autochdir()
|
|
|
|
|
- test_disable_char_avail()
|
|
|
|
|
- test_feedinput()
|
|
|
|
|
- test_garbagecollect_soon
|
|
|
|
|
- test_getvalue()
|
|
|
|
|
- test_ignore_error()
|
|
|
|
|
- test_null_blob()
|
|
|
|
|
- test_null_channel()
|
|
|
|
|
- test_null_dict()
|
|
|
|
|
- test_null_function()
|
|
|
|
|
- test_null_job()
|
|
|
|
|
- test_null_list()
|
|
|
|
|
- test_null_partial()
|
|
|
|
|
- test_null_string()
|
|
|
|
|
- test_option_not_set()
|
|
|
|
|
- test_override()
|
|
|
|
|
- test_refcount()
|
|
|
|
|
- test_scrollbar()
|
|
|
|
|
- test_setmouse()
|
|
|
|
|
- test_settime()
|
|
|
|
|
- test_srand_seed()
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
2017-12-27 11:30:23 -07:00
|
|
|
|
TUI:
|
2024-04-30 09:37:45 -07:00
|
|
|
|
*t_xx* *termcap-options* *t_AB* *t_Sb* *t_vb* *t_SI*
|
|
|
|
|
- Nvim does not have special `t_XX` options nor <t_XX> keycodes to configure
|
2017-12-27 11:30:23 -07:00
|
|
|
|
terminal capabilities. Instead Nvim treats the terminal as any other UI,
|
|
|
|
|
e.g. 'guicursor' sets the terminal cursor style if possible.
|
|
|
|
|
|
2024-04-30 09:37:45 -07:00
|
|
|
|
*termcap*
|
|
|
|
|
- Nvim never uses the termcap database, only |terminfo| and |builtin-terms|.
|
2017-12-27 11:30:23 -07:00
|
|
|
|
|
2024-04-30 09:37:45 -07:00
|
|
|
|
*xterm-8bit* *xterm-8-bit*
|
|
|
|
|
- Xterm can be run in a mode where it uses true 8-bit CSI. Supporting this
|
2017-12-27 11:30:23 -07:00
|
|
|
|
requires autodetection of whether the terminal is in UTF-8 mode or non-UTF-8
|
|
|
|
|
mode, as the 8-bit CSI character has to be written differently in each case.
|
|
|
|
|
Vim issues a "request version" sequence to the terminal at startup and looks
|
|
|
|
|
at how the terminal is sending CSI. Nvim does not issue such a sequence and
|
|
|
|
|
always uses 7-bit control sequences.
|
2015-01-30 05:19:43 -07:00
|
|
|
|
|
|
|
|
|
==============================================================================
|
2019-11-17 20:06:59 -07:00
|
|
|
|
vim:tw=78:ts=8:sw=2:et:ft=help:norl:
|