Bind autocomplete to ctrl-space
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
co-authored by
Antonio Scandurra
parent
0344c543af
commit
960696a504
@@ -225,7 +225,7 @@ pub fn init(cx: &mut MutableAppContext, path_openers: &mut Vec<Box<dyn PathOpene
|
||||
Binding::new("alt-cmd-[", Fold, Some("Editor")),
|
||||
Binding::new("alt-cmd-]", Unfold, Some("Editor")),
|
||||
Binding::new("alt-cmd-f", FoldSelectedRanges, Some("Editor")),
|
||||
Binding::new("ctrl-shift-A", ShowAutocomplete, Some("Editor")),
|
||||
Binding::new("ctrl-space", ShowAutocomplete, Some("Editor")),
|
||||
]);
|
||||
|
||||
cx.add_action(Editor::open_new);
|
||||
|
||||
@@ -34,9 +34,11 @@ impl Event {
|
||||
const ESCAPE_KEY: u16 = 0x1b;
|
||||
const TAB_KEY: u16 = 0x09;
|
||||
const SHIFT_TAB_KEY: u16 = 0x19;
|
||||
const SPACE_KEY: u16 = b' ' as u16;
|
||||
|
||||
#[allow(non_upper_case_globals)]
|
||||
match first_char as u16 {
|
||||
SPACE_KEY => "space",
|
||||
BACKSPACE_KEY => "backspace",
|
||||
ENTER_KEY => "enter",
|
||||
ESCAPE_KEY => "escape",
|
||||
|
||||
Reference in New Issue
Block a user