From a8b89a530376e9fe7413dd2e665cb9c13aa666d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Fr=C3=B3es=20Franco?= Date: Thu, 21 May 2026 20:39:37 -0300 Subject: [PATCH] fix(vim): correct broken symlink, missing commands, and bad VimwikiGoBackLink MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - README: fix plain-Vim install symlink (ln -s target/… → ln -s ../target/… so the relative path resolves correctly from inside bin/) - ftplugin: add missing VimwikiUISelect command on the Vim path - ftplugin: add missing -count attribute on NuwikiTabIndex (Vim path) - ftplugin: fix VimwikiGoBackLink (Neovim path) — `normal!` with no argument causes E471; use `execute "normal! \"` instead Co-Authored-By: Claude Sonnet 4.6 --- README.md | 2 +- ftplugin/vimwiki.vim | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d492ebd..0138a86 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ call dein#add('gffranco/nuwiki', { ```sh git clone https://code.gfran.co/gffranco/nuwiki ~/.vim/pack/gffranco/start/nuwiki cd ~/.vim/pack/gffranco/start/nuwiki && cargo build --release -p nuwiki-ls -mkdir -p bin && ln -s target/release/nuwiki-ls bin/nuwiki-ls +mkdir -p bin && ln -s ../target/release/nuwiki-ls bin/nuwiki-ls ``` Plain Vim users also need an LSP client — diff --git a/ftplugin/vimwiki.vim b/ftplugin/vimwiki.vim index 3b0f680..c3f6886 100644 --- a/ftplugin/vimwiki.vim +++ b/ftplugin/vimwiki.vim @@ -31,6 +31,7 @@ if !has('nvim') command! -buffer -count VimwikiIndex call nuwiki#commands#wiki_index() command! -buffer -count VimwikiTabIndex call nuwiki#commands#wiki_tab_index() + command! -buffer VimwikiUISelect call nuwiki#commands#wiki_ui_select() command! -buffer VimwikiDiaryIndex call nuwiki#commands#diary_index() command! -buffer VimwikiMakeDiaryNote call nuwiki#commands#diary_today() command! -buffer VimwikiMakeYesterdayDiaryNote call nuwiki#commands#diary_yesterday() @@ -80,7 +81,7 @@ if !has('nvim') " :Nuwiki* canonical aliases (P10) — Vim side. command! -buffer -count NuwikiIndex call nuwiki#commands#wiki_index() - command! -buffer NuwikiTabIndex call nuwiki#commands#wiki_tab_index() + command! -buffer -count NuwikiTabIndex call nuwiki#commands#wiki_tab_index() command! -buffer NuwikiDiaryIndex call nuwiki#commands#diary_index() command! -buffer NuwikiDiaryToday call nuwiki#commands#diary_today() command! -buffer NuwikiDiaryYesterday call nuwiki#commands#diary_yesterday() @@ -267,7 +268,7 @@ command! -buffer VimwikiDiaryPrevDay lua require('nuwiki.commands').dia command! -buffer VimwikiDiaryGenerateLinks lua require('nuwiki.commands').diary_generate_index() command! -buffer VimwikiFollowLink lua vim.lsp.buf.definition() -command! -buffer VimwikiGoBackLink normal! +command! -buffer VimwikiGoBackLink execute "normal! \" command! -buffer VimwikiSplitLink split | lua vim.lsp.buf.definition() command! -buffer VimwikiVSplitLink vsplit | lua vim.lsp.buf.definition() command! -buffer VimwikiTabnewLink tabnew | lua vim.lsp.buf.definition()