diff options
| author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2024-05-28 13:24:16 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-28 13:24:16 -0500 |
| commit | 1c6d9200521acb2329be55ab8bec3056deade66a (patch) | |
| tree | bcb4c4540256ed7643ca8516e5616b9ffcbea151 /runtime/doc | |
| parent | fc2429962ac8837eba45e4e62cfccc57e5049441 (diff) | |
| download | rneovim-1c6d9200521acb2329be55ab8bec3056deade66a.tar.gz rneovim-1c6d9200521acb2329be55ab8bec3056deade66a.tar.bz2 rneovim-1c6d9200521acb2329be55ab8bec3056deade66a.zip | |
feat(defaults): use vim.diagnostic.jump() for default mappings (#29066)
This allows the mappings to work with a count and also enables new ]D
and [D mappings to go to the last/first diagnostic in the buffer.
Diffstat (limited to 'runtime/doc')
| -rw-r--r-- | runtime/doc/news.txt | 7 | ||||
| -rw-r--r-- | runtime/doc/tagsrch.txt | 16 | ||||
| -rw-r--r-- | runtime/doc/vim_diff.txt | 2 |
3 files changed, 19 insertions, 6 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index b5ba2921e6..ceb638a459 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -34,11 +34,14 @@ API DEFAULTS -• TODO +• |]d-default| and |[d-default| accept a count. +• |[D-default| and |]D-default| jump to the first and last diagnostic in the + current buffer, respectively. EDITOR -• The order in which signs are placed was changed. Higher priority signs will now appear left of lower priority signs. +• The order in which signs are placed was changed. Higher priority signs will + now appear left of lower priority signs. EVENTS diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index ef1654d365..8b2813785f 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -781,15 +781,15 @@ CTRL-W i Open a new window, with the cursor on the first line count'th matching line is displayed. *[d-default* - Mapped to |vim.diagnostic.goto_prev()| by default. - |default-mappings| + Jumps to the previous diagnostic in the current buffer + by default. |vim.diagnostic.jump()| |default-mappings| *]d* ]d like "[d", but start at the current cursor position. *]d-default* - Mapped to |vim.diagnostic.goto_next()| by default. - |default-mappings| + Jumps to the next diagnostic in the current buffer by + default. |vim.diagnostic.jump()| |default-mappings| *:ds* *:dsearch* :[range]ds[earch][!] [count] [/]string[/] @@ -803,9 +803,17 @@ CTRL-W i Open a new window, with the cursor on the first line displayed for the found lines. The search starts from the beginning of the file. + *[D-default* + Jumps to the first diagnostic in the current buffer by + default. |vim.diagnostic.jump()| |default-mappings| + *]D* ]D like "[D", but start at the current cursor position. + *]D-default* + Jumps to the last diagnostic in the current buffer by + default. |vim.diagnostic.jump()| |default-mappings| + *:dli* *:dlist* :[range]dli[st][!] [/]string[/] Like `[D` and `]D`, but search in [range] lines diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 5d894bb5e1..ac20948f14 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -145,6 +145,8 @@ 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| - Nvim LSP client defaults |lsp-defaults| - K |K-lsp-default| |