Skip to content

Use with leap.nvim and leap better, faster, stronger

Notifications You must be signed in to change notification settings

Sleepful/leap-by-word.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

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.

About

Use with leap.nvim and leap better, faster, stronger

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages