Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/commands.rs')
| -rw-r--r-- | helix-term/src/commands.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 304dcd88..ee25e8e3 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -565,6 +565,8 @@ impl MappableCommand { goto_prev_comment, "Goto previous comment", goto_next_test, "Goto next test", goto_prev_test, "Goto previous test", + goto_next_xml_element, "Goto next (X)HTML element", + goto_prev_xml_element, "Goto previous (X)HTML element", goto_next_entry, "Goto next pairing", goto_prev_entry, "Goto previous pairing", goto_next_paragraph, "Goto next paragraph", @@ -5882,6 +5884,14 @@ fn goto_prev_test(cx: &mut Context) { goto_ts_object_impl(cx, "test", Direction::Backward) } +fn goto_next_xml_element(cx: &mut Context) { + goto_ts_object_impl(cx, "xml-element", Direction::Forward) +} + +fn goto_prev_xml_element(cx: &mut Context) { + goto_ts_object_impl(cx, "xml-element", Direction::Backward) +} + fn goto_next_entry(cx: &mut Context) { goto_ts_object_impl(cx, "entry", Direction::Forward) } @@ -5949,6 +5959,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) { 'c' => textobject_treesitter("comment", range), 'T' => textobject_treesitter("test", range), 'e' => textobject_treesitter("entry", range), + 'x' => textobject_treesitter("xml-element", range), 'p' => textobject::textobject_paragraph(text, range, objtype, count), 'm' => textobject::textobject_pair_surround_closest( doc.syntax(), @@ -5993,6 +6004,7 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) { ("e", "Data structure entry (tree-sitter)"), ("m", "Closest surrounding pair (tree-sitter)"), ("g", "Change"), + ("x", "X(HTML) element (tree-sitter)"), (" ", "... or any character acting as a pair"), ]; |