diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index a197792ef..05aa86e9f 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -504,6 +504,7 @@ impl MappableCommand { hover, "Show docs for item under cursor", toggle_comments, "Comment/uncomment selections", toggle_line_comments, "Line comment/uncomment selections", + testing1234, "a", toggle_block_comments, "Block comment/uncomment selections", rotate_selections_forward, "Rotate selections forward", rotate_selections_backward, "Rotate selections backward", @@ -5179,6 +5180,13 @@ fn toggle_comments(cx: &mut Context) { }) } +fn testing1234(cx: &mut Context) { + let doc = doc!(cx.editor); + let syntax = doc.syntax(); + + log::error!("{syntax:#?}"); +} + fn toggle_line_comments(cx: &mut Context) { toggle_comments_impl(cx, |line_token, block_tokens, doc, selection| { if line_token.is_none() && block_tokens.is_some() { diff --git a/helix-term/src/keymap/default.rs b/helix-term/src/keymap/default.rs index e160b2246..cf6f52035 100644 --- a/helix-term/src/keymap/default.rs +++ b/helix-term/src/keymap/default.rs @@ -6,6 +6,7 @@ use helix_core::hashmap; pub fn default() -> HashMap { let normal = keymap!({ "Normal mode" + "M" => testing1234, "h" | "left" => move_char_left, "j" | "down" => move_visual_line_down, "k" | "up" => move_visual_line_up, diff --git a/lol.html b/lol.html new file mode 100644 index 000000000..516ea19a9 --- /dev/null +++ b/lol.html @@ -0,0 +1,5 @@ +

C-c on this line should use the HTML comment token(s).

+