live-command.nvim icon indicating copy to clipboard operation
live-command.nvim copied to clipboard

confusing display with inline_highlighting

Open emmanueltouzery opened this issue 2 years ago • 1 comments

I used live-command to wrap vim-abolish:

  use {'smjonas/live-command.nvim', commit='ce4b104ce702c7bb9fdff863059af6d47107ca61', config=function()
    require("live-command").setup {
      defaults = {
        -- inline_highlighting = false,
      },
      commands = {
        Norm = { cmd = "norm" },
        S = { cmd = "Subvert"}, -- must be defined before we import vim-abolish
      },
    }
  end}

With an input file of:

result
Result
RESULT

And when previewing this command: %S/result/outcome

This is the display: image

Ideally the display would be like neovim's :%s preview meaning ~~result~~outcome

Disabling inline highlighting helps with that issue, but then whole lines are highlighted and it's not clear anymore what was changed. Making a word-by-word diff would help in this case, I guess.

emmanueltouzery avatar Oct 29 '22 11:10 emmanueltouzery

link for vim-abolish: https://github.com/tpope/vim-abolish

also, live-command must be setup before vim-abolish, because vim-abolish takes over the S command, unless it was already taken.

emmanueltouzery avatar Oct 29 '22 11:10 emmanueltouzery