Skip to content

Latest commit

 

History

History
64 lines (40 loc) · 2.06 KB

README.md

File metadata and controls

64 lines (40 loc) · 2.06 KB

leap-by-word.nvim

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:

  1. Mentally choose a word that you want to leap to.
  2. Use your keybind to activate leap-by-word.
  3. Input the first letter of the word that you picked, this will give it a label on your screen.
  4. Input the letter of the label that showed on your word, this will let you leap to it.

Screenshots

Before searching

Screenshot 2023-10-23 at 00 29 28

Searching for words that start with j

Screenshot 2023-10-23 at 00 29 35

Leap to j and then searching for words that start with o

Screenshot 2023-10-23 at 00 38 55

Requirements

Installation

Use your preferred plugin manager - no extra steps needed.

Usage

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"})

Future road map

Allow this plugin to work with leap-spooky.nvim.