[](https://github.com/echasnovski/mini.nvim/blob/main/LICENSE)
### Jump within visible lines via iterative label filtering
See more details in [Features](#features) and [help file](../doc/mini-jump2d.txt).
---
⦿ This is a part of [mini.nvim](https://github.com/echasnovski/mini.nvim) library. Please use [this link](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-jump2d.md) if you want to mention this module.
⦿ All contributions (issues, pull requests, discussions, etc.) are done inside of 'mini.nvim'.
⦿ See the repository page to learn about common design principles and configuration recipes.
---
If you want to help this project grow but don't know where to start, check out [contributing guides of 'mini.nvim'](https://github.com/echasnovski/mini.nvim/blob/main/CONTRIBUTING.md) or leave a Github star for 'mini.nvim' project and/or any its standalone Git repositories.
## Demo
https://user-images.githubusercontent.com/24854248/227734716-e7b6f2a8-4db1-441d-9b37-873da6772138.mp4
## Features
- Make jump by iterative filtering of possible, equally considered jump spots until there is only one. Filtering is done by typing a label character that is visualized at jump spot.
- Customizable:
- Way of computing possible jump spots with opinionated default.
- Characters used to label jump spots during iterative filtering.
- Visual effects: how many steps ahead to show; dim lines with spots.
- Action hooks to be executed at certain events during jump.
- Allowed windows: current and/or not current.
- Allowed lines: whether to process blank or folded lines, lines before/at/after cursor line, etc. Example: user can configure to look for spots only inside current window at or after cursor line.
Example: user can configure to look for word starts only inside current window at or after cursor line with 'j' and 'k' labels performing some action after jump.
- Works in Visual and Operator-pending (with dot-repeat) modes.
- Preconfigured ways of computing jump spots (see help for `MiniJump2d.builtin_opts()`):
- Starts of lines.
- Starts of words.
- Single character from user input.
- Variable length query from user input.
- Works with multibyte characters.
## Installation
This plugin can be installed as part of 'mini.nvim' library (**recommended**) or as a standalone Git repository.
There are two branches to install from:
- `main` (default, **recommended**) will have latest development version of plugin. All changes since last stable release should be perceived as being in beta testing phase (meaning they already passed alpha-testing and are moderately settled).
- `stable` will be updated only upon releases with code tested during public beta-testing phase in `main` branch.
Here are code snippets for some common installation methods (use only one):
| Github repo | Branch | Code snippet |
|---|---|---|
| 'mini.nvim' library | Main | Follow recommended 'mini.deps' installation |
| Stable | ||
| Standalone plugin | Main | add('echasnovski/mini.jump2d') |
| Stable | add({ source = 'echasnovski/mini.jump2d', checkout = 'stable' }) |
| Github repo | Branch | Code snippet |
|---|---|---|
| 'mini.nvim' library | Main | { 'echasnovski/mini.nvim', version = false }, |
| Stable | { 'echasnovski/mini.nvim', version = '*' }, |
|
| Standalone plugin | Main | { 'echasnovski/mini.jump2d', version = false }, |
| Stable | { 'echasnovski/mini.jump2d', version = '*' }, |
| Github repo | Branch | Code snippet |
|---|---|---|
| 'mini.nvim' library | Main | Plug 'echasnovski/mini.nvim' |
| Stable | Plug 'echasnovski/mini.nvim', { 'branch': 'stable' } |
|
| Standalone plugin | Main | Plug 'echasnovski/mini.jump2d' |
| Stable | Plug 'echasnovski/mini.jump2d', { 'branch': 'stable' } |