ggandor / leap.nvim

Neovim's answer to the mouse 🦘
MIT License
4.33k stars 47 forks source link

Leap-remote: The result is different when the key starts with the verb #240

Open abeldekat opened 2 months ago

abeldekat commented 2 months ago

Hello @ggandor,

Thanks for the amazing improvements! I like the combination of the filter and bidirectional search, as outlined in this reddit post

The observation below was initially added to issue Defaults: make (leap-forward) inclusive

I now think that the observation is not related to that issue...

vim.keymap.set({'n', 'o'}, 'gs', function ()
  require('leap.remote').action()
end)

Remote operations can be performed in two ways. For example, yanking from another window, using s to complete the selection:

local test = "Select this including ( skip the rest from the starting bracket )"
  1. gs{leap to start of "Se}s (y
  2. ygs{leap to start of "Se}s (

The first approach yields "Select this including The second yields "Select this including The second approach does not include the last space.

Also, in the second approach, visual mode is not used.