diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-09-05 05:56:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-05 05:56:00 -0700 |
commit | 76aa3e52be7a5a8b53b3775981c35313284230ac (patch) | |
tree | 87133e79c4b94d931bef113a234fee56bf1a8a09 /runtime/doc | |
parent | f9108378b7a7e08b48685f0a3ff4f7a3a14b56d6 (diff) | |
download | rneovim-76aa3e52be7a5a8b53b3775981c35313284230ac.tar.gz rneovim-76aa3e52be7a5a8b53b3775981c35313284230ac.tar.bz2 rneovim-76aa3e52be7a5a8b53b3775981c35313284230ac.zip |
feat(defaults): popupmenu "Open in browser", "Go to definition" #30261
- Use the popup to expose more features such as LSP and gx.
- Move the copy/paste items lower in the menu, they are lower priority.
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/gui.txt | 7 | ||||
-rw-r--r-- | runtime/doc/news.txt | 4 | ||||
-rw-r--r-- | runtime/doc/vim_diff.txt | 19 |
3 files changed, 21 insertions, 9 deletions
diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index 7e65ab6108..69e251e657 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -444,6 +444,10 @@ when the right mouse button is pressed, if 'mousemodel' is set to popup or popup_setpos. The default "PopUp" menu is: >vim + anoremenu PopUp.Go\ to\ definition <Cmd>lua vim.lsp.buf.definition()<CR> + amenu PopUp.Open\ in\ web\ browser gx + anoremenu PopUp.Inspect <Cmd>Inspect<CR> + anoremenu PopUp.-1- <Nop> vnoremenu PopUp.Cut "+x vnoremenu PopUp.Copy "+y anoremenu PopUp.Paste "+gP @@ -452,8 +456,7 @@ The default "PopUp" menu is: >vim nnoremenu PopUp.Select\ All ggVG vnoremenu PopUp.Select\ All gg0oG$ inoremenu PopUp.Select\ All <C-Home><C-O>VG - anoremenu PopUp.Inspect <Cmd>Inspect<CR> - anoremenu PopUp.-1- <Nop> + anoremenu PopUp.-2- <Nop> anoremenu PopUp.How-to\ disable\ mouse <Cmd>help disable-mouse<CR> < diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 507559cac7..ff41238912 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -114,6 +114,10 @@ DEFAULTS • |grr| in Normal mode maps to |vim.lsp.buf.references()| • |gra| in Normal and Visual mode maps to |vim.lsp.buf.code_action()| • CTRL-S in Insert mode maps to |vim.lsp.buf.signature_help()| + • Mouse |popup-menu| includes an "Open in web browser" item when you right-click + on a URL. + • Mouse |popup-menu| includes a "Go to definition" item when LSP is active + in the buffer. • Snippet: • `<Tab>` in Insert and Select mode maps to `vim.snippet.jump({ direction = 1 })` diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index d7f955a654..b2e8476fd7 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -106,23 +106,28 @@ 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: +Or you can disable the popup-menu 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 |