Skip to content

Commit

Permalink
Add jump-mode section in the configuration book
Browse files Browse the repository at this point in the history
  • Loading branch information
semin-park committed Jun 21, 2023
1 parent bbc4ca4 commit f6e431a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
20 changes: 20 additions & 0 deletions book/src/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,3 +347,23 @@ max-wrap = 25 # increase value to reduce forced mid-word wrapping
max-indent-retain = 0
wrap-indicator = "" # set wrap-indicator to "" to hide it
```

### `[editor.jump-mode]` Section

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
can think of jump mode as the equivalent in helix.

| Key | Description | Default |
| --- | --- | --- |
| `dim-during-jump` | Whether to dim the view when in jump mode. | `true` |
| `num-chars-before-label` | How many characters the user should type before labelling the targets. | `1` |
| `jump-keys` | Keys used in labels. Should be ascii characters. | `"jwetovxqpdygfblzhckisuranm"` |

Example:

```toml
[editor.jump-mode]
dim-during-jump = true
num-chars-before-label = 2
jump-keys = "laskdjfhgpmoinqzubwxyvecrt"
```
2 changes: 1 addition & 1 deletion book/src/keymap.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Jumps to various locations.
| `j` | Move down textual (instead of visual) line | `move_line_down` |
| `k` | Move up textual (instead of visual) line | `move_line_up` |
| `w` | Word-wise jump mode | `jump_to_identifier_label` |
| `/` | Character search jump mode | `jump_to_char_label` |
| `/` | Character or string search jump mode | `jump_to_str_label` |

#### Match mode

Expand Down
3 changes: 1 addition & 2 deletions helix-term/src/ui/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ use helix_core::{
syntax::{self, Highlight, HighlightEvent},
text_annotations::TextAnnotations,
unicode::width::UnicodeWidthStr,
visual_offset_from_block, Change, Position, Range, RopeSlice, Selection,
Transaction,
visual_offset_from_block, Change, Position, Range, RopeSlice, Selection, Transaction,
};
use helix_view::{
document::{Mode, SavePoint, SCRATCH_BUFFER_NAME},
Expand Down

0 comments on commit f6e431a

Please sign in to comment.