vim-subversive
vim-subversive copied to clipboard
Problem with substituting over range
Hi, I have a small problem with the substitution. Whenever I want to substitute say all e's in a single word, it substitutes all e's in the line instead.
Input was <leader>sliw
The problem also occurs with minimal config with only subversive installed.
Neovim version output:
NVIM v0.6.1
Build type: Release
LuaJIT 2.0.5
Compiled by builduser
Features: +acl +iconv +tui
Keymap config (lua):
vim.api.nvim_set_keymap("n", "ss", "<Plug>(SubversiveSubstituteLine)", {})
vim.api.nvim_set_keymap("n", "S", "<Plug>(SubversiveSubstituteToEndOfLine)", {})
vim.api.nvim_set_keymap("n", "<leader>s", "<Plug>(SubversiveSubstituteRange)", {})
vim.api.nvim_set_keymap("x", "<leader>s", "<Plug>(SubversiveSubstituteRange)", {})
vim.api.nvim_set_keymap("n", "<leader>ss", "<Plug>(SubversiveSubstituteWordRange)", {})
This is a valid issue, but I'm not sure how we'd go about implementing it. Under the hood, subversive generates an ex-mode command to perform the substitution, and as far as I know ex-mode ranges can only be specified as lines.
You can see the ex-mode command that is generated for any substitution by enabling the subversivePromptWithActualCommand
setting
Oh I thought this was just my installation acting up. I could have sworn that this was working for me before switching to lua for my configuration.