fix(commands)+docs: even out :NuwikiUISelect; exhaustive subgroup key lists
- ftplugin/vimwiki.vim: add buffer-local :NuwikiUISelect to the Vim path (it previously existed only on the Neovim path, contradicting the docs' "buffer-local on every .wiki buffer" claim — a global fallback masked it). Now symmetric with :VimwikiUISelect. - Make every keymap subgroup description list all of its bindings instead of trailing with "…": the README mappings-subgroups table, the README config-example comments, the README g:nuwiki_no_<group>_mappings rows, the doc/nuwiki.txt group→keys list, and the lua/nuwiki/config.lua comment. Also fixes the doc list that had dropped aH/iH from text_objects and adds the mouse group. Each notes that the <Leader>w prefix follows map_prefix. helptags validates (no dup tags); all keymap suites pass (266+18+21 Vim, 275 Lua); :NuwikiUISelect confirmed defined on a Vim .wiki buffer. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -251,15 +251,15 @@ require('nuwiki').setup({
|
||||
-- Keymap groups. Flip subgroups off independently. Defaults all on.
|
||||
mappings = {
|
||||
enabled = true,
|
||||
wiki_prefix = true, -- <Leader>w*
|
||||
links = true, -- <CR>, <S-CR>, <Tab>, <BS>, +, …
|
||||
lists = true, -- <C-Space>, gln/glp/glx, gl/gL, o/O, …
|
||||
wiki_prefix = true, -- <Leader>w{w,t,s,i}, <Leader>w<Leader>{w,y,t,m,i}
|
||||
links = true, -- <CR>, <S-CR>, <C-CR>, <C-S-CR>, <D-CR>, <M-CR>, <BS>, <Tab>, <S-Tab>, + (n/x), <Leader>w{n,d,r}, <Leader>wc (n/x)
|
||||
lists = true, -- <C-Space>, gnt, gln, glp, glx, glh, gll, gLh, gLl, glr, gLr, gl{-,*,#,1,i,I,a,A}, gL{…}, gl, gL, o, O; insert <C-D>, <C-T>, <C-L><C-J/K/M>, <CR>
|
||||
headers = true, -- =, -, ]], [[, ]=, [=, ]u, [u
|
||||
table_editing = true, -- gqq, <A-Left>, <A-Right>, <Tab> in insert mode
|
||||
table_editing = true, -- gqq, gq1, gww, gw1, <A-Left>, <A-Right>; insert <Tab>, <S-Tab>
|
||||
diary = true, -- <C-Down>, <C-Up>
|
||||
html_export = true, -- <Leader>wh, <Leader>whh
|
||||
html_export = true, -- <Leader>wh, <Leader>whh, <Leader>wha
|
||||
text_objects = true, -- ah, ih, aH, iH, al, il, a\, i\, ac, ic
|
||||
mouse = false, -- <2-LeftMouse>, <RightMouse>, … (opt-in)
|
||||
mouse = false, -- <2-LeftMouse>, <S-2-LeftMouse>, <C-2-LeftMouse>, <MiddleMouse>, <RightMouse> (opt-in)
|
||||
},
|
||||
|
||||
-- 'lsp' (server-driven foldingRange, default) | 'expr' (regex) | 'off'.
|
||||
@@ -308,18 +308,20 @@ let g:nuwiki_mouse_mappings = 0 " set to 1 to enable mouse maps
|
||||
|
||||
Each is a boolean. All default to `true` except `mouse`.
|
||||
|
||||
| Key | Default | Controls |
|
||||
The `<Leader>w` prefix in the `wiki_prefix`, `links`, and `html_export` rows is the default `map_prefix` and moves with it.
|
||||
|
||||
| Key | Default | Controls (every binding in the group) |
|
||||
|-----|---------|----------|
|
||||
| `enabled` | `true` | master switch for the whole keymap layer |
|
||||
| `wiki_prefix` | `true` | `<Leader>w*` |
|
||||
| `links` | `true` | `<CR>`, `<S-CR>`, `<Tab>`, `<BS>`, `+`, … |
|
||||
| `lists` | `true` | `<C-Space>`, `gln`/`glp`/`glx`, `gl`/`gL`, `o`/`O`, … |
|
||||
| `wiki_prefix` | `true` | `<Leader>ww`, `<Leader>wt`, `<Leader>ws`, `<Leader>wi`, `<Leader>w<Leader>w`, `<Leader>w<Leader>y`, `<Leader>w<Leader>t`, `<Leader>w<Leader>m`, `<Leader>w<Leader>i` |
|
||||
| `links` | `true` | `<CR>`, `<S-CR>`, `<C-CR>`, `<C-S-CR>`, `<D-CR>`, `<M-CR>`, `<BS>`, `<Tab>`, `<S-Tab>`, `+` (normal + visual), `<Leader>wn`, `<Leader>wd`, `<Leader>wr`, `<Leader>wc` (normal + visual) |
|
||||
| `lists` | `true` | `<C-Space>` (also `<C-@>`/`<Nul>`), `gnt`, `gln`, `glp`, `glx`, `glh`, `gll`, `gLh`, `gLl`, `glr`, `gLr`, `gl-`, `gl*`, `gl#`, `gl1`, `gli`, `glI`, `gla`, `glA`, `gL-`, `gL*`, `gL#`, `gL1`, `gLi`, `gLI`, `gLa`, `gLA`, `gl`, `gL`, `o`, `O`; insert: `<C-D>`, `<C-T>`, `<C-L><C-J>`, `<C-L><C-K>`, `<C-L><C-M>`, `<CR>` |
|
||||
| `headers` | `true` | `=`, `-`, `]]`, `[[`, `]=`, `[=`, `]u`, `[u` |
|
||||
| `table_editing` | `true` | `gqq`, `<A-Left>`, `<A-Right>`, `<Tab>` (insert) |
|
||||
| `table_editing` | `true` | `gqq`, `gq1`, `gww`, `gw1`, `<A-Left>`, `<A-Right>`; insert: `<Tab>`, `<S-Tab>` |
|
||||
| `diary` | `true` | `<C-Down>`, `<C-Up>` |
|
||||
| `html_export` | `true` | `<Leader>wh`, `<Leader>whh` |
|
||||
| `html_export` | `true` | `<Leader>wh`, `<Leader>whh`, `<Leader>wha` |
|
||||
| `text_objects` | `true` | `ah`, `ih`, `aH`, `iH`, `al`, `il`, `a\`, `i\`, `ac`, `ic` |
|
||||
| `mouse` | `false` | `<2-LeftMouse>`, `<RightMouse>`, … (opt-in) |
|
||||
| `mouse` | `false` | `<2-LeftMouse>`, `<S-2-LeftMouse>`, `<C-2-LeftMouse>`, `<MiddleMouse>`, `<RightMouse>` (opt-in) |
|
||||
|
||||
#### Per-wiki keys (`wikis[]`)
|
||||
|
||||
@@ -384,14 +386,14 @@ For users configuring without Lua.
|
||||
| `g:nuwiki_link_severity` | `'warn'` | broken-link severity: `off` \| `hint` \| `warn` \| `error` |
|
||||
| `g:nuwiki_map_prefix` | `'<Leader>w'` | prefix for the wiki command family |
|
||||
| `g:nuwiki_no_default_mappings` | `0` | `1` skips the whole keymap layer |
|
||||
| `g:nuwiki_no_wiki_prefix_mappings` | `0` | `1` skips the `<Leader>w*` group |
|
||||
| `g:nuwiki_no_links_mappings` | `0` | `1` skips the link group (`<CR>`, `+`, …) |
|
||||
| `g:nuwiki_no_lists_mappings` | `0` | `1` skips the list group (`<C-Space>`, `gl*`, `o`/`O`, …) |
|
||||
| `g:nuwiki_no_headers_mappings` | `0` | `1` skips the header group (`=`, `-`, `]]`, …) |
|
||||
| `g:nuwiki_no_table_editing_mappings` | `0` | `1` skips the table group (`gqq`, `<A-Left>`, insert `<Tab>`) |
|
||||
| `g:nuwiki_no_diary_mappings` | `0` | `1` skips the diary nav group (`<C-Down>`, `<C-Up>`) |
|
||||
| `g:nuwiki_no_html_export_mappings` | `0` | `1` skips the HTML export group (`<Leader>wh*`) |
|
||||
| `g:nuwiki_no_text_objects_mappings` | `0` | `1` skips the text-object group (`ah`, `il`, …) |
|
||||
| `g:nuwiki_no_wiki_prefix_mappings` | `0` | `1` skips the `wiki_prefix` group (`<Leader>ww`, `<Leader>wt`, `<Leader>ws`, `<Leader>wi`, `<Leader>w<Leader>{w,y,t,m,i}`) |
|
||||
| `g:nuwiki_no_links_mappings` | `0` | `1` skips the `links` group (`<CR>`, `<S-CR>`, `<C-CR>`, `<C-S-CR>`, `<D-CR>`, `<M-CR>`, `<BS>`, `<Tab>`, `<S-Tab>`, `+`, `<Leader>w{n,d,r,c}`) |
|
||||
| `g:nuwiki_no_lists_mappings` | `0` | `1` skips the `lists` group (`<C-Space>`, `gnt`, `gln`, `glp`, `glx`, `glh`, `gll`, `gLh`, `gLl`, `glr`, `gLr`, `gl{-,*,#,1,i,I,a,A}`, `gL{…}`, `gl`, `gL`, `o`, `O`; insert `<C-D>`, `<C-T>`, `<C-L><C-J/K/M>`, `<CR>`) |
|
||||
| `g:nuwiki_no_headers_mappings` | `0` | `1` skips the `headers` group (`=`, `-`, `]]`, `[[`, `]=`, `[=`, `]u`, `[u`) |
|
||||
| `g:nuwiki_no_table_editing_mappings` | `0` | `1` skips the `table_editing` group (`gqq`, `gq1`, `gww`, `gw1`, `<A-Left>`, `<A-Right>`; insert `<Tab>`, `<S-Tab>`) |
|
||||
| `g:nuwiki_no_diary_mappings` | `0` | `1` skips the `diary` nav group (`<C-Down>`, `<C-Up>`) |
|
||||
| `g:nuwiki_no_html_export_mappings` | `0` | `1` skips the `html_export` group (`<Leader>wh`, `<Leader>whh`, `<Leader>wha`) |
|
||||
| `g:nuwiki_no_text_objects_mappings` | `0` | `1` skips the `text_objects` group (`ah`, `ih`, `aH`, `iH`, `al`, `il`, `a\`, `i\`, `ac`, `ic`) |
|
||||
| `g:nuwiki_no_folding` | `0` | `1` skips foldexpr setup |
|
||||
| `g:nuwiki_mouse_mappings` | `0` | `1` enables mouse maps |
|
||||
| `g:nuwiki_binary_path` | _(auto)_ | path to a prebuilt `nuwiki-ls` binary, bypassing the bundled one |
|
||||
|
||||
Reference in New Issue
Block a user