Use with leap.nvim and leap better, faster, stronger.
This allows you to leap by using only 1 letter as your query.
It will highlight the first letter of all words that match your query.
The goal is to make leap
easy peasy lemon squeezy, just look at the first letter, forget about looking at the second one.
So the steps are:
- Mentally choose a word that you want to leap to.
- Use your keybind to activate
leap-by-word
. - Input the first letter of the word that you picked, this will give it a label on your screen.
- Input the letter of the label that showed on your word, this will let you leap to it.
- Neovim >= 0.7.0
- leap.nvim
Use your preferred plugin manager - no extra steps needed.
Just pick your mapping:
-- example to map it to `s` key:
vim.keymap.set({'n', 'x', 'o'}, 's', function() require('leap-by-word').leap() end, {})
You can also pass a direction if you want:
-- can use "upwards" or "downwards" for direction, this means it will search only
-- in that direction from your cursor position. By default it uses "both" directions.
require('leap-by-word').leap({direction = "upwards"})
Allow this plugin to work with leap-spooky.nvim.