AckslD / muren.nvim

Multiple replacements in neovim
363 stars 5 forks source link

Feature request: replace only in selected area #30

Closed TroySigX closed 1 year ago

AckslD commented 1 year ago

Doesn't supplying a range to the command work? That's the intention at least

TroySigX commented 1 year ago

I believe I've supplied the range. Here's my config:

local M = {}

function M.setup()
  require('muren').setup()
end

function M.keymaps()
  require('which-key').register({
    ['<C-s>'] = { function() require('muren.api').toggle_ui() end, 'Toggle [S]ubstitute' },
  }, { mode = { 'n', 'v' } })
end

return M

I chose a range and then press <C-s> to replace, but instead of just applying that specific range, it replaced the whole file

TroySigX commented 1 year ago

Oh, I see. Because instead of use the vim command, I used the api to toggle the UI, so I can't replace in range. Sorry for that.