vim-abolish
vim-abolish copied to clipboard
Add `inccommand` preview for Neovim
A Neovim PR was just merged which makes it possible to add inccommand previews to user commands. This has been the biggest thing I’ve been missing from this plugin, the ability to preview my changes before running the command.
https://github.com/neovim/neovim/pull/18194
Until official support is added , i think this plugin should add what you're looking for. https://github.com/markonm/traces.vim
I've gotten live preview for abolish in neovim using the live-preview plugin:
use {'smjonas/live-command.nvim', config=function()
require("live-command").setup {
commands = {
S = { cmd = "Subvert"}, -- must be defined before we import vim-abolish
},
}
end}
That must be defined before adding abolish, so that live-command can take over the S from abolish.
@emmanueltouzery Sadly, that doesn't work for me. It causes Neovim to crash with: extmark.c:255: extmark_clear: Assertion 'mark.ns > 0 && mark.id > 0' failed. But the Norm example from the live-preview plugin works as expected.
@b0o probably report a bug on that plugin or neovim. I did hit an issue which may not be fixable in live-command: since they must compute a diff to display and have no idea what was changed (while abolish would know and could make a smart diff), the display can be suboptimal: https://github.com/smjonas/live-command.nvim/issues/23
@b0o, @emmanueltouzery The crash might be the result of a Neovim bug that is triggered when runnning the :substitute command from a preview callback and at the same time running an LSP server. Not 100% confirmed though, so it would be nice if you could help confirm this. For more infos see https://github.com/smjonas/live-command.nvim/issues/24#issuecomment-1356812136.
This has been the biggest thing I’ve been missing from this plugin
Same here. Noticed this issue from 2018 https://github.com/tpope/vim-abolish/issues/63
+1!
Related to https://github.com/tpope/vim-abolish/issues/103.