aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/vim_diff.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/vim_diff.txt')
-rw-r--r--runtime/doc/vim_diff.txt66
1 files changed, 40 insertions, 26 deletions
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 5d894bb5e1..e069678b30 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -62,11 +62,12 @@ Defaults *nvim-defaults*
- 'isfname' does not include ":" (on Windows). Drive letters are handled
correctly without it. (Use |gF| for filepaths suffixed with ":line:col").
- 'joinspaces' is disabled
+- 'jumpoptions' defaults to "clean"
- 'langnoremap' is enabled
- 'langremap' is disabled
- 'laststatus' defaults to 2 (statusline is always shown)
- 'listchars' defaults to "tab:> ,trail:-,nbsp:+"
-- 'mouse' defaults to "nvi"
+- 'mouse' defaults to "nvi", see |default-mouse| for details
- 'mousemodel' defaults to "popup_setpos"
- 'nrformats' defaults to "bin,hex"
- 'path' defaults to ".,,". The C ftplugin adds "/usr/include" if it exists.
@@ -100,28 +101,35 @@ Defaults *nvim-defaults*
DEFAULT MOUSE
*default-mouse* *disable-mouse*
-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 ":".
+By default the mouse is enabled. This means |scroll-mouse-wheel| will scroll
+the window instead of moving the cursor; <LeftMouse> click places the cursor;
+and <RightMouse> click opens the default |popup-menu| with standard actions.
+
+Mouse is NOT enabled in |Cmdline-mode| or the |more-prompt|, so you can
+temporarily disable it just by typing ":". Or if you want to partially or
+fully disable the mouse or popup-menu, do any of the following:
-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=
-- Pressing <RightMouse> extends selection instead of showing popup-menu: >vim
+- Change the 'mousemodel', so <RightMouse> extends selection instead of
+ showing the popup-menu: >vim
set mousemodel=extend
-- Pressing <A-LeftMouse> releases mouse until the cursor moves: >vim
+- Map <A-LeftMouse> so that it temporarily disables 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>
<
-To remove the "How-to disable mouse" menu item and the separator above it: >vim
+To remove the default popup-menu without disabling mouse: >vim
+ aunmenu PopUp
+ autocmd! nvim_popupmenu
+
+To remove only the "How-to disable mouse" menu item (and its separator): >vim
aunmenu PopUp.How-to\ disable\ mouse
- aunmenu PopUp.-1-
-<
+ aunmenu PopUp.-2-
+
DEFAULT MAPPINGS
*default-mappings*
Nvim creates the following default mappings at |startup|. You can disable any
@@ -145,7 +153,14 @@ of these in your config by simply removing the mapping, e.g. ":unmap Y".
- <C-S> |i_CTRL-S|
- ]d |]d-default|
- [d |[d-default|
+- [D |[D-default|
+- ]D |]D-default|
- <C-W>d |CTRL-W_d-default|
+- |[q|, |]q|, |[Q|, |]Q|, |[CTRL-Q|, |]CTRL-Q|
+- |[l|, |]l|, |[L|, |]L|, |[CTRL-L|, |]CTRL-L|
+- |[t|, |]t|, |[T|, |]T|, |[CTRL-T|, |]CTRL-T|
+- |[a|, |]a|, |[A|, |]A|
+- |[b|, |]b|, |[B|, |]B|
- Nvim LSP client defaults |lsp-defaults|
- K |K-lsp-default|
@@ -164,6 +179,14 @@ nvim_terminal:
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.
+- TermOpen: Sets default options for |terminal| buffers:
+ - 'nomodifiable'
+ - 'undolevels' set to -1
+ - 'textwidth' set to 0
+ - 'nowrap'
+ - 'nolist'
+ - 'winhighlight' uses |hl-StatusLineTerm| and |hl-StatusLineTermNC| in
+ place of |hl-StatusLine| and |hl-StatusLineNC|
nvim_cmdwin:
- CmdwinEnter: Limits syntax sync to maxlines=1 in the |cmdwin|.
@@ -330,7 +353,9 @@ string options work.
- 'guicursor' works in the terminal (TUI)
- 'inccommand' shows interactive results for |:substitute|-like commands
and |:command-preview| commands
-- 'jumpoptions' "view" tries to restore the |mark-view| when moving through
+- 'jumpoptions'
+ - "view" tries to restore |mark-view| when moving through the jumplist.
+ - "clean" removes unloaded buffers from the jumplist.
- the |jumplist|, |changelist|, |alternate-file| or using |mark-motions|.
- 'laststatus' global statusline support
- 'mousescroll' amount to scroll by when scrolling with a mouse
@@ -529,13 +554,13 @@ Functions:
Highlight groups:
- |hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other
groups
-- |hl-CurSearch| highlights match under cursor instead of last match found
- 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 `@` 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|).
+- |hl-StatusLineTerm| |hl-StatusLineTermNC| are implemented as 'winhighlight'
+ window-local highlights which are set by the default |TermOpen| handler.
Macro (|recording|) behavior:
- Replay of a macro recorded during :lmap produces the same actions as when it
@@ -663,17 +688,6 @@ Events:
- *SafeStateAgain*
- *SigUSR1* Use |Signal| to detect `SIGUSR1` signal instead.
-Highlight groups:
-- *hl-StatusLineTerm* *hl-StatusLineTermNC* are unnecessary because Nvim
- supports 'winhighlight' window-local highlights. For example, to mimic Vim's
- StatusLineTerm: >vim
- 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
-<
-
Options:
- *'aleph'* *'al'*
- antialias