feat: add command to toggle syntax highlighting (S-F10)

This commit is contained in:
CJ van den Berg 2024-10-12 20:26:40 +02:00
parent f4dd30b1c2
commit 470967981b
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
6 changed files with 30 additions and 3 deletions

View file

@ -179,6 +179,7 @@ fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) !void {
},
mod.SHIFT => switch (keypress) {
key.F03 => self.cmd("goto_prev_match", .{}),
key.F10 => self.cmd("toggle_syntax_highlighting", .{}),
key.LEFT => self.cmd("select_left", .{}),
key.RIGHT => self.cmd("select_right", .{}),
key.UP => self.cmd("select_up", .{}),
@ -559,6 +560,7 @@ const hints = tui.KeybindHints.initComptime(.{
.{ "toggle_inspector_view", "F5, C-F5, C-S-i" },
.{ "toggle_panel", "C-j, F11" },
.{ "toggle_whitespace_mode", "C-F10" },
.{ "toggle_syntax_highlighting", "S-F10" },
.{ "to_lower", "A-l" },
.{ "to_upper", "A-u" },
.{ "undo", "C-z" },