Add no_op
command (#743)
* Add `no_op` command * Document `no_op` in `remapping.md`
This commit is contained in:
parent
1540b37f34
commit
3e12b00993
2 changed files with 5 additions and 0 deletions
|
@ -49,4 +49,6 @@ Control, Shift and Alt modifiers are encoded respectively with the prefixes
|
||||||
| Null | `"null"` |
|
| Null | `"null"` |
|
||||||
| Escape | `"esc"` |
|
| Escape | `"esc"` |
|
||||||
|
|
||||||
|
Keys can be disabled by binding them to the `no_op` command.
|
||||||
|
|
||||||
Commands can be found in the source code at [`helix-term/src/commands.rs`](https://github.com/helix-editor/helix/blob/master/helix-term/src/commands.rs)
|
Commands can be found in the source code at [`helix-term/src/commands.rs`](https://github.com/helix-editor/helix/blob/master/helix-term/src/commands.rs)
|
||||||
|
|
|
@ -162,6 +162,7 @@ impl Command {
|
||||||
|
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
commands!(
|
commands!(
|
||||||
|
no_op, "Do nothing",
|
||||||
move_char_left, "Move left",
|
move_char_left, "Move left",
|
||||||
move_char_right, "Move right",
|
move_char_right, "Move right",
|
||||||
move_line_up, "Move up",
|
move_line_up, "Move up",
|
||||||
|
@ -361,6 +362,8 @@ impl PartialEq for Command {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn no_op(_cx: &mut Context) {}
|
||||||
|
|
||||||
fn move_impl<F>(cx: &mut Context, move_fn: F, dir: Direction, behaviour: Movement)
|
fn move_impl<F>(cx: &mut Context, move_fn: F, dir: Direction, behaviour: Movement)
|
||||||
where
|
where
|
||||||
F: Fn(RopeSlice, Range, Direction, usize, Movement) -> Range,
|
F: Fn(RopeSlice, Range, Direction, usize, Movement) -> Range,
|
||||||
|
|
Loading…
Add table
Reference in a new issue