Skip to content

Commit a1a64fa

Browse files
committed
Add jump-mode section in the configuration book
1 parent 022dd42 commit a1a64fa

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

book/src/configuration.md

+20
Original file line numberDiff line numberDiff line change
@@ -347,3 +347,23 @@ max-wrap = 25 # increase value to reduce forced mid-word wrapping
347347
max-indent-retain = 0
348348
wrap-indicator = "" # set wrap-indicator to "" to hide it
349349
```
350+
351+
### `[editor.jump-mode]` Section
352+
353+
Options for jump mode. If you are already familiar with vim/nvim's [easymotion](https://github.com/easymotion/vim-easymotion), [hop](https://github.com/phaazon/hop.nvim), [leap](https://github.com/ggandor/leap.nvim) etc, you
354+
can think of jump mode as the equivalent in helix.
355+
356+
| Key | Description | Default |
357+
| --- | --- | --- |
358+
| `dim-during-jump` | Whether to dim the view when in jump mode. | `true` |
359+
| `num-chars-before-label` | How many characters the user should type before labelling the targets. | `1` |
360+
| `jump-keys` | Keys used in labels. Should be ascii characters. | `"jwetovxqpdygfblzhckisuranm"` |
361+
362+
Example:
363+
364+
```toml
365+
[editor.jump-mode]
366+
dim-during-jump = true
367+
num-chars-before-label = 2
368+
jump-keys = "laskdjfhgpmoinqzubwxyvecrt"
369+
```

book/src/keymap.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Jumps to various locations.
224224
| `j` | Move down textual (instead of visual) line | `move_line_down` |
225225
| `k` | Move up textual (instead of visual) line | `move_line_up` |
226226
| `w` | Word-wise jump mode | `jump_to_identifier_label` |
227-
| `/` | Character search jump mode | `jump_to_char_label` |
227+
| `/` | Character or string search jump mode | `jump_to_str_label` |
228228

229229
#### Match mode
230230

helix-term/src/ui/editor.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ use helix_core::{
1919
syntax::{self, Highlight, HighlightEvent},
2020
text_annotations::TextAnnotations,
2121
unicode::width::UnicodeWidthStr,
22-
visual_offset_from_block, Change, Position, Range, RopeSlice, Selection,
23-
Transaction,
22+
visual_offset_from_block, Change, Position, Range, RopeSlice, Selection, Transaction,
2423
};
2524
use helix_view::{
2625
document::{Mode, SavePoint, SCRATCH_BUFFER_NAME},

0 commit comments

Comments
 (0)