Skip to content

Install the Vim/Neovim plugin via CMake, fix executable path escaping - #11

Merged
tdinelli merged 2 commits into
mainfrom
install-vim-plugin
Sep 24, 2026
Merged

tdinelli merged 2 commits into
mainfrom
install-vim-plugin

Conversation

@tdinelli

Copy link
Copy Markdown
Owner

Summary

  • Shell-escape g:ckgrep_executable in the Vim/Neovim plugin, which previously broke on executable paths containing spaces.
  • Add an opt-in INSTALL_VIM_PLUGIN CMake option (off by default, same pattern as BUILD_DOC) that installs editor/vim/{plugin,autoload,doc} into <prefix>/share/ckgrep/vim, so a cmake --install'd prefix can serve as the plugin root for a plugin manager (lazy.nvim, vim-plug, etc.) instead of requiring a separate git checkout.
  • Bump version to 1.1.2.
  • Document both in the main README and editor/vim/README.md.

Test plan

  • cmake -S . -B build -DINSTALL_VIM_PLUGIN=ON && cmake --build build && cmake --install build --prefix <tmp> and confirmed share/ckgrep/vim/{plugin,autoload,doc} and bin/ckgrep land as expected.
  • Confirmed default build (INSTALL_VIM_PLUGIN unset) does not install the plugin tree.

The auto-appended current-buffer file was already shellescape()'d, but
the configured executable path was spliced into the shell command string
as-is, breaking on paths with spaces (e.g. Windows' Program Files).
Lets a cmake --install'd prefix (not just a git checkout) serve as the
Vim/Neovim plugin root, so a plugin manager can point at the installed
tree instead of keeping a separate clone around. Installs
editor/vim/{plugin,autoload,doc} into <prefix>/share/ckgrep/vim,
opt-in and off by default like BUILD_DOC.

Bump version to 1.1.2.
@tdinelli
tdinelli merged commit cb2721e into main Sep 24, 2026
3 checks passed
@tdinelli
tdinelli deleted the install-vim-plugin branch September 24, 2026 20:34
@tdinelli tdinelli added the enhancement New feature or request label Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant