fix: add down level ':' keybindings to vim and helix modes
This is for terminals that don't send modifiers at all.
This commit is contained in:
parent
271516f07f
commit
0abb21a400
4 changed files with 9 additions and 2 deletions
|
@ -86,6 +86,7 @@
|
||||||
|
|
||||||
["shift+j", "join_selections"],
|
["shift+j", "join_selections"],
|
||||||
|
|
||||||
|
[":", "open_command_palette"],
|
||||||
["shift+;", "open_command_palette"],
|
["shift+;", "open_command_palette"],
|
||||||
|
|
||||||
["shift+7", "align_selections"],
|
["shift+7", "align_selections"],
|
||||||
|
@ -352,6 +353,7 @@
|
||||||
|
|
||||||
["shift+j", "join_selections"],
|
["shift+j", "join_selections"],
|
||||||
|
|
||||||
|
[":", "open_command_palette"],
|
||||||
["shift+;", "open_command_palette"],
|
["shift+;", "open_command_palette"],
|
||||||
|
|
||||||
["shift+7", "align_selections"],
|
["shift+7", "align_selections"],
|
||||||
|
@ -507,6 +509,7 @@
|
||||||
"home": {
|
"home": {
|
||||||
"on_match_failure": "ignore",
|
"on_match_failure": "ignore",
|
||||||
"press": [
|
"press": [
|
||||||
|
[":", "open_command_palette"],
|
||||||
[";", "open_command_palette"],
|
[";", "open_command_palette"],
|
||||||
["shift+;", "open_command_palette"],
|
["shift+;", "open_command_palette"],
|
||||||
["b", "open_keybind_config"],
|
["b", "open_keybind_config"],
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
["n", "goto_next_match"],
|
["n", "goto_next_match"],
|
||||||
["0", "move_begin"],
|
["0", "move_begin"],
|
||||||
["<S-4>", "move_end"],
|
["<S-4>", "move_end"],
|
||||||
|
[":", "open_command_palette"],
|
||||||
[";", "open_command_palette"],
|
[";", "open_command_palette"],
|
||||||
["<S-;>", "open_command_palette"],
|
["<S-;>", "open_command_palette"],
|
||||||
["p", "paste"],
|
["p", "paste"],
|
||||||
|
@ -93,6 +94,7 @@
|
||||||
"syntax": "vim",
|
"syntax": "vim",
|
||||||
"on_match_failure": "ignore",
|
"on_match_failure": "ignore",
|
||||||
"press": [
|
"press": [
|
||||||
|
[":", "open_command_palette"],
|
||||||
[";", "open_command_palette"],
|
[";", "open_command_palette"],
|
||||||
["<S-;>", "open_command_palette"],
|
["<S-;>", "open_command_palette"],
|
||||||
["b", "open_keybind_config"],
|
["b", "open_keybind_config"],
|
||||||
|
|
|
@ -720,6 +720,8 @@ const match_test_cases = .{
|
||||||
.{ "<C-o>", "<C-o>", .matched },
|
.{ "<C-o>", "<C-o>", .matched },
|
||||||
.{ "<S-'><S-->dd", "<S-'><S-->dd", .matched },
|
.{ "<S-'><S-->dd", "<S-'><S-->dd", .matched },
|
||||||
.{ "<S-'><S-->dd", "<S-'><S-->da", .match_impossible },
|
.{ "<S-'><S-->dd", "<S-'><S-->da", .match_impossible },
|
||||||
|
.{ ":", ":", .matched },
|
||||||
|
.{ ":", ";", .match_impossible },
|
||||||
};
|
};
|
||||||
|
|
||||||
test "match" {
|
test "match" {
|
||||||
|
|
|
@ -92,7 +92,7 @@ pub fn parse_key_events(allocator: std.mem.Allocator, event: input.Event, str: [
|
||||||
//lowercase characters
|
//lowercase characters
|
||||||
'a'...'z',
|
'a'...'z',
|
||||||
'0'...'9',
|
'0'...'9',
|
||||||
'`', '-', '=', '[', ']', '\\', ';', '\'', ',', '.', '/', => {
|
'`', '-', '=', '[', ']', '\\', ':', ';', '\'', ',', '.', '/', => {
|
||||||
try result.append(.{ .key = str[i] });
|
try result.append(.{ .key = str[i] });
|
||||||
i += 1;
|
i += 1;
|
||||||
},
|
},
|
||||||
|
@ -340,7 +340,7 @@ pub fn parse_key_events(allocator: std.mem.Allocator, event: input.Event, str: [
|
||||||
//lowercase characters only inside the escape sequence
|
//lowercase characters only inside the escape sequence
|
||||||
'a'...'z',
|
'a'...'z',
|
||||||
'0'...'9',
|
'0'...'9',
|
||||||
'`', '-', '=', '[', ']', '\\', ';', '\'', ',', '.', '/',
|
'`', '-', '=', '[', ']', '\\', ':', ';', '\'', ',', '.', '/',
|
||||||
=> {
|
=> {
|
||||||
try result.append(.{ .key = str[i], .modifiers = modifiers });
|
try result.append(.{ .key = str[i], .modifiers = modifiers });
|
||||||
modifiers = 0;
|
modifiers = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue