feat(parity): P3 quick-wins — ShowVersion, gLH/gLL/gLR, Search/Align nargs
Closes four low-risk P3 parity items (gap doc updated):
- VimwikiShowVersion / NuwikiShowVersion: new global command (both clients)
echoing g:nuwiki_version (0.1.0) + the host editor, via
nuwiki#commands#show_version / commands.show_version.
- gLH / gLL / gLR: upstream's case-variant aliases of gLh/gLl/gLr (dedent /
indent whole item, renumber all lists) added in both clients.
- VimwikiSearch / VWS: -nargs=1 -> -nargs=* (Vim + Neovim), so a multi-word
search no longer raises E488 and an empty invocation reuses the last search
pattern. (The lvimgrep-vs-vimwiki-engine difference stays open.)
- VimwikiTableAlignQ / AlignW / NuwikiTableAlign: bare -> -nargs=?, so
`:VimwikiTableAlignQ 2` no longer raises E488 (optional column arg is
accepted-and-ignored; the gqq-align vs gww-align-without-resize split
stays open).
Docs (doc/nuwiki.txt + README) updated for the command and the aliases.
Tests: surface.{Vimwiki,Nuwiki}ShowVersion, map[n].gL{H,L,R} (both
harnesses), cmd.search_and_tablealign_nargs (vim). Neovim 291, Vim
282/18/21 pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,12 @@ if exists('g:loaded_nuwiki')
|
||||
endif
|
||||
let g:loaded_nuwiki = 1
|
||||
|
||||
" Plugin version, surfaced by :VimwikiShowVersion / :NuwikiShowVersion.
|
||||
" Set before the Neovim early-return below so both clients see the global.
|
||||
if !exists('g:nuwiki_version')
|
||||
let g:nuwiki_version = '0.1.0'
|
||||
endif
|
||||
|
||||
" Resolve the plugin root NOW, while this script is being sourced and
|
||||
" <sfile> is still valid. Commands that need this path must reference
|
||||
" s:plugin_root — re-expanding <sfile> inside a command body evaluates
|
||||
@@ -47,6 +53,10 @@ augroup END
|
||||
command! -nargs=0 VimwikiUISelect call nuwiki#commands#wiki_ui_select()
|
||||
command! -nargs=0 NuwikiUISelect call nuwiki#commands#wiki_ui_select()
|
||||
|
||||
" Print the nuwiki version + host editor (upstream's :VimwikiShowVersion).
|
||||
command! -nargs=0 VimwikiShowVersion call nuwiki#commands#show_version()
|
||||
command! -nargs=0 NuwikiShowVersion call nuwiki#commands#show_version()
|
||||
|
||||
" Global entry-point mappings — work from any buffer, not just .wiki files.
|
||||
" Files are opened directly from config (no LSP required); the server
|
||||
" auto-starts via the FileType autocmd once the vimwiki buffer loads.
|
||||
|
||||
Reference in New Issue
Block a user