diff --git a/book/src/configuration.md b/book/src/configuration.md index 1b94ae856b5d..40b6dce6e4bf 100644 --- a/book/src/configuration.md +++ b/book/src/configuration.md @@ -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" +``` diff --git a/book/src/keymap.md b/book/src/keymap.md index c4cc0c171ca1..abfef4254229 100644 --- a/book/src/keymap.md +++ b/book/src/keymap.md @@ -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 diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index ff1f93ad62fa..97734a88309c 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -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},