feat: simplify the implementation of switch_case and add a flow mode keybind

This commit is contained in:
CJ van den Berg 2024-10-15 20:47:39 +02:00
parent 9c448b14e5
commit 252ad3c269
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
4 changed files with 10 additions and 21 deletions

View file

@ -148,6 +148,7 @@ fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) !void {
'P' => self.cmd("goto_prev_file_or_diagnostic", .{}),
'U' => self.cmd("to_upper", .{}),
'L' => self.cmd("to_lower", .{}),
'C' => self.cmd("switch_case", .{}),
'I' => self.cmd("toggle_inputview", .{}),
'B' => self.cmd("move_word_left", .{}),
'F' => self.cmd("move_word_right", .{}),

View file

@ -212,7 +212,7 @@ fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) !void {
'o' => self.seq(.{ "smart_insert_line_before", "enter_mode" }, command.fmt(.{"vim/insert"})),
'k' => self.cmd("hover", .{}),
'`' => self.seq(.{ "switch_case", "move_right_vim" }, .{}),
'`' => self.cmd("switch_case", .{}),
else => {},
},
0 => switch (keypress) {