aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/vim_diff.txt
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
commit9243becbedbb6a1592208051f8fa2b090dcc5e7d (patch)
tree607c2a862ec3f4399b8766383f6f8e04c4aa43b4 /runtime/doc/vim_diff.txt
parent9e40b6e9e1bc67f2d856adb837ee64dd0e25b717 (diff)
parent3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff)
downloadrneovim-usermarks.tar.gz
rneovim-usermarks.tar.bz2
rneovim-usermarks.zip
Merge remote-tracking branch 'upstream/master' into usermarksusermarks
Diffstat (limited to 'runtime/doc/vim_diff.txt')
-rw-r--r--runtime/doc/vim_diff.txt161
1 files changed, 111 insertions, 50 deletions
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 53effa1443..bb3b670b24 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -36,9 +36,8 @@ centralized reference of the differences.
- 'belloff' defaults to "all"
- 'compatible' is always disabled
- 'complete' excludes "i"
-- 'cscopeverbose' is enabled
- 'directory' defaults to ~/.local/state/nvim/swap// (|xdg|), auto-created
-- 'display' defaults to "lastline,msgsep"
+- 'display' defaults to "lastline"
- 'encoding' is UTF-8 (cf. 'fileencoding' for file-content encoding)
- 'fillchars' defaults (in effect) to "vert:│,fold:·,sep:│"
- 'formatoptions' defaults to "tcqj"
@@ -73,42 +72,41 @@ centralized reference of the differences.
- 'wildmenu' is enabled
- 'wildoptions' defaults to "pum,tagfile"
-- |man.vim| plugin is enabled, so |:Man| is available by default.
-- |matchit| plugin is enabled. To disable it in your config: >
+- |man.lua| plugin is enabled, so |:Man| is available by default.
+- |matchit| plugin is enabled. To disable it in your config: >vim
:let loaded_matchit = 1
- |g:vimsyn_embed| defaults to "l" to enable Lua highlighting
-
Default Mouse ~
*default-mouse* *disable-mouse*
-By default the mouse is enabled. The right button click opens |popup-menu|
-with standard actions, such as "Cut", "Copy" and "Paste".
-
-If you don't like this you can add to your |config| any of the following:
-
-- ignore mouse completely >
+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:
+- Disable mouse completely by unsetting the 'mouse' option: >vim
set mouse=
-<
-- no |popup-menu| but the right button extends selection >
+- Pressing <RightMouse> extends selection instead of showing popup-menu: >vim
set mousemodel=extend
->
-- pressing ALT+LeftMouse releases mouse until main cursor moves >
- nnoremap <M-LeftMouse> <Cmd>
+- Pressing <A-LeftMouse> releases mouse until the cursor moves: >vim
+ nnoremap <A-LeftMouse> <Cmd>
\ set mouse=<Bar>
\ echo 'mouse OFF until next cursor-move'<Bar>
\ autocmd CursorMoved * ++once set mouse&<Bar>
\ echo 'mouse ON'<CR>
<
-Also, mouse is not in use in |command-mode| or at |more-prompt|. So if you
-need to copy/paste with your terminal then just pressing ':' makes Nvim to
-release the mouse cursor temporarily.
-
+To remove the "How-to disable mouse" menu item and the separator above it: >vim
+ aunmenu PopUp.How-to\ disable\ mouse
+ aunmenu PopUp.-1-
+<
Default Mappings ~
*default-mappings*
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".
->
+>vim
nnoremap Y y$
nnoremap <C-L> <Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>
inoremap <C-U> <C-G>u<C-U>
@@ -131,7 +129,7 @@ nvim_cmdwin:
==============================================================================
3. New Features *nvim-features*
-MAJOR COMPONENTS ~
+MAJOR COMPONENTS
API |API|
Job control |job-control|
@@ -149,7 +147,7 @@ Terminal emulator |terminal|
Vimscript parser |nvim_parse_expression()|
XDG base directories |xdg|
-USER EXPERIENCE ~
+USER EXPERIENCE
Working intuitively and consistently is a major goal of Nvim.
@@ -162,7 +160,7 @@ Working intuitively and consistently is a major goal of Nvim.
- 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:
- http://stackoverflow.com/q/14635295).
+ https://stackoverflow.com/q/14635295).
- Vim's internal test functions (test_autochdir(), test_settime(), etc.) are
not exposed (nor implemented); instead Nvim has a robust API.
@@ -180,7 +178,7 @@ Some features are built in that otherwise required external plugins:
- Highlighting the yanked region, see |lua-highlight|.
-ARCHITECTURE ~
+ARCHITECTURE
External plugins run in separate processes. |remote-plugin| This improves
stability and allows those plugins to work without blocking the editor. Even
@@ -191,7 +189,7 @@ 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.
-FEATURES ~
+FEATURES
Command-line highlighting:
The expression prompt (|@=|, |c_CTRL-R_=|, |i_CTRL-R_=|) is highlighted
@@ -210,6 +208,7 @@ Commands:
|:match| can be invoked before highlight group is defined
|:source| works with Lua
User commands can support |:command-preview| to show results as you type
+ |:write| with "++p" flag creates parent directories.
Events:
|RecordingEnter|
@@ -230,6 +229,7 @@ Functions:
|stdpath()|
|system()|, |systemlist()| can run {cmd} directly (without 'shell')
|matchadd()| can be called before highlight group is defined
+ |writefile()| with "p" flag creates parent directories.
Highlight groups:
|highlight-blend| controls blend level for a highlight group
@@ -256,9 +256,8 @@ Normal commands:
Options:
'cpoptions' flags: |cpo-_|
- 'display' flags: "msgsep" minimizes scrolling when showing messages
'guicursor' works in the terminal
- 'fillchars' flags: "msgsep" (see 'display'), "horiz", "horizup",
+ 'fillchars' flags: "msgsep", "horiz", "horizup",
"horizdown", "vertleft", "vertright", "verthoriz"
'foldcolumn' supports up to 9 dynamic/fixed columns
'inccommand' shows interactive results for |:substitute|-like commands
@@ -272,6 +271,7 @@ Options:
'tabline' %@Func@foo%X can call any function on mouse-click
'winblend' pseudo-transparency in floating windows |api-floatwin|
'winhighlight' window-local highlights
+ 'diffopt' has the option `linematch`.
Signs:
Signs are removed if the associated line is deleted.
@@ -281,7 +281,20 @@ Variables:
|v:windowid| is always available (for use by external UIs)
==============================================================================
-4. Changed features *nvim-features-changed*
+4. Upstreamed features *nvim-upstreamed*
+
+These Nvim features were later integrated into Vim.
+
+- 'fillchars' flags: "eob"
+- 'wildoptions' flags: "pum" enables popupmenu for wildmode completion
+- |<Cmd>|
+- |WinClosed|
+- |WinScrolled|
+- |:sign-define| "numhl" argument
+- |:source| works with anonymous (no file) scripts
+
+==============================================================================
+5. Changed features *nvim-features-changed*
Nvim always builds with all features, in contrast to Vim which may have
certain features removed/added at compile-time. |feature-compile|
@@ -306,7 +319,7 @@ are always available and may be used simultaneously. See |provider-python|.
structures.
2. |string()| fails immediately on nested containers, not when recursion limit
was exceeded.
-2. When |:echo| encounters duplicate containers like >
+2. When |:echo| encounters duplicate containers like >vim
let l = []
echo [l, l]
@@ -372,6 +385,7 @@ Lua interface (|lua.txt|):
Commands:
|:doautocmd| does not warn about "No matching autocommands".
|:wincmd| accepts a count.
+ `:write!` does not show a prompt if the file was updated externally.
Command line completion:
The meanings of arrow keys do not change depending on 'wildoptions'.
@@ -390,6 +404,9 @@ Highlight groups:
using |n| or |N|
|hl-CursorLine| is low-priority unless foreground color is set
|hl-VertSplit| superseded by |hl-WinSeparator|
+ Highlight groups names are allowed to contain the characters `.` and `@`.
+ 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
@@ -413,10 +430,12 @@ Normal commands:
Options:
'ttimeout', 'ttimeoutlen' behavior was simplified
- |jumpoptions| "stack" behavior
- |jumpoptions| "view" tries to restore the |mark-view| when moving through
+ 'jumpoptions' "stack" behavior
+ 'jumpoptions' "view" tries to restore the |mark-view| when moving through
the |jumplist|, |changelist|, |alternate-file| or using |mark-motions|.
'shortmess' the "F" flag does not affect output from autocommands
+ 'exrc' searches for ".nvim.lua", ".nvimrc", or ".exrc" files. The user is
+ prompted whether to trust the file.
Shell:
Shell output (|:!|, |:make|, …) is always routed through the UI, so it
@@ -460,7 +479,7 @@ TUI:
<
*'term'* *E529* *E530* *E531*
'term' reflects the terminal type derived from |$TERM| and other environment
- checks. For debugging only; not reliable during startup. >
+ checks. For debugging only; not reliable during startup. >vim
:echo &term
< "builtin_x" means one of the |builtin-terms| was chosen, because the expected
terminfo file was not found on the system.
@@ -475,6 +494,11 @@ TUI:
UI/Display:
|Visual| selection highlights the character at cursor. |visual-use|
+ messages: When showing messages longer than 'cmdheight', only
+ scroll the message lines, not the entire screen. The
+ separator line is decorated by |hl-MsgSeparator| and
+ the "msgsep" flag of 'fillchars'. *msgsep*
+
Vimscript compatibility:
`count` does not alias to |v:count|
`errmsg` does not alias to |v:errmsg|
@@ -492,17 +516,20 @@ Working directory (Vim implemented some of these later than Nvim):
working directory. Use `getcwd(-1, -1)` to get the global working directory.
==============================================================================
-5. Missing legacy features *nvim-features-missing*
+6. Missing legacy features *nvim-features-missing*
-Some legacy Vim features are not implemented:
+Some legacy Vim features are not yet implemented:
-- |if_lua|: Nvim Lua API is not compatible with Vim's "if_lua"
+- *if_lua* : Nvim |Lua| API is not compatible with Vim's "if_lua"
- *if_mzscheme*
-- |if_py|: *python-bindeval* *python-Function* are not supported
+- |if_pyth|: *python-bindeval* *python-Function* are not supported
- *if_tcl*
+*:gui*
+*:gvim*
+
==============================================================================
-6. Removed features *nvim-features-removed*
+7. Removed features *nvim-features-removed*
These Vim features were intentionally removed from Nvim.
@@ -522,6 +549,7 @@ Aliases:
Commands:
:fixdel
+ :hardcopy
:helpfind
:mode (no longer accepts an argument)
:open
@@ -533,6 +561,10 @@ Commands:
:sleep! (does not hide the cursor; same as :sleep)
:smile
:tearoff
+ :cstag
+ :cscope
+ :lcscope
+ :scscope
Compile-time features:
Emacs tags support
@@ -540,6 +572,7 @@ Compile-time features:
Eval:
Vim9script
+ *cscope_connection()*
*js_encode()*
*js_decode()*
*v:none* (used by Vim to represent JavaScript "undefined"); use |v:null| instead.
@@ -553,7 +586,7 @@ Events:
Highlight groups:
*hl-StatusLineTerm* *hl-StatusLineTermNC* are unnecessary because Nvim
supports 'winhighlight' window-local highlights.
- For example, to mimic Vim's StatusLineTerm: >
+ For example, to mimic Vim's StatusLineTerm: >vim
hi StatusLineTerm ctermfg=black ctermbg=green
hi StatusLineTermNC ctermfg=green
autocmd TermOpen,WinEnter * if &buftype=='terminal'
@@ -562,18 +595,25 @@ Highlight groups:
<
Options:
- 'antialias'
+ antialias
*'balloondelay'* *'bdlay'*
*'ballooneval'* *'beval'* *'noballooneval'* *'nobeval'*
*'balloonexpr'* *'bexpr'*
- 'bioskey' (MS-DOS)
- 'conskey' (MS-DOS)
+ bioskey (MS-DOS)
+ conskey (MS-DOS)
*'cp'* *'nocompatible'* *'nocp'* *'compatible'* (Nvim is always "nocompatible".)
'cpoptions' (gjkHw<*- 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'
+ esckeys
'guioptions' "t" flag was removed
*'guifontset'* *'gfs'* (Use 'guifont' instead.)
*'guipty'* (Nvim uses pipes and PTYs consistently on all platforms.)
@@ -582,7 +622,7 @@ Options:
*'imactivatekey'* *'imak'*
*'imstatusfunc'* *'imsf'*
*'insertmode'* *'im'* Use the following script to emulate 'insertmode':
->
+>vim
autocmd BufWinEnter * startinsert
inoremap <Esc> <C-X><C-Z><C-]>
inoremap <C-C> <C-X><C-Z>
@@ -614,18 +654,27 @@ Options:
Nvim always displays up to 6 combining characters. You can still edit
text with more than 6 combining characters, you just can't see them.
Use |g8| or |ga|. See |mbyte-combining|.
- 'maxmem' Nvim delegates memory-management to the OS.
- 'maxmemtot' Nvim delegates memory-management to the OS.
+ *'maxmem'* Nvim delegates memory-management to the OS.
+ *'maxmemtot'* Nvim delegates memory-management to the OS.
+ *'printdevice'*
+ *'printencoding'*
+ *'printexpr'*
+ *'printfont'*
+ *'printheader'*
+ *'printmbcharset'*
*'prompt'* *'noprompt'*
*'remap'* *'noremap'*
*'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
- 'shelltype'
+ *'secure'*
+ Everything is allowed in 'exrc' files since they must be explicitly marked
+ trusted.
+ *'shelltype'*
*'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'
+ textauto
+ textmode
*'toolbar'* *'tb'*
*'toolbariconsize'* *'tbis'*
*'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'*
@@ -633,7 +682,10 @@ Options:
*'ttymouse'* *'ttym'*
*'ttyscroll'* *'tsl'*
*'ttytype'* *'tty'*
- 'weirdinvert'
+ weirdinvert
+
+Performance:
+ Folds are not updated during insert-mode.
Startup:
--literal (file args are always literal; to expand wildcards on Windows, use
@@ -683,5 +735,14 @@ TUI:
at how the terminal is sending CSI. Nvim does not issue such a sequence and
always uses 7-bit control sequences.
+Cscope:
+ *cscope*
+ Cscope support has been removed in favour of LSP based solutions.
+
+Hardcopy:
+ *hardcopy*
+ `:hardcopy` was removed. Instead, use `:TOhtml` and print the resulting HTML
+ using a web browser or some other HTML viewer.
+
==============================================================================
vim:tw=78:ts=8:sw=2:et:ft=help:norl: