flow/src/keybind/builtin/helix.json
Igor Támara d695d69383 feat: closing and saving including multiple in helix mode
Review of devlogs to use internal functions to also:

* select next and prev word
* select to start en of doc
* delete to end of line
* Add Cursor to next line
* Show diagnostics
* Show references
2025-09-28 00:06:48 +02:00

554 lines
19 KiB
JSON

{
"settings": {
"init_command": ["enter_helix_mode"],
"deinit_command": ["exit_helix_mode"]
},
"normal": {
"on_match_failure": "ignore",
"name": "NOR",
"line_numbers": "relative",
"cursor": "block",
"selection": "inclusive",
"press": [
["ctrl+b", "move_scroll_page_up"],
["ctrl+f", "move_scroll_page_down"],
["ctrl+u", "move_scroll_half_page_up"],
["ctrl+d", "move_scroll_half_page_down"],
["z z", "scroll_view_center"],
["ctrl+c", "toggle_comment"],
["ctrl+i", "jump_forward"],
["ctrl+o", "jump_back"],
["ctrl+s", "save_selection"],
["ctrl+a", "increment"],
["ctrl+x", "decrement"],
["ctrl+^", "open_previous_file"],
["alt+.", "repeat_last_motion"],
["alt+`", "to_upper"],
["alt+d", "delete_backward"],
["alt+c", "change_backward_helix"],
["alt+s", "split_selection_on_newline"],
["alt+-", "merge_selections"],
["alt+_", "merge_consecutive_selections"],
["alt+;", "flip_selections"],
["alt+o", "expand_selection"],
["alt+up", "expand_selection"],
["alt+i", "shrink_selection"],
["alt+down", "shrink_selection"],
["alt+p", "select_prev_sibling"],
["alt+left", "select_prev_sibling"],
["alt+n", "select_next_sibling"],
["alt+right", "select_next_sibling"],
["alt+e", "move_parent_node_end"],
["alt+b", "move_parent_node_start"],
["alt+a", "select_all_siblings"],
["alt+x", "shrink_to_line_bounds"],
["alt+u", "undo"],
["alt+,", "remove_primary_selection"],
["alt+C", "copy_selection_on_next_line"],
["alt+I", "select_all_children"],
["alt+shift+down", "select_all_children"],
["alt+U", "redo"],
["alt+J", "join_selections_space"],
["alt+(", "rotate_selection_contents_backward"], ["alt+)", "rotate_selection_contents_forward"],
["alt+|", "shell_pipe_to"],
["alt+!", "shell_append_output"],
["~", "switch_case"],
["T", "till_prev_char"],
["F", "move_to_char", "move_to_char_left"],
["W", "move_next_long_word_start"],
["B", "move_prev_long_word_start"],
["E", "move_next_long_word_end"],
["I", ["enter_mode", "insert"], ["smart_move_begin"]],
["A", ["enter_mode", "insert"], ["move_end"]],
["O", ["enter_mode", "insert"], ["smart_insert_line_before"]],
["C", "add_cursor_down"],
["S", "split_selection"],
["X", "extend_to_line_bounds"],
["?", "rfind"],
["N", "goto_prev_match"],
["*", "search_selection"],
["U", "redo"],
["P", "paste"],
["Q", "replay_macro"],
[">", "indent"],
["<", "unindent"],
["J", "join_selections"],
[":", "open_command_palette"],
["&", "align_selections"],
["_", "trim_selections"],
["(", "rotate_selections_backward"],
[")", "rotate_selections_forward"],
["\"", "select_register"],
["|", "shell_pipe"],
["!", "shell_insert_output"],
["$", "shell_keep_pipe"],
["h", "move_left"],
["j", "move_down"],
["k", "move_up"],
["l", "move_right"],
["t", "find_till_char"],
["f", "move_to_char", "move_to_char_right"],
["`", "to_lower"],
["home", "move_begin"],
["end", "move_end"],
["kp_home", "move_begin"],
["kp_end", "move_end"],
["w","move_next_word_start"],
["b","move_prev_word_start"],
["e","move_next_word_end"],
["v", "enter_mode", "select"],
["g g", "goto_line_vim"],
["g e", "move_buffer_end"],
["g f", "goto_file"],
["g h", "move_begin"],
["g l", "move_end"],
["g s", "smart_move_begin"],
["g d", "goto_definition"],
["g y", "goto_type_definition"],
["g r", "references"],
["g i", "goto_implementation"],
["g t", "goto_window_top"],
["g c", "goto_window_center"],
["g b", "goto_window_bottom"],
["g a", "goto_last_accessed_file"],
["g m", "goto_last_modified_file"],
["g n", "goto_next_buffer"],
["g p", "goto_previous_buffer"],
["g k", "goto_previous_buffer"],
["g .", "goto_last_modification"],
["g w", "goto_word"],
["g D", "goto_declaration"],
["i", "enter_mode", "insert"],
["a", ["enter_mode", "insert"], ["move_right"]],
["o", ["enter_mode", "insert"], ["smart_insert_line_after"]],
["d", "cut_forward_internal_inclusive"],
["c", ["enable_selection"], ["enter_mode", "insert"], ["cut_forward_internal_inclusive"]],
["s", "select_regex"],
[";", "collapse_selections"],
["x", "extend_line_below"],
["m m", "match_brackets"],
["m s", "surround_add"],
["m r", "surround_replace"],
["m d", "surround_delete"],
["m a", "select_textobject_around"],
["m i", "select_textobject_inner"],
["[ D", "goto_first_diag"],
["[ G", "goto_first_change"],
["[ T", "goto_prev_test"],
["[ d", "goto_prev_diagnostic"],
["[ g", "goto_prev_change"],
["[ f", "goto_prev_function"],
["[ t", "goto_prev_class"],
["[ a", "goto_prev_parameter"],
["[ c", "goto_prev_comment"],
["[ e", "goto_prev_entry"],
["[ p", "goto_prev_paragraph"],
["[ space", "add_newline_above"],
["] D", "goto_last_diag"],
["] G", "goto_last_change"],
["] T", "goto_next_test"],
["] d", "goto_next_diagnostic"],
["] g", "goto_next_change"],
["] f", "goto_next_function"],
["] t", "goto_next_class"],
["] a", "goto_next_parameter"],
["] c", "goto_next_comment"],
["] e", "goto_next_entry"],
["] p", "goto_next_paragraph"],
["] space", "add_newline_below"],
["/", "find"],
["n", "goto_next_match"],
["u", "undo"],
["y", ["enable_selection"], ["copy_helix"], ["enter_mode", "normal"]],
["%", "select_all"],
["p", "paste_after"],
["q", "record_macro"],
["=", "format_selections"],
[",", "keep_primary_selection"],
["escape", "cancel"],
["page_up", "move_scroll_page_up"],
["page_down", "move_scroll_page_down"],
["kp_page_up", "move_scroll_page_up"],
["kp_page_down", "move_scroll_page_down"],
["space F", "find_file"],
["space S", "workspace_symbol_picker"],
["space D", "workspace_diagnostics_picker"],
["space P", "system_paste"],
["space R", "replace_selections_with_clipboard"],
["space ?", "open_command_palette"],
["space f", "find_file"],
["space b", "switch_buffers"],
["space j", "jumplist_picker"],
["space s", "symbol_picker"],
["space d", "show_diagnostics"],
["space a", "code_action"],
["space '", "last_picker"],
["space y", "copy"],
["space p", "system_paste_after"],
["space /", "find_in_files"],
["space k", "hover"],
["space r", "rename_symbol"],
["space h", "select_references_to_symbol_under_cursor"],
["space c", "toggle_comment"],
["0", "add_integer_argument_digit", 0],
["1", "add_integer_argument_digit", 1],
["2", "add_integer_argument_digit", 2],
["3", "add_integer_argument_digit", 3],
["4", "add_integer_argument_digit", 4],
["5", "add_integer_argument_digit", 5],
["6", "add_integer_argument_digit", 6],
["7", "add_integer_argument_digit", 7],
["8", "add_integer_argument_digit", 8],
["9", "add_integer_argument_digit", 9]
]
},
"insert": {
"name": "INS",
"line_numbers": "absolute",
"cursor": "beam",
"init_command": ["pause_undo_history"],
"deinit_command": ["resume_undo_history"],
"press": [
["ctrl+u", "move_scroll_page_up"],
["ctrl+d", "move_scroll_page_down"],
["ctrl+y", "redo"],
["ctrl+c", "enter_mode", "normal"],
["ctrl+o", "run_ls"],
["ctrl+k", "delete_to_end"],
["escape", "enter_mode", "normal"]
]
},
"select": {
"name": "SEL",
"line_numbers": "relative",
"cursor": "block",
"selection": "inclusive",
"init_command": ["enable_selection"],
"press": [
["b", "select_word_left"],
["w", "select_word_right"],
["g g", "select_buffer_begin"],
["g e", "select_buffer_end"],
["ctrl+b", "select_page_up"],
["ctrl+f", "select_page_down"],
["ctrl+u", "select_half_page_up"],
["ctrl+d", "select_half_page_down"],
["z z", "scroll_view_center"],
["ctrl+c", "toggle_comment"],
["ctrl+i", "jump_forward"],
["ctrl+o", "jump_back"],
["ctrl+s", "save_selection"],
["ctrl+a", "increment"],
["ctrl+x", "decrement"],
["ctrl+^", "open_previous_file"],
["alt+.", "repeat_last_motion"],
["alt+`", "switch_to_uppercase"],
["alt+d", "delete_backward"],
["alt+c", ["enter_mode", "insert"], ["delete_backward"]],
["alt+s", "split_selection_on_newline"],
["alt+-", "merge_selections"],
["alt+_", "merge_consecutive_selections"],
["alt+;", "flip_selections"],
["alt+o", "expand_selection"],
["alt+i", "shrink_selection"],
["alt+p", "select_prev_sibling"],
["alt+n", "select_next_sibling"],
["alt+up", "expand_selection"],
["alt+down", "shrink_selection"],
["alt+left", "select_prev_sibling"],
["alt+right", "select_next_sibling"],
["alt+kp_up", "expand_selection"],
["alt+kp_down", "shrink_selection"],
["alt+kp_left", "select_prev_sibling"],
["alt+kp_right", "select_next_sibling"],
["alt+e", "extend_parent_node_end"],
["alt+b", "extend_parent_node_start"],
["alt+a", "select_all_siblings"],
["alt+x", "shrink_to_line_bounds"],
["alt+u", "undo"],
["alt+,", "remove_primary_selection"],
["alt+C", "copy_selection_on_next_line"],
["alt+I", "select_all_children"],
["alt+shift+down", "select_all_children"],
["alt+U", "redo"],
["alt+J", "join_selections_space"],
["alt+(", "rotate_selection_contents_backward"],
["alt+)", "rotate_selection_contents_forward"],
["alt+|", "shell_pipe_to"],
["alt+!", "shell_append_output"],
["~", "switch_case"],
["T", "extend_till_prev_char"],
["F", "move_to_char", "select_to_char_left_vim"],
["W", "extend_next_long_word_start"],
["B", "extend_prev_long_word_start"],
["E", "extend_next_long_word_end"],
["G", "move_buffer_end_or_count_line"],
["I", ["enter_mode", "insert"], ["smart_move_begin"]],
["A", ["enter_mode", "insert"], ["move_end"]],
["O", ["enter_mode", "insert"], ["smart_insert_line_before"]],
["C", "copy_selection_on_next_line"],
["S", "split_selection"],
["X", "extend_to_line_bounds"],
["?", "rfind"],
["N", "extend_search_next"],
["*", "extend_search_prev"],
["U", "redo"],
["P", "paste"],
["Q", "replay_macro"],
[">", "indent"],
["<", "unindent"],
["J", "join_selections"],
[":", "open_command_palette"],
["&", "align_selections"],
["_", "trim_selections"],
["(", "rotate_selections_backward"],
[")", "rotate_selections_forward"],
["\"", "select_register"],
["|", "shell_pipe"],
["!", "shell_insert_output"],
["$", "shell_keep_pipe"],
["h", "select_left_helix"],
["j", "select_down"],
["k", "select_up"],
["l", "select_right_helix"],
["left", "select_left"],
["down", "select_down"],
["up", "select_up"],
["right", "select_right"],
["kp_left", "select_left"],
["kp_down", "select_down"],
["kp_up", "select_up"],
["kp_right", "select_right"],
["%", "select_all"],
["t", "extend_till_char"],
["f", "move_to_char", "select_to_char_right_helix"],
["`", "switch_to_lowercase"],
["home", "extend_to_line_start"],
["end", "extend_to_line_end"],
["kp_home", "extend_to_line_start"],
["kp_end", "extend_to_line_end"],
["w", "extend_next_word_start"],
["b", "extend_pre_word_start"],
["e", "extend_next_word_end"],
["v", "enter_mode", "normal"],
["g g", "move_buffer_begin"],
["g e", "move_buffer_end"],
["g f", "goto_file"],
["g h", "move_begin"],
["g l", "select_end"],
["g s", "smart_move_begin"],
["g d", "goto_definition"],
["g y", "goto_type_definition"],
["g r", "goto_reference"],
["g i", "goto_implementation"],
["g t", "goto_window_top"],
["g c", "goto_window_center"],
["g b", "goto_window_bottom"],
["g a", "goto_last_accessed_file"],
["g m", "goto_last_modified_file"],
["g n", "goto_next_buffer"],
["g p", "goto_previous_buffer"],
["g k", "goto_previous_buffer"],
["g .", "goto_last_modification"],
["g w", "goto_word"],
["g D", "goto_declaration"],
["i", "enter_mode", "insert"],
["a", ["enter_mode", "insert"], ["move_right"]],
["o", ["enter_mode", "insert"], ["smart_insert_line_after"]],
["d", ["cut"], ["enter_mode", "normal"]],
["c", ["enter_mode", "insert"], ["cut"]],
["s", "select_regex"],
[";", "collapse_selections"],
["x", "extend_line_below"],
["m m", "match_brackets"],
["m s", "surround_add"],
["m r", "surround_replace"],
["m d", "surround_delete"],
["m a", "select_textobject_around"],
["m i", "select_textobject_inner"],
["[ D", "goto_first_diag"],
["[ G", "goto_first_change"],
["[ T", "goto_prev_test"],
["[ d", "goto_prev_diagnostic"],
["[ g", "goto_prev_change"],
["[ f", "goto_prev_function"],
["[ t", "goto_prev_class"],
["[ a", "goto_prev_parameter"],
["[ c", "goto_prev_comment"],
["[ e", "goto_prev_entry"],
["[ p", "goto_prev_paragraph"],
["[ space", "add_newline_above"],
["] d", "goto_last_diag"],
["] g", "goto_last_change"],
["] t", "goto_next_test"],
["] d", "goto_next_diagnostic"],
["] g", "goto_next_change"],
["] f", "goto_next_function"],
["] t", "goto_next_class"],
["] a", "goto_next_parameter"],
["] c", "goto_next_comment"],
["] e", "goto_next_entry"],
["] p", "goto_next_paragraph"],
["] space", "add_newline_below"],
["/", "find"],
["n", "goto_next_match"],
["u", "undo"],
["y", ["copy_helix"], ["enter_mode", "normal"]],
["p", "paste_after"],
["q", "record_macro"],
["=", "format_selections"],
[",", "keep_primary_selection"],
["escape", "enter_mode", "normal"],
["space F", "file_picker_in_current_directory"],
["space S", "workspace_symbol_picker"],
["space D", "workspace_diagnostics_picker"],
["space P", "system_paste"],
["space R", "replace_selections_with_clipboard"],
["space ?", "open_command_palette"],
["space f", "find_file"],
["space b", "switch_buffers"],
["space j", "jumplist_picker"],
["space s", "symbol_picker"],
["space d", "show_diagnostics"],
["space a", "code_action"],
["space '", "last_picker"],
["space y", "copy"],
["space p", "system_paste_after"],
["space /", "find_in_files"],
["space k", "hover"],
["space r", "rename_symbol"],
["space h", "select_references_to_symbol_under_cursor"],
["space c", "toggle_comment"],
["0", "add_integer_argument_digit", 0],
["1", "add_integer_argument_digit", 1],
["2", "add_integer_argument_digit", 2],
["3", "add_integer_argument_digit", 3],
["4", "add_integer_argument_digit", 4],
["5", "add_integer_argument_digit", 5],
["6", "add_integer_argument_digit", 6],
["7", "add_integer_argument_digit", 7],
["8", "add_integer_argument_digit", 8],
["9", "add_integer_argument_digit", 9]
]
},
"home": {
"on_match_failure": "ignore",
"press": [
["f", "find_file"],
["g", "find_in_files"],
[":", "open_command_palette"],
["b", "open_keybind_config"],
["j", "home_menu_down"],
["k", "home_menu_up"],
["F", "change_fontface"],
["h", "open_help"],
["v", "open_version_info"],
["q", "quit"],
["space", "home_menu_activate"]
]
}
}