aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/gui.txt13
-rw-r--r--runtime/doc/options.txt6
-rw-r--r--runtime/doc/starting.txt2
-rw-r--r--runtime/doc/vim_diff.txt26
4 files changed, 43 insertions, 4 deletions
diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt
index 5badd954d9..776ff228d6 100644
--- a/runtime/doc/gui.txt
+++ b/runtime/doc/gui.txt
@@ -441,6 +441,19 @@ You can define the special menu "PopUp". This is the menu that is displayed
when the right mouse button is pressed, if 'mousemodel' is set to popup or
popup_setpos.
+The default "PopUp" menu is: >
+ aunmenu PopUp
+ vnoremenu PopUp.Cut "+x
+ vnoremenu PopUp.Copy "+y
+ anoremenu PopUp.Paste "+gP
+ vnoremenu PopUp.Paste "+P
+ vnoremenu PopUp.Delete "_x
+ nnoremenu PopUp.Select\ All> ggVG
+ vnoremenu PopUp.Select\ All> gg0oG$
+ inoremenu PopUp.Select\ All <C-Home><C-O>VG
+ anoremenu PopUp.-1- <Nop>
+ anoremenu PopUp.How-to\ disable\ mouse <Cmd>help disable-mouse<CR>
+<
Showing What Menus Are Mapped To *showing-menus*
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 74ba353e0a..0f1c2051a6 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -4086,7 +4086,7 @@ A jump table for the options with a short description can be found at |Q_op|.
listing continues until finished.
*'mouse'*
-'mouse' string (default "")
+'mouse' string (default "nvi")
global
Enables mouse support. For example, to enable the mouse in Normal mode
@@ -4158,7 +4158,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The mouse pointer is restored when the mouse is moved.
*'mousemodel'* *'mousem'*
-'mousemodel' 'mousem' string (default "extend")
+'mousemodel' 'mousem' string (default "popup_setpos")
global
Sets the model to use for the mouse. The name mostly specifies what
the right mouse button is used for:
@@ -4184,7 +4184,7 @@ A jump table for the options with a short description can be found at |Q_op|.
middle click paste paste
In the "popup" model the right mouse button produces a pop-up menu.
- You need to define this first, see |popup-menu|.
+ Nvim creates a default |popup-menu| but you can redefine it.
Note that you can further refine the meaning of buttons with mappings.
See |mouse-overview|. But mappings are NOT used for modeless selection.
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 108a47c522..d57a85423c 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -407,7 +407,7 @@ accordingly, proceeding as follows:
Nvim started with |--embed| waits for the UI to connect before
proceeding to load user configuration.
-4. Setup |default-mappings| and |default-autocmds|.
+4. Setup |default-mappings| and |default-autocmds|. Create |popup-menu|.
5. Enable filetype and indent plugins.
This does the same as the command: >
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index bacf160206..a74149d050 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -52,6 +52,8 @@ centralized reference of the differences.
- 'langremap' is disabled
- 'laststatus' defaults to 2 (statusline is always shown)
- 'listchars' defaults to "tab:> ,trail:-,nbsp:+"
+- 'mouse' defaults to "nvi"
+- 'mousemodel' defaults to "popup_setpos"
- 'nrformats' defaults to "bin,hex"
- 'ruler' is enabled
- 'sessionoptions' includes "unix,slash", excludes "options"
@@ -78,6 +80,30 @@ centralized reference of the differences.
- |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 >
+ set mouse=
+<
+- no |popup-menu| but the right button extends selection >
+ set mousemodel=extend
+>
+- pressing ALT+LeftMouse releases mouse until main cursor moves >
+ nnoremap <M-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.
+
Default Mappings ~
*default-mappings*
Nvim creates the following default mappings at |startup|. You can disable any