Closed Chilly-Blaze closed 1 year ago
Commands in Vim are line-based, so even if your selection is within a line, the command still takes the whole line into account (this also holds for :substitute
, for example). To get your desired behavior, you can use the recommended keybindings in the README. They are based on Vims map-operator feature, which supports what you want to do.
thx.I will try to solve it.
I found an alternative solution:
vim.keymap.set('v', 'your mapping', 'y<cmd>Pantran<cr>p')
btw thank you for creating this plugin! 👍
I want to be able to translate what is selected in visual mode, so I try
:'<,'>Pantran
but it doesn't work.Pantran always translates the whole line word. What should I do?