lapce/defaults/keymaps-common.toml

738 lines
11 KiB
TOML
Raw Normal View History

2022-04-04 08:16:37 +00:00
# --------------------------------- General --------------------------------------------
[[keymaps]]
key = "F1"
command = "palette.command"
2022-08-27 23:09:49 +00:00
# [[keymaps]]
# key = "ctrl+q"
# command = "quit"
2022-04-04 08:16:37 +00:00
# --------------------------------- Basic editing ---------------------------------------
[[keymaps]]
key = "alt+up"
command = "move_line_up"
mode = "i"
[[keymaps]]
key = "alt+down"
command = "move_line_down"
mode = "i"
2022-03-21 13:03:37 +00:00
[[keymaps]]
key = "Delete"
command = "delete_forward"
mode = "i"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "backspace"
command = "delete_backward"
mode = "i"
[[keymaps]]
key = "shift+backspace"
2023-09-27 19:37:21 +00:00
command = "delete_forward"
mode = "i"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "Home"
command = "line_start_non_blank"
mode = "inv"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "End"
command = "line_end"
mode = "inv"
2022-03-21 13:10:02 +00:00
[[keymaps]]
key = "PageUp"
command = "page_up"
[[keymaps]]
key = "PageDown"
command = "page_down"
2022-03-21 13:16:12 +00:00
[[keymaps]]
key = "Ctrl+PageUp"
command = "scroll_up"
[[keymaps]]
key = "Ctrl+PageDown"
command = "scroll_down"
2022-04-04 08:16:37 +00:00
# ------------------------------------ Multi cursor -------------------------------------
[[keymaps]]
key = "alt+shift+i"
2022-04-04 08:16:37 +00:00
command = "insert_cursor_end_of_line"
2022-03-21 13:03:37 +00:00
mode = "i"
2022-04-04 08:16:37 +00:00
2022-07-19 07:23:55 +00:00
# ----------------------------------- Editor Management -------------------------------
[[keymaps]]
key = "ctrl+tab"
command = "next_editor_tab"
[[keymaps]]
key = "ctrl+shift+tab"
command = "previous_editor_tab"
# --------------------------------- Rich Language Editing ----------------------------
2022-03-21 13:03:37 +00:00
2022-08-31 18:25:06 +00:00
[[keymaps]]
key = "F2"
command = "rename_symbol"
2022-03-21 13:31:00 +00:00
[[keymaps]]
key = "F12"
command = "goto_definition"
[[keymaps]]
key = "g f"
command = "show_code_actions"
mode = "n"
2022-03-21 13:43:32 +00:00
# ------------------------------------ Navigation -------------------------------------
[[keymaps]]
key = "F8"
command = "next_error"
[[keymaps]]
key = "shift+F8"
command = "previous_error"
[[keymaps]]
key = "ctrl+-"
command = "jump_location_backward"
mode = "i"
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "ctrl+shift+-"
2022-03-21 13:43:32 +00:00
command = "jump_location_forward"
mode = "i"
2022-03-21 13:31:00 +00:00
# --------------------------------- Integrated Terminal ------------------------------
2022-03-21 13:03:37 +00:00
[[keymaps]]
2022-03-21 13:43:32 +00:00
key = "Ctrl+`"
2022-03-23 21:45:16 +00:00
command = "toggle_terminal_focus"
2022-04-04 08:16:37 +00:00
# ------------------------------------ ------------ -------------------------------------
2022-03-21 13:03:37 +00:00
[[keymaps]]
key = "tab"
command = "jump_to_next_snippet_placeholder"
when = "in_snippet"
mode = "i"
[[keymaps]]
key = "shift+tab"
command = "jump_to_prev_snippet_placeholder"
when = "in_snippet"
mode = "i"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "esc"
command = "clear_search"
2022-10-17 18:11:30 +00:00
when = "search_active || search_focus"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "ctrl+shift+up"
command = "select_next_syntax_item"
[[keymaps]]
key = "ctrl+shift+down"
command = "select_previous_syntax_item"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "ctrl+m"
command = "list.select"
when = "list_focus"
2022-05-20 12:19:35 +00:00
[[keymaps]]
key = "tab"
command = "list.select"
when = "completion_focus"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "enter"
command = "list.select"
when = "list_focus"
[[keymaps]]
key = "ctrl+p"
command = "list.previous"
when = "list_focus"
[[keymaps]]
key = "up"
command = "list.previous"
when = "list_focus"
[[keymaps]]
key = "PageUp"
command = "list.previous_page"
when = "list_focus"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "ctrl+n"
command = "list.next"
when = "list_focus"
[[keymaps]]
key = "down"
command = "list.next"
when = "list_focus"
[[keymaps]]
key = "PageDown"
command = "list.next_page"
when = "list_focus"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "o"
command = "list.expand"
when = "list_focus"
mode = "n"
[[keymaps]]
key = "/"
command = "palette.line"
mode = "n"
[[keymaps]]
key = "esc"
command = "modal.close"
2023-12-11 19:08:05 +00:00
when = "modal_focus || completion_focus"
[[keymaps]]
key = "tab"
command = "inline_completion.select"
when = "inline_completion_visible && !search_focus && !modal_focus && !list_focus && !search_active"
mode = "i"
[[keymaps]]
key = "esc"
command = "inline_completion.cancel"
when = "inline_completion_visible && !search_focus && !modal_focus && !list_focus && !search_active"
mode = "i"
[[keymaps]]
key = "alt+["
command = "inline_completion.previous"
when = "inline_completion_visible && !search_focus && !modal_focus && !list_focus && !search_active"
mode = "i"
[[keymaps]]
key = "alt+]"
command = "inline_completion.next"
when = "inline_completion_visible && !search_focus && !modal_focus && !list_focus && !search_active"
mode = "i"
[[keymaps]]
key = "alt+\\"
command = "inline_completion.invoke"
when = "!inline_completion_visible && !search_focus && !modal_focus && !list_focus && !search_active"
mode = "i"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "right"
command = "right"
mode = "inv"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "left"
command = "left"
mode = "inv"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "up"
command = "up"
when = "!list_focus"
mode = "inv"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "down"
command = "down"
when = "!list_focus"
mode = "inv"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "ctrl+h"
command = "delete_backward"
mode = "i"
[[keymaps]]
key = "enter"
command = "insert_new_line"
2022-05-05 21:04:07 +00:00
when = "!list_focus && !input_focus"
2022-04-04 08:16:37 +00:00
mode = "i"
2023-05-17 20:11:53 +00:00
[[keymaps]]
key = "tab"
command = "focus_replace_editor"
when = "search_focus"
[[keymaps]]
key = "tab"
command = "focus_find_editor"
when = "replace_focus"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "shift+enter"
command = "search_backward"
when = "search_focus"
mode = "i"
2022-05-05 20:54:22 +00:00
[[keymaps]]
key = "enter"
command = "search_forward"
when = "search_focus"
mode = "i"
[[keymaps]]
key = "enter"
command = "global_search_refresh"
when = "global_search_focus"
mode = "i"
2022-08-31 18:25:06 +00:00
[[keymaps]]
key = "enter"
command = "confirm_rename"
when = "rename_focus"
mode = "i"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "tab"
command = "insert_tab"
2023-12-11 19:08:05 +00:00
when = "!in_snippet && !completion_focus && !inline_completion_visible && !search_focus && !replace_focus"
2022-04-04 08:16:37 +00:00
mode = "i"
[[keymaps]]
key = "ctrl+m"
command = "insert_new_line"
2022-03-21 13:03:37 +00:00
when = "!list_focus"
2022-04-04 08:16:37 +00:00
mode = "i"
2022-09-25 15:51:38 +00:00
[[keymaps]]
key = "alt+shift+up"
command = "duplicate_line_up"
mode = "i"
[[keymaps]]
key = "alt+shift+down"
command = "duplicate_line_down"
mode = "i"
2022-04-04 08:16:37 +00:00
# ------------------------------------ Modal -----------------------------------------
[[keymaps]]
key = "esc"
command = "normal_mode"
mode = "niv"
2023-12-11 19:08:05 +00:00
when = "!search_focus && !modal_focus && !search_active && !inline_completion_visible"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "ctrl+c"
command = "normal_mode"
mode = "niv"
when = "!search_focus && !modal_focus && !search_active"
2022-04-03 21:33:19 +00:00
[[keymaps]]
key = "ctrl+["
command = "normal_mode"
mode = "niv"
when = "!search_focus && !search_active"
2022-04-03 21:33:19 +00:00
2022-04-04 08:16:37 +00:00
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "shift+;"
2022-04-04 08:16:37 +00:00
command = "palette.command"
mode = "n"
2022-03-21 13:03:37 +00:00
[[keymaps]]
2022-08-02 18:19:36 +00:00
key = "shift+g"
2022-04-04 08:16:37 +00:00
command = "go_to_line_default_last"
2022-03-21 13:03:37 +00:00
mode = "nv"
[[keymaps]]
key = "g g"
2022-04-04 08:16:37 +00:00
command = "go_to_line_default_first"
2022-03-21 13:03:37 +00:00
mode = "nv"
[[keymaps]]
key = "h"
command = "left"
mode = "nv"
[[keymaps]]
key = "j"
command = "down"
mode = "nv"
[[keymaps]]
key = "k"
command = "up"
mode = "nv"
[[keymaps]]
key = "l"
command = "right"
mode = "nv"
[[keymaps]]
key = "a"
command = "append"
mode = "n"
[[keymaps]]
2022-08-02 18:19:36 +00:00
key = "shift+a"
2022-03-21 13:03:37 +00:00
command = "append_end_of_line"
mode = "n"
[[keymaps]]
key = "i"
command = "insert_mode"
mode = "n"
[[keymaps]]
key = "u"
command = "undo"
mode = "n"
[[keymaps]]
key = "ctrl+r"
command = "redo"
mode = "n"
[[keymaps]]
key = "ctrl+i"
2023-03-29 18:56:34 +00:00
command = "jump_location_forward_local"
2022-03-21 13:03:37 +00:00
mode = "n"
[[keymaps]]
key = "ctrl+o"
2023-03-29 18:56:34 +00:00
command = "jump_location_backward_local"
2022-03-21 13:03:37 +00:00
mode = "n"
[[keymaps]]
key = "ctrl+n"
command = "goto_definition"
mode = "n"
[[keymaps]]
key = "g d"
command = "goto_definition"
mode = "n"
[[keymaps]]
key = "g h"
command = "show_hover"
mode = "n"
2022-03-21 13:03:37 +00:00
[[keymaps]]
key = "p"
command = "paste"
mode = "nv"
2022-09-22 20:17:20 +00:00
[[keymaps]]
key = "shift+p"
command = "paste_before"
mode = "nv"
2022-03-21 13:03:37 +00:00
[[keymaps]]
2022-08-02 18:19:36 +00:00
key = "shift+j"
2022-03-21 13:03:37 +00:00
command = "join_lines"
mode = "n"
[[keymaps]]
key = "y"
command = "yank"
mode = "v"
[[keymaps]]
key = "x"
command = "delete_forward"
mode = "nv"
[[keymaps]]
key = "ctrl+p"
command = "get_references"
mode = "n"
[[keymaps]]
key = "s"
command = "delete_forward_and_insert"
mode = "nv"
[[keymaps]]
key = "c"
command = "delete_forward_and_insert"
mode = "v"
[[keymaps]]
key = "shift+s"
command = "delete_line_and_insert"
mode = "n"
[[keymaps]]
key = "c c"
command = "delete_line_and_insert"
mode = "n"
[[keymaps]]
key = "c w"
command = "delete_word_and_insert"
mode = "n"
[[keymaps]]
key = "c e"
command = "delete_word_and_insert"
mode = "n"
2022-03-21 13:03:37 +00:00
[[keymaps]]
2022-08-02 18:19:36 +00:00
key = "shift+i"
2022-03-21 13:03:37 +00:00
command = "insert_first_non_blank"
mode = "nv"
[[keymaps]]
key = "o"
command = "new_line_below"
mode = "nv"
[[keymaps]]
key = "0"
command = "line_start"
mode = "nv"
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "shift+6"
2022-03-21 13:03:37 +00:00
command = "line_start_non_blank"
mode = "nv"
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "shift+4"
2022-03-21 13:03:37 +00:00
command = "line_end"
mode = "nv"
[[keymaps]]
key = "w"
command = "word_forward"
mode = "nv"
[[keymaps]]
key = "e"
command = "word_end_forward"
mode = "nv"
[[keymaps]]
key = "b"
command = "word_backward"
mode = "nv"
[[keymaps]]
2022-08-02 18:19:36 +00:00
key = "shift+o"
2022-03-21 13:03:37 +00:00
command = "new_line_above"
mode = "nv"
[[keymaps]]
key = "ctrl+e"
command = "scroll_down"
mode = "nv"
[[keymaps]]
key = "ctrl+y"
command = "scroll_up"
mode = "nv"
[[keymaps]]
key = "ctrl+u"
command = "page_up"
mode = "nv"
[[keymaps]]
key = "ctrl+d"
command = "page_down"
mode = "nv"
[[keymaps]]
key = "z z"
command = "center_of_window"
mode = "nv"
[[keymaps]]
key = "z t"
command = "top_of_window"
mode = "nv"
[[keymaps]]
key = "z b"
command = "bottom_of_window"
mode = "nv"
2022-03-21 13:03:37 +00:00
[[keymaps]]
key = "d"
2022-03-24 12:42:56 +00:00
command = "delete_forward"
2022-03-21 13:03:37 +00:00
mode = "v"
[[keymaps]]
key = "m"
command = "create_mark"
mode = "nv"
[[keymaps]]
key = "'"
command = "go_to_mark"
mode = "nv"
2022-03-21 13:03:37 +00:00
[[keymaps]]
key = "f"
command = "inline_find_right"
mode = "nv"
[[keymaps]]
2022-08-02 18:19:36 +00:00
key = "shift+f"
2022-03-21 13:03:37 +00:00
command = "inline_find_left"
mode = "nv"
[[keymaps]]
key = ";"
command = "repeat_last_inline_find"
mode = "nv"
[[keymaps]]
2022-03-24 12:42:56 +00:00
key = "d"
command = "motion_mode_delete"
mode = "n"
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "shift+."
2022-03-24 12:42:56 +00:00
command = "motion_mode_indent"
mode = "n"
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "shift+,"
2022-03-24 12:42:56 +00:00
command = "motion_mode_outdent"
mode = "n"
[[keymaps]]
key = "y"
command = "motion_mode_yank"
2022-03-21 13:03:37 +00:00
mode = "n"
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "shift+8"
2022-03-21 13:03:37 +00:00
command = "search_whole_word_forward"
mode = "nv"
[[keymaps]]
key = "n"
command = "search_forward"
mode = "nv"
[[keymaps]]
2022-08-02 18:19:36 +00:00
key = "shift+n"
2022-03-21 13:03:37 +00:00
command = "search_backward"
mode = "nv"
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "shift+5"
2022-03-21 13:03:37 +00:00
command = "match_pairs"
mode = "nv"
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "] shift+0"
2022-03-21 13:03:37 +00:00
command = "next_unmatched_right_bracket"
mode = "nv"
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "[ shift+9"
2022-03-21 13:03:37 +00:00
command = "previous_unmatched_left_bracket"
mode = "nv"
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "] shift+]"
2022-03-21 13:03:37 +00:00
command = "next_unmatched_right_curly_bracket"
mode = "nv"
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "[ shift+["
2022-03-21 13:03:37 +00:00
command = "previous_unmatched_left_curly_bracket"
mode = "nv"
[[keymaps]]
key = "v"
command = "toggle_visual_mode"
mode = "nv"
[[keymaps]]
2022-08-02 18:19:36 +00:00
key = "shift+v"
2022-03-21 13:03:37 +00:00
command = "toggle_linewise_visual_mode"
mode = "nv"
[[keymaps]]
key = "ctrl+v"
command = "toggle_blockwise_visual_mode"
mode = "nv"
[[keymaps]]
key = "ctrl+w l"
command = "split_right"
mode = "n"
[[keymaps]]
key = "ctrl+w h"
command = "split_left"
mode = "n"
[[keymaps]]
key = "ctrl+w j"
command = "split_down"
mode = "n"
[[keymaps]]
key = "ctrl+w k"
command = "split_up"
mode = "n"
[[keymaps]]
key = "ctrl+w s"
command = "split_horizontal"
mode = "n"
[[keymaps]]
key = "ctrl+w v"
command = "split_vertical"
mode = "n"
2022-04-04 08:16:37 +00:00
2022-04-29 20:23:55 +00:00
[[keymaps]]
key = "ctrl+w c"
command = "split_close"
mode = "n"
[[keymaps]]
key = "ctrl+w x"
command = "split_exchange"
mode = "n"
2022-04-04 08:16:37 +00:00
[[keymaps]]
key = "space"
command = "toggle_code_lens"
mode = "nv"
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "shift+."
2022-04-04 08:16:37 +00:00
command = "indent_line"
mode = "v"
[[keymaps]]
2023-09-27 19:37:21 +00:00
key = "shift+,"
2022-04-04 08:16:37 +00:00
command = "outdent_line"
mode = "v"
[[keymaps]]
key = "shift+c"
command = "delete_to_end_and_insert"
mode = "n"