macro_rules! commands {
($(
$(#[$attr:meta])*
$variant:ident {
id: $id:literal,
title: $title:literal,
hint: $hint:expr,
$(group: $group:ident,)?
}
)*) => {
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Command {
$($(#[$attr])* $variant,)*
}
pub const ALL_COMMANDS: &[Command] = &[$(Command::$variant,)*];
impl Command {
pub fn title(self) -> &'static str {
match self {
$(Command::$variant => $title,)*
}
}
pub fn keybinding_hint(self) -> &'static str {
match self {
$(Command::$variant => $hint,)*
}
}
pub fn id(self) -> &'static str {
match self {
$(Command::$variant => $id,)*
}
}
pub fn from_id(id: &str) -> Option<Command> {
match id {
$($id => Some(Command::$variant),)*
_ => None,
}
}
pub fn group(self) -> Option<Group> {
match self {
$(Command::$variant => group_of!($($group)?),)*
}
}
}
};
}
macro_rules! group_of {
() => {
None
};
($group:ident) => {
Some(Group::$group)
};
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Group {
Terminal,
CodeQl,
}
commands! {
MoveLineUp {
id: "move_line_up",
title: "Move Line Up",
hint: "Alt+↑",
}
MoveLineDown {
id: "move_line_down",
title: "Move Line Down",
hint: "Alt+↓",
}
CopyLineUp {
id: "copy_line_up",
title: "Copy Line Up",
hint: "Shift+Alt+↑",
}
CopyLineDown {
id: "copy_line_down",
title: "Copy Line Down",
hint: "Shift+Alt+↓",
}
ToggleLineComment {
id: "toggle_line_comment",
title: "Toggle Line Comment",
hint: "Cmd+/",
}
ToggleBlockComment {
id: "toggle_block_comment",
title: "Toggle Block Comment",
hint: "Shift+Alt+A",
}
JoinLines {
id: "join_lines",
title: "Join Lines",
hint: "Cmd+Opt+Shift+J",
}
InsertLineBelow {
id: "insert_line_below",
title: "Insert Line Below",
hint: "Cmd+Enter",
}
InsertLineAbove {
id: "insert_line_above",
title: "Insert Line Above",
hint: "Cmd+Shift+Enter",
}
DeleteLine {
id: "delete_line",
title: "Delete Line",
hint: "Cmd+Shift+K",
}
KillToEndOfLine {
id: "kill_to_end_of_line",
title: "Kill to End of Line",
hint: if cfg!(target_os = "macos") {
"Ctrl+K"
} else {
""
},
}
TransformUpper {
id: "transform_upper",
title: "Transform to Uppercase",
hint: "Cmd+Opt+Shift+U",
}
TransformLower {
id: "transform_lower",
title: "Transform to Lowercase",
hint: "Cmd+Opt+Shift+L",
}
TransformTitle {
id: "transform_title",
title: "Transform to Title Case",
hint: "",
}
TransformSnake {
id: "transform_snake",
title: "Transform to Snake Case",
hint: "",
}
TransformCamel {
id: "transform_camel",
title: "Transform to Camel Case",
hint: "",
}
TransformPascal {
id: "transform_pascal",
title: "Transform to Pascal Case",
hint: "",
}
TransformKebab {
id: "transform_kebab",
title: "Transform to Kebab Case",
hint: "",
}
SortLinesAscending {
id: "sort_lines_ascending",
title: "Sort Lines Ascending",
hint: "Cmd+Opt+Shift+A",
}
SortLinesDescending {
id: "sort_lines_descending",
title: "Sort Lines Descending",
hint: "Cmd+Opt+Shift+D",
}
IncrementNumber {
id: "increment_number",
title: "Increment Number Under Cursor",
hint: "Cmd+Opt+=",
}
DecrementNumber {
id: "decrement_number",
title: "Decrement Number Under Cursor",
hint: "Cmd+Opt+-",
}
TrimTrailingWhitespace {
id: "trim_trailing_whitespace",
title: "Trim Trailing Whitespace",
hint: "Cmd+Opt+Shift+W",
}
EmmetExpandAbbreviation {
id: "emmet_expand_abbreviation",
title: "Emmet: Expand Abbreviation",
hint: "Cmd+Opt+Shift+E",
}
EmmetWrapWithAbbreviation {
id: "emmet_wrap_with_abbreviation",
title: "Emmet: Wrap with Abbreviation",
hint: "",
}
EmmetRemoveTag {
id: "emmet_remove_tag",
title: "Emmet: Remove Tag",
hint: "",
}
EmmetUpdateTag {
id: "emmet_update_tag",
title: "Emmet: Update Tag",
hint: "",
}
EmmetBalanceOutward {
id: "emmet_balance_outward",
title: "Emmet: Balance (outward)",
hint: "",
}
EmmetBalanceInward {
id: "emmet_balance_inward",
title: "Emmet: Balance (inward)",
hint: "",
}
EmmetMatchTag {
id: "emmet_match_tag",
title: "Emmet: Go to Matching Pair",
hint: "",
}
ToggleWordWrap {
id: "toggle_word_wrap",
title: "View: Toggle Word Wrap",
hint: "Alt+Z",
}
ExpandSelection {
id: "expand_selection",
title: "Expand Selection",
hint: "Shift+Alt+\u{2192}",
}
ShrinkSelection {
id: "shrink_selection",
title: "Shrink Selection",
hint: "Shift+Alt+\u{2190}",
}
ReplaceInFile {
id: "replace_in_file",
title: "Replace in File",
hint: "Cmd+Opt+F",
}
ToggleFindInSelection {
id: "toggle_find_in_selection",
title: "Find: Toggle Find in Selection",
hint: "Alt+L",
}
MergeAcceptCurrent {
id: "merge_accept_current",
title: "Merge Conflict: Accept Current",
hint: "Cmd+.",
}
MergeAcceptIncoming {
id: "merge_accept_incoming",
title: "Merge Conflict: Accept Incoming",
hint: "Cmd+.",
}
MergeAcceptBoth {
id: "merge_accept_both",
title: "Merge Conflict: Accept Both",
hint: "Cmd+.",
}
MergeAcceptAllCurrent {
id: "merge_accept_all_current",
title: "Merge Conflict: Accept All Current",
hint: "",
}
MergeAcceptAllIncoming {
id: "merge_accept_all_incoming",
title: "Merge Conflict: Accept All Incoming",
hint: "",
}
MergeNextConflict {
id: "merge_next_conflict",
title: "Merge Conflict: Next Conflict",
hint: "F7",
}
MergePrevConflict {
id: "merge_prev_conflict",
title: "Merge Conflict: Previous Conflict",
hint: "Shift+F7",
}
GoToNextChange {
id: "next_change",
title: "Go to Next Change",
hint: "F7",
}
GoToPrevChange {
id: "previous_change",
title: "Go to Previous Change",
hint: "Shift+F7",
}
GoToNextProblem {
id: "next_problem",
title: "Go to Next Problem",
hint: "",
}
GoToPrevProblem {
id: "previous_problem",
title: "Go to Previous Problem",
hint: "",
}
MergeComplete {
id: "merge_complete",
title: "Merge: Complete Merge (stage file)",
hint: "",
}
MergeOpenEditor {
id: "merge_open_editor",
title: "Merge: Open Merge Editor",
hint: "",
}
MergeToggleBase {
id: "merge_toggle_base",
title: "Merge: Show Base",
hint: "",
}
MergeAcceptBothReverse {
id: "merge_accept_both_reverse",
title: "Merge: Accept Combination (Incoming First)",
hint: "",
}
MergeIgnore {
id: "merge_ignore",
title: "Merge: Ignore (Keep Base)",
hint: "",
}
DebugAddWatch {
id: "debug_add_watch",
title: "Debug: Add Watch Expression",
hint: "",
}
DebugClearWatch {
id: "debug_clear_watch",
title: "Debug: Remove All Watch Expressions",
hint: "",
}
PeekDefinition {
id: "peek_definition",
title: "Peek Definition",
hint: "Alt+F12",
}
PeekReferences {
id: "peek_references",
title: "Peek References",
hint: "Alt+Shift+F12",
}
GoToDefinition {
id: "go_to_definition",
title: "Go to Definition",
hint: "F12",
}
GoToReferences {
id: "go_to_references",
title: "Go to References",
hint: "Shift+F12",
}
GoToDeclaration {
id: "go_to_declaration",
title: "Go to Declaration",
hint: "Ctrl+Shift+F12",
}
GoToTypeDefinition {
id: "go_to_type_definition",
title: "Go to Type Definition",
hint: "Ctrl+F12",
}
GoToImplementations {
id: "go_to_implementations",
title: "Go to Implementations",
hint: "Cmd+F12",
}
SwitchHeaderSource {
id: "switch_header_source",
title: "C/C++: Switch Header/Source",
hint: "Alt+O",
}
RenameSymbol {
id: "rename_symbol",
title: "Rename Symbol",
hint: "F2",
}
TriggerSuggest {
id: "trigger_suggest",
title: "Trigger Suggest",
hint: "Ctrl+Space",
}
TriggerParameterHints {
id: "trigger_parameter_hints",
title: "Trigger Parameter Hints",
hint: "",
}
ShowHover {
id: "show_hover",
title: "Show or Focus Hover",
hint: "Cmd+K Cmd+I",
}
MouseAddCursorAtClick {
id: "mouse_add_cursor_at_click",
title: "Mouse: Add Cursor at Click",
hint: "",
}
MouseGoToDefinitionAtClick {
id: "mouse_go_to_definition_at_click",
title: "Mouse: Go to Definition at Click",
hint: "",
}
MouseOpenLinkAtClick {
id: "mouse_open_link_at_click",
title: "Mouse: Open Link at Click",
hint: "",
}
ClearBuildDiagnostics {
id: "clear_build_diagnostics",
title: "Problems: Clear Build Diagnostics",
hint: "",
}
StageHunk {
id: "stage_hunk",
title: "Git: Stage Hunk",
hint: "S in diff",
}
UnstageHunk {
id: "unstage_hunk",
title: "Git: Unstage Hunk",
hint: "U in diff",
}
RevertHunk {
id: "revert_hunk",
title: "Git: Revert Hunk",
hint: "R in diff",
}
GitUndoLastCommit {
id: "git_undo_last_commit",
title: "Git: Undo Last Commit",
hint: "",
}
RustExpandMacro {
id: "rust_expand_macro",
title: "Rust: Expand Macro Recursively at Caret",
hint: "",
}
RustParentModule {
id: "rust_parent_module",
title: "Rust: Locate Parent Module",
hint: "",
}
RustOpenCargoToml {
id: "rust_open_cargo_toml",
title: "Rust: Open Cargo.toml",
hint: "",
}
RustRebuildProcMacros {
id: "rust_rebuild_proc_macros",
title: "Rust: Rebuild Proc Macros and Build Scripts",
hint: "",
}
RustReloadWorkspace {
id: "rust_reload_workspace",
title: "Rust: Reload Workspace",
hint: "",
}
GitCopyPermalink {
id: "git_copy_permalink",
title: "Git: Copy Permalink",
hint: "",
}
GitCopyHeadLink {
id: "git_copy_head_link",
title: "Git: Copy Head Link",
hint: "",
}
GitOpenOnRemote {
id: "git_open_on_remote",
title: "Git: Open on Remote",
hint: "",
}
GitViewStash {
id: "git_view_stash",
title: "Git: View Stash\u{2026}",
hint: "",
}
GitOpenLineCommit {
id: "git_open_line_commit",
title: "Git: Open Commit for Line",
hint: "",
}
GitCopyLineCommitHash {
id: "git_copy_line_commit_hash",
title: "Git: Copy Commit Hash for Line",
hint: "",
}
AddCursorAbove {
id: "add_cursor_above",
title: "Add Cursor Above",
hint: "Cmd+Opt+↑",
}
AddCursorBelow {
id: "add_cursor_below",
title: "Add Cursor Below",
hint: "Cmd+Opt+↓",
}
ColumnSelectUp {
id: "column_select_up",
title: "Column Select Up",
hint: "Cmd+Shift+Opt+↑",
}
ColumnSelectDown {
id: "column_select_down",
title: "Column Select Down",
hint: "Cmd+Shift+Opt+↓",
}
ColumnSelectLeft {
id: "column_select_left",
title: "Column Select Left",
hint: "Cmd+Shift+Opt+←",
}
ColumnSelectRight {
id: "column_select_right",
title: "Column Select Right",
hint: "Cmd+Shift+Opt+→",
}
ColumnSelectPageUp {
id: "column_select_page_up",
title: "Column Select Page Up",
hint: "Cmd+Shift+Opt+PageUp",
}
ColumnSelectPageDown {
id: "column_select_page_down",
title: "Column Select Page Down",
hint: "Cmd+Shift+Opt+PageDown",
}
ToggleColumnSelection {
id: "toggle_column_selection",
title: "View: Toggle Column Selection Mode",
hint: "",
}
AddSelectionToNextMatch {
id: "add_selection_to_next_match",
title: "Add Selection to Next Find Match",
hint: "Cmd+D",
}
SelectAllOccurrences {
id: "select_all_occurrences",
title: "Select All Occurrences of Find Match",
hint: "Cmd+Shift+L",
}
AddCursorsToLineEnds {
id: "add_cursors_to_line_ends",
title: "Add Cursors to Line Ends",
hint: "Shift+Alt+I",
}
ExpandLineSelection {
id: "expand_line_selection",
title: "Expand Line Selection",
hint: "Cmd+L",
}
JumpToBracket {
id: "jump_to_bracket",
title: "Go to Bracket",
hint: "Cmd+Shift+\\",
}
SelectToBracket {
id: "select_to_bracket",
title: "Select to Bracket",
hint: "Cmd+Opt+\\",
}
TransposeCharacters {
id: "transpose_characters",
title: "Transpose Characters around the Cursor",
hint: "Ctrl+T",
}
IndentationToSpaces {
id: "indentation_to_spaces",
title: "Convert Indentation to Spaces",
hint: "Cmd+Opt+Shift+S",
}
IndentationToTabs {
id: "indentation_to_tabs",
title: "Convert Indentation to Tabs",
hint: "Cmd+Opt+Shift+T",
}
TrimFinalNewlines {
id: "trim_final_newlines",
title: "Trim Final Newlines",
hint: "Cmd+Opt+Shift+N",
}
ToggleOverviewRuler {
id: "toggle_overview_ruler",
title: "View: Toggle Overview Ruler",
hint: "",
}
ToggleBookmark {
id: "toggle_bookmark",
title: "Bookmarks: Toggle Bookmark",
hint: "Cmd+Opt+Shift+K",
}
NextBookmark {
id: "next_bookmark",
title: "Bookmarks: Next Bookmark",
hint: "Cmd+Opt+.",
}
PreviousBookmark {
id: "previous_bookmark",
title: "Bookmarks: Previous Bookmark",
hint: "Cmd+Opt+,",
}
ClearBookmarks {
id: "clear_bookmarks",
title: "Bookmarks: Clear All in File",
hint: "Cmd+Opt+Shift+B",
}
ViewBookmarks {
id: "view_bookmarks",
title: "Bookmarks: View Bookmarks",
hint: "Cmd+K Cmd+M",
}
FormatDocument {
id: "format_document",
title: "Format Document",
hint: "Cmd+Opt+Shift+F",
}
FormatSelection {
id: "format_selection",
title: "Format Selection",
hint: "Cmd+K Cmd+F",
}
ChangeColorPresentation {
id: "change_color_presentation",
title: "Change Color Presentation",
hint: "",
}
ToggleFormatOnType {
id: "toggle_format_on_type",
title: "Preferences: Toggle Format on Type",
hint: "",
}
ToggleFormatOnSave {
id: "toggle_format_on_save",
title: "Preferences: Toggle Format on Save",
hint: "Cmd+K F",
}
QuickFix {
id: "quick_fix",
title: "Quick Fix",
hint: "Cmd+.",
}
ToggleFold {
id: "toggle_fold",
title: "Toggle Fold",
hint: "Cmd+K Cmd+L",
}
FoldAll {
id: "fold_all",
title: "Fold All",
hint: "Cmd+K Cmd+0",
}
UnfoldAll {
id: "unfold_all",
title: "Unfold All",
hint: "Cmd+K Cmd+J",
}
FoldAllComments {
id: "fold_all_comments",
title: "Fold All Block Comments",
hint: "Cmd+K Cmd+/",
}
FoldAllRegions {
id: "fold_all_regions",
title: "Fold All Regions",
hint: "Cmd+K Cmd+8",
}
UnfoldAllRegions {
id: "unfold_all_regions",
title: "Unfold All Regions",
hint: "Cmd+K Cmd+9",
}
FoldLevel1 {
id: "fold_level_1",
title: "Fold Level 1",
hint: "Cmd+K Cmd+1",
}
FoldLevel2 {
id: "fold_level_2",
title: "Fold Level 2",
hint: "Cmd+K Cmd+2",
}
FoldLevel3 {
id: "fold_level_3",
title: "Fold Level 3",
hint: "Cmd+K Cmd+3",
}
FoldLevel4 {
id: "fold_level_4",
title: "Fold Level 4",
hint: "Cmd+K Cmd+4",
}
FoldLevel5 {
id: "fold_level_5",
title: "Fold Level 5",
hint: "Cmd+K Cmd+5",
}
FoldLevel6 {
id: "fold_level_6",
title: "Fold Level 6",
hint: "Cmd+K Cmd+6",
}
FoldLevel7 {
id: "fold_level_7",
title: "Fold Level 7",
hint: "Cmd+K Cmd+7",
}
FoldRecursively {
id: "fold_recursively",
title: "Fold Recursively",
hint: "",
}
UnfoldRecursively {
id: "unfold_recursively",
title: "Unfold Recursively",
hint: "",
}
SaveFile {
id: "save_file",
title: "File: Save",
hint: "Cmd+S",
}
SaveAs {
id: "save_as",
title: "File: Save As…",
hint: "",
}
SaveWithSudo {
id: "save_with_sudo",
title: "File: Save with Sudo",
hint: "",
}
RevertFile {
id: "revert_file",
title: "File: Revert File",
hint: "",
}
SaveAll {
id: "save_all",
title: "File: Save All",
hint: "Cmd+Opt+S",
}
NewFile {
id: "new_file",
title: "File: New File…",
hint: "",
}
NewUntitledFile {
id: "new_untitled_file",
title: "File: New Untitled Text File",
hint: "Cmd+N",
}
NewFolder {
id: "new_folder",
title: "File: New Folder…",
hint: "",
}
Undo {
id: "undo",
title: "Undo",
hint: "Cmd+Z",
}
Redo {
id: "redo",
title: "Redo",
hint: "Shift+Cmd+Z",
}
SelectAll {
id: "select_all",
title: "Select All",
hint: "Cmd+A",
}
ToggleAutoSave {
id: "toggle_auto_save",
title: "File: Toggle Auto Save",
hint: "",
}
ToggleAutoSaveOnFocusChange {
id: "toggle_auto_save_on_focus_change",
title: "File: Toggle Auto Save on Focus Change",
hint: "",
}
ToggleInlineBlame {
id: "toggle_inline_blame",
title: "Git: Toggle Inline Blame",
hint: "",
}
ToggleLiveRun {
id: "toggle_live_run",
title: "Python: Toggle Live Run",
hint: "Cmd+K V",
}
ToggleProvenance {
id: "toggle_provenance",
title: "Editor: Toggle Provenance",
hint: "",
}
DiffToggleGroupBySeat {
id: "diff_toggle_group_by_seat",
title: "Diff: Toggle Group by Seat",
hint: "",
}
ToggleIndentGuides {
id: "toggle_indent_guides",
title: "View: Toggle Indent Guides",
hint: "",
}
ToggleBracketColors {
id: "toggle_bracket_colors",
title: "Editor: Toggle Bracket Pair Colorization",
hint: "",
}
ToggleRenderWhitespace {
id: "toggle_render_whitespace",
title: "View: Toggle Render Whitespace",
hint: "",
}
CycleLineNumbers {
id: "cycle_line_numbers",
title: "View: Change Line Numbers (On, Relative, Interval, Off)",
hint: "",
}
ToggleInlineValues {
id: "toggle_inline_values",
title: "Debug: Toggle Inline Values",
hint: "",
}
ToggleInlayHints {
id: "toggle_inlay_hints",
title: "Editor: Toggle Inlay Hints",
hint: "",
}
ToggleMarkdownPreview {
id: "toggle_markdown_preview",
title: "Markdown: Toggle Preview",
hint: "Cmd+Shift+V",
}
OpenMarkdownPreviewToSide {
id: "open_markdown_preview_to_side",
title: "Markdown: Open Preview to the Side",
hint: "Cmd+K V",
}
RunCodeBlockAtCursor {
id: "run_code_block_at_cursor",
title: "Markdown: Run Code Block at Cursor",
hint: "Cmd+Enter",
}
RestoreSnapshot {
id: "restore_snapshot",
title: "Local History: Restore Snapshot",
hint: "",
}
CloseEditor {
id: "close_editor",
title: "View: Close Editor",
hint: "Cmd+W",
}
ReopenClosedEditor {
id: "reopen_closed_editor",
title: "View: Reopen Closed Editor",
hint: "Cmd+K Shift+W",
}
ZoxideJump {
id: "zoxide_jump",
title: "Explorer: Jump to Directory (zoxide)",
hint: "Cmd+Z in Explorer",
}
CloseOtherEditors {
id: "close_other_editors",
title: "View: Close Other Editors in Group",
hint: "Cmd+K Shift+X",
}
CloseEditorsToTheRight {
id: "close_editors_to_the_right",
title: "View: Close Editors to the Right in Group",
hint: "Cmd+K →",
}
CloseSavedEditors {
id: "close_saved_editors",
title: "View: Close Saved Editors in Group",
hint: "Cmd+K U",
}
CloseAllEditors {
id: "close_all_editors",
title: "View: Close All Editors",
hint: "Cmd+K W",
}
PinEditor {
id: "pin_editor",
title: "View: Pin Editor",
hint: "Cmd+K P",
}
UnpinEditor {
id: "unpin_editor",
title: "View: Unpin Editor",
hint: "Cmd+K P",
}
KeepEditor {
id: "keep_editor",
title: "View: Keep Editor",
hint: "Cmd+K Shift+P",
}
MoveEditorLeftInGroup {
id: "move_editor_left_in_group",
title: "View: Move Editor Left",
hint: "Ctrl+Shift+PageUp",
}
MoveEditorRightInGroup {
id: "move_editor_right_in_group",
title: "View: Move Editor Right",
hint: "Ctrl+Shift+PageDown",
}
MoveEditorToNextGroup {
id: "move_editor_to_next_group",
title: "View: Move Editor into Next Group",
hint: "",
}
MoveEditorToPreviousGroup {
id: "move_editor_to_previous_group",
title: "View: Move Editor into Previous Group",
hint: "",
}
SplitEditor {
id: "split_editor",
title: "View: Split Editor",
hint: "Cmd+\\",
}
FocusLeftEditorGroup {
id: "focus_left_editor_group",
title: "View: Focus Left Editor Group",
hint: "Cmd+Opt+←",
}
FocusRightEditorGroup {
id: "focus_right_editor_group",
title: "View: Focus Right Editor Group",
hint: "Cmd+Opt+→",
}
QuickOpen {
id: "quick_open",
title: "Go to File",
hint: "Cmd+P",
}
TakeTheTour {
id: "help_take_the_tour",
title: "Help: Take the Tour",
hint: "",
}
SponsorCroft {
id: "help_sponsor_croft",
title: "Help: Sponsor croft",
hint: "",
}
SarifNextResult {
id: "sarif_next_result",
title: "SARIF: Next Result",
hint: "",
}
SarifPreviousResult {
id: "sarif_previous_result",
title: "SARIF: Previous Result",
hint: "",
}
SarifOpenCodeScanning {
id: "sarif_open_code_scanning",
title: "SARIF: Open GitHub Code Scanning Analysis",
hint: "",
}
SarifLoadCodeScanning {
id: "sarif_load_code_scanning",
title: "SARIF: Load Code Scanning Results for This Branch",
hint: "",
}
GoToSymbol {
id: "go_to_symbol",
title: "Go to Symbol in Editor",
hint: "Cmd+Shift+O",
}
GoToWorkspaceSymbol {
id: "go_to_workspace_symbol",
title: "Go to Symbol in Workspace",
hint: "Cmd+P #",
}
NavigateBack {
id: "navigate_back",
title: "Go Back",
hint: "Ctrl+-",
}
NavigateForward {
id: "navigate_forward",
title: "Go Forward",
hint: "Ctrl+Shift+-",
}
GoToLastEditLocation {
id: "go_to_last_edit_location",
title: "Go to Last Edit Location",
hint: "Cmd+K Cmd+Q",
}
ToggleVimMode {
id: "toggle_vim_mode",
title: "Toggle Vim Mode",
hint: "Cmd+E",
}
MacroStartStopRecording {
id: "macro_record",
title: "Macro: Start/Stop Recording",
hint: "",
}
MacroReplayLast {
id: "macro_replay_last",
title: "Macro: Replay Last",
hint: "",
}
MacroReplayTimes {
id: "macro_replay_times",
title: "Macro: Replay N Times…",
hint: "",
}
ShowExplorer {
id: "show_explorer",
title: "View: Show Explorer",
hint: "Cmd+Shift+E",
}
FocusBreadcrumbs {
id: "breadcrumbs_focus_and_select",
title: "View: Focus and Select Breadcrumbs",
hint: "Cmd+Shift+.",
}
ShowSearch {
id: "show_search",
title: "View: Show Search",
hint: "Cmd+Shift+F",
}
ReplaceInFiles {
id: "replace_in_files",
title: "Search: Replace in Files",
hint: "Cmd+Shift+H",
}
SearchToggleMatchCase {
id: "search_toggle_match_case",
title: "Search: Toggle Match Case",
hint: "Alt+C",
}
SearchToggleWholeWord {
id: "search_toggle_whole_word",
title: "Search: Toggle Match Whole Word",
hint: "Alt+W",
}
SearchToggleRegex {
id: "search_toggle_regex",
title: "Search: Toggle Use Regular Expression",
hint: "Alt+R",
}
SearchTogglePreserveCase {
id: "search_toggle_preserve_case",
title: "Search: Toggle Preserve Case",
hint: "Alt+P",
}
SearchToggleDetails {
id: "search_toggle_details",
title: "Search: Toggle Search Details",
hint: "Alt+D",
}
ShowSourceControl {
id: "show_source_control",
title: "View: Show Source Control",
hint: "Cmd+Shift+S",
}
AddWorkspaceFolder {
id: "add_workspace_folder",
title: "Workspaces: Add Folder to Workspace",
hint: "",
}
RemoveWorkspaceFolder {
id: "remove_workspace_folder",
title: "Workspaces: Remove Folder from Workspace",
hint: "",
}
SaveWorkspaceAs {
id: "save_workspace_as",
title: "Workspaces: Save Workspace As",
hint: "",
}
OpenWorkspaceFromFile {
id: "open_workspace_from_file",
title: "Workspaces: Open Workspace from File",
hint: "",
}
ReopenAsHex {
id: "reopen_as_hex",
title: "File: Reopen as Hex",
hint: "",
}
ReopenAsPreview {
id: "reopen_as_preview",
title: "File: Reopen as Preview",
hint: "",
}
ReopenAsText {
id: "reopen_as_text",
title: "File: Reopen as Text",
hint: "",
}
NotebookRunAll {
id: "notebook_run_all",
title: "Notebook: Run All Cells",
hint: "",
}
NotebookInterrupt {
id: "notebook_interrupt",
title: "Notebook: Interrupt Kernel",
hint: "",
}
NotebookRestart {
id: "notebook_restart",
title: "Notebook: Restart Kernel",
hint: "",
}
NotebookSelectKernel {
id: "notebook_select_kernel",
title: "Notebook: Select Kernel",
hint: "",
}
RestartLanguageServers {
id: "restart_language_servers",
title: "Language Servers: Restart All",
hint: "",
}
RestartLanguageServersForFile {
id: "restart_language_servers_for_file",
title: "Language Servers: Restart for This File",
hint: "",
}
TestingRunWithCoverage {
id: "testing_run_with_coverage",
title: "Testing: Run All Tests with Coverage",
hint: "",
}
CoverageClear {
id: "coverage_clear",
title: "Coverage: Clear",
hint: "",
}
TestingInstallCoverageTool {
id: "testing_install_coverage_tool",
title: "Testing: Install Coverage Tool",
hint: "",
}
TestingShowCoverageReport {
id: "testing_show_coverage_report",
title: "Testing: Show Coverage Report",
hint: "",
}
DeveloperShowMemoryUsage {
id: "developer_show_memory_usage",
title: "Developer: Show Memory Usage",
hint: "",
}
ToggleScreencastMode {
id: "toggle_screencast_mode",
title: "Developer: Toggle Screencast Mode",
hint: "Shift+F8",
}
RunTestAtCursorWithCoverage {
id: "run_test_at_cursor_with_coverage",
title: "Testing: Run Test at Cursor with Coverage",
hint: "",
}
TestingToggleWatchAll {
id: "testing_toggle_watch_all",
title: "Testing: Toggle Watch All Tests",
hint: "",
}
TestingGoToFirstFailure {
id: "testing_go_to_first_failure",
title: "Testing: Go to First Failure",
hint: "",
}
TestingCancelRun {
id: "testing_cancel_run",
title: "Testing: Cancel Test Run",
hint: "",
}
HexFindNext {
id: "hex_find_next",
title: "Hex: Find Next",
hint: "F3",
}
SheetInsertRowBelow {
id: "sheet_insert_row_below",
title: "Sheet: Insert Row Below",
hint: "",
}
SheetDeleteRow {
id: "sheet_delete_row",
title: "Sheet: Delete Row",
hint: "",
}
SheetInsertColRight {
id: "sheet_insert_col_right",
title: "Sheet: Insert Column Right",
hint: "",
}
SheetDeleteCol {
id: "sheet_delete_col",
title: "Sheet: Delete Column",
hint: "",
}
MediaOpenExternal {
id: "media_open_external",
title: "Media: Open in System Player",
hint: "",
}
ShowRunDebug {
id: "show_run_debug",
title: "View: Show Run and Debug",
hint: "Cmd+Shift+D",
}
ShowRemote {
id: "show_remote",
title: "View: Show Remote",
hint: "Cmd+Shift+R",
}
ShowExtensions {
id: "show_extensions",
title: "View: Show Extensions",
hint: "Cmd+Shift+X",
}
CompareExtensionsWithVscode {
id: "compare_extensions_with_vscode",
title: "Extensions: Compare with VS Code",
hint: "",
}
ShowTesting {
id: "show_testing",
title: "View: Show Testing",
hint: "Cmd+K B",
}
ShowCodeQL {
id: "show_codeql",
title: "View: Show CodeQL",
hint: "",
group: CodeQl,
}
CodeqlRunQuery {
id: "codeql_run_query",
title: "CodeQL: Run Query on Selected Database",
hint: "",
group: CodeQl,
}
CodeqlRunQuerySuite {
id: "codeql_run_query_suite",
title: "CodeQL: Run Query Suite",
hint: "",
group: CodeQl,
}
CodeqlRemoveDatabase {
id: "codeql_remove_database",
title: "CodeQL: Remove Database",
hint: "",
group: CodeQl,
}
CodeqlRenameDatabase {
id: "codeql_rename_database",
title: "CodeQL: Rename Database",
hint: "",
group: CodeQl,
}
CodeqlSortDatabases {
id: "codeql_sort_databases",
title: "CodeQL: Sort Databases",
hint: "",
group: CodeQl,
}
CodeqlRevealDatabase {
id: "codeql_reveal_database",
title: "CodeQL: Reveal Database in Explorer",
hint: "",
group: CodeQl,
}
CodeqlUpgradeDatabase {
id: "codeql_upgrade_database",
title: "CodeQL: Upgrade Database",
hint: "",
group: CodeQl,
}
CodeqlClearCache {
id: "codeql_clear_cache",
title: "CodeQL: Clear Cache",
hint: "",
group: CodeQl,
}
CodeqlTrimCache {
id: "codeql_trim_cache",
title: "CodeQL: Trim Cache",
hint: "",
group: CodeQl,
}
CodeqlTrimCacheToOverlay {
id: "codeql_trim_cache_to_overlay_base",
title: "CodeQL: Trim Cache to Overlay Base",
hint: "",
group: CodeQl,
}
CodeqlAddDatabaseSource {
id: "codeql_add_database_source",
title: "CodeQL: Add Database Source to Workspace",
hint: "",
group: CodeQl,
}
CodeqlDeleteUnusedDatabases {
id: "codeql_delete_unused_databases",
title: "CodeQL: Delete Unused Databases",
hint: "",
group: CodeQl,
}
CodeqlRemoveHistory {
id: "codeql_remove_history",
title: "CodeQL: Remove Query History Entry",
hint: "",
group: CodeQl,
}
CodeqlRenameHistory {
id: "codeql_rename_history",
title: "CodeQL: Rename Query History Entry",
hint: "",
group: CodeQl,
}
CodeqlSortHistory {
id: "codeql_sort_history",
title: "CodeQL: Sort Query History",
hint: "",
group: CodeQl,
}
CodeqlViewQuery {
id: "codeql_view_query",
title: "CodeQL: View Query",
hint: "",
group: CodeQl,
}
CodeqlCreateQuery {
id: "codeql_create_query",
title: "CodeQL: Create Query",
hint: "",
group: CodeQl,
}
CodeqlRunPack {
id: "codeql_run_pack",
title: "CodeQL: Run Queries in Pack",
hint: "",
group: CodeQl,
}
CodeqlRunQueryOnDatabases {
id: "codeql_run_query_on_databases",
title: "CodeQL: Run Query on Multiple Databases",
hint: "",
group: CodeQl,
}
CodeqlCancelQueue {
id: "codeql_cancel_queue",
title: "CodeQL: Cancel Queued Queries",
hint: "",
group: CodeQl,
}
CodeqlCopyVersion {
id: "codeql_copy_version_information",
title: "CodeQL: Copy Version Information",
hint: "",
group: CodeQl,
}
CodeqlDownloadCli {
id: "codeql_download_cli",
title: "CodeQL: Download CLI",
hint: "",
group: CodeQl,
}
CodeqlCheckCliUpdates {
id: "codeql_check_for_cli_updates",
title: "CodeQL: Check for CLI Updates",
hint: "",
group: CodeQl,
}
CodeqlInstallPackDependencies {
id: "codeql_install_pack_dependencies",
title: "CodeQL: Install Pack Dependencies",
hint: "",
group: CodeQl,
}
CodeqlDownloadPacks {
id: "codeql_download_packs",
title: "CodeQL: Download Packs",
hint: "",
group: CodeQl,
}
CodeqlRunPublishedPack {
id: "codeql_run_published_pack",
title: "CodeQL: Run Queries in Published Pack",
hint: "",
group: CodeQl,
}
CodeqlQuickQuery {
id: "codeql_quick_query",
title: "CodeQL: Quick Query",
hint: "",
group: CodeQl,
}
CodeqlCompareResults {
id: "codeql_compare_query_results",
title: "CodeQL: Compare Query Results",
hint: "",
group: CodeQl,
}
CodeqlShowEvaluatorLog {
id: "codeql_show_evaluator_log",
title: "CodeQL: Show Evaluator Log (Raw JSON)",
hint: "",
group: CodeQl,
}
CodeqlShowEvaluatorLogSummary {
id: "codeql_show_evaluator_log_summary",
title: "CodeQL: Show Evaluator Log (Summary Text)",
hint: "",
group: CodeQl,
}
CodeqlShowEvaluatorLogViewer {
id: "codeql_show_evaluator_log_viewer",
title: "CodeQL: Show Evaluator Log (Viewer)",
hint: "",
group: CodeQl,
}
CodeqlShowQueryLog {
id: "codeql_show_query_log",
title: "CodeQL: Show Query Log",
hint: "",
group: CodeQl,
}
CodeqlComparePerformance {
id: "codeql_compare_performance",
title: "CodeQL: Compare Performance",
hint: "",
group: CodeQl,
}
CodeqlPreviewQueryHelp {
id: "codeql_preview_query_help",
title: "CodeQL: Preview Query Help",
hint: "",
group: CodeQl,
}
CodeqlExportResults {
id: "codeql_export_results",
title: "CodeQL: Export Results",
hint: "",
group: CodeQl,
}
CodeqlSetUpController {
id: "codeql_set_up_controller_repository",
title: "CodeQL: Set Up Controller Repository",
hint: "",
group: CodeQl,
}
CodeqlAddVariantRepo {
id: "codeql_add_variant_analysis_repository",
title: "CodeQL: Add Variant Analysis Repository",
hint: "",
group: CodeQl,
}
CodeqlAddVariantList {
id: "codeql_add_variant_analysis_list",
title: "CodeQL: Add Variant Analysis Repository List",
hint: "",
group: CodeQl,
}
CodeqlAddVariantOwner {
id: "codeql_add_variant_analysis_owner",
title: "CodeQL: Add Variant Analysis Owner",
hint: "",
group: CodeQl,
}
CodeqlVariantCodeSearch {
id: "codeql_add_repositories_with_code_search",
title: "CodeQL: Add Repositories with GitHub Code Search",
hint: "",
group: CodeQl,
}
CodeqlOpenVariantConfig {
id: "codeql_open_variant_analysis_config",
title: "CodeQL: Open Variant Analysis Config File",
hint: "",
group: CodeQl,
}
CodeqlOpenVariantOnGithub {
id: "codeql_open_variant_analysis_on_github",
title: "CodeQL: Open Variant Analysis Repository on GitHub",
hint: "",
group: CodeQl,
}
CodeqlRunVariantAnalysis {
id: "codeql_run_variant_analysis",
title: "CodeQL: Run Variant Analysis",
hint: "",
group: CodeQl,
}
CodeqlOpenVariantResults {
id: "codeql_open_variant_analysis_results",
title: "CodeQL: Open Variant Analysis Results",
hint: "",
group: CodeQl,
}
CodeqlExportVariantResults {
id: "codeql_export_variant_analysis_results",
title: "CodeQL: Export Variant Analysis Results",
hint: "",
group: CodeQl,
}
CodeqlCopyVariantRepoList {
id: "codeql_copy_variant_repo_list",
title: "CodeQL: Copy Variant Analysis Repository List",
hint: "",
group: CodeQl,
}
CodeqlViewVariantLogs {
id: "codeql_view_variant_logs",
title: "CodeQL: View Variant Analysis Logs",
hint: "",
group: CodeQl,
}
CodeqlRunTests {
id: "codeql_run_tests",
title: "CodeQL: Run Tests",
hint: "",
group: CodeQl,
}
CodeqlDebugQuery {
id: "codeql_debug_query",
title: "CodeQL: Debug Query",
hint: "",
group: CodeQl,
}
CodeqlDebugSelection {
id: "codeql_debug_selection",
title: "CodeQL: Debug Selection",
hint: "",
group: CodeQl,
}
CodeqlResultsUp {
id: "codeql_results_up",
title: "CodeQL: Previous Result",
hint: "",
group: CodeQl,
}
CodeqlResultsDown {
id: "codeql_results_down",
title: "CodeQL: Next Result",
hint: "",
group: CodeQl,
}
CodeqlResultsLeft {
id: "codeql_results_left",
title: "CodeQL: Previous Result Column",
hint: "",
group: CodeQl,
}
CodeqlResultsRight {
id: "codeql_results_right",
title: "CodeQL: Next Result Column",
hint: "",
group: CodeQl,
}
SheetSortByColumn {
id: "sheet_sort_by_column",
title: "Sheet: Sort by Column",
hint: "",
}
CodeqlQuickEval {
id: "codeql_quick_eval",
title: "CodeQL: Quick Evaluation",
hint: "",
group: CodeQl,
}
CodeqlQuickEvalCount {
id: "codeql_quick_eval_count",
title: "CodeQL: Quick Evaluation Count",
hint: "",
group: CodeQl,
}
CodeqlViewAst {
id: "codeql_view_ast",
title: "CodeQL: View AST",
hint: "",
group: CodeQl,
}
CodeqlOpenModelEditor {
id: "codeql_open_model_editor",
title: "CodeQL: Open Model Editor",
hint: "",
group: CodeQl,
}
CodeqlModelEndpoint {
id: "codeql_model_endpoint",
title: "CodeQL: Model Endpoint",
hint: "",
group: CodeQl,
}
CodeqlOpenReferencedFile {
id: "codeql_open_referenced_file",
title: "CodeQL: Open Referenced File",
hint: "",
group: CodeQl,
}
CodeqlViewAlertsCsv {
id: "codeql_view_alerts_csv",
title: "CodeQL: View Alerts (CSV)",
hint: "",
group: CodeQl,
}
CodeqlViewAlertsSarif {
id: "codeql_view_alerts_sarif",
title: "CodeQL: View Alerts (SARIF)",
hint: "",
group: CodeQl,
}
CodeqlViewResultsCsv {
id: "codeql_view_results_csv",
title: "CodeQL: View Results (CSV)",
hint: "",
group: CodeQl,
}
CodeqlShowResultSet {
id: "codeql_show_result_set",
title: "CodeQL: Show Result Set",
hint: "",
group: CodeQl,
}
CodeqlViewCfg {
id: "codeql_view_cfg",
title: "CodeQL: View CFG",
hint: "",
group: CodeQl,
}
CodeqlRunAllQueries {
id: "codeql_run_all_queries",
title: "CodeQL: Run All Queries in Workspace",
hint: "",
group: CodeQl,
}
CodeqlRunSelectedQueries {
id: "codeql_run_selected_queries",
title: "CodeQL: Run Queries in Selected Files",
hint: "",
group: CodeQl,
}
CodeqlCancelRunningQuery {
id: "codeql_cancel_running_query",
title: "CodeQL: Cancel Running Query",
hint: "",
group: CodeQl,
}
CodeqlAcceptTestOutput {
id: "codeql_accept_test_output",
title: "CodeQL: Accept Test Output",
hint: "",
group: CodeQl,
}
CodeqlFocusSideBar {
id: "codeql_focus_side_bar",
title: "CodeQL: Focus Side Bar",
hint: "",
group: CodeQl,
}
CodeqlOpenResultsDirectory {
id: "codeql_open_results_directory",
title: "CodeQL: Open Query Results Directory",
hint: "",
group: CodeQl,
}
RunTestAtCursor {
id: "run_test_at_cursor",
title: "Testing: Run Test at Cursor",
hint: "Cmd+K Enter",
}
TestingRunAll {
id: "testing_run_all",
title: "Testing: Run All Tests",
hint: "",
}
TestingRunFile {
id: "testing_run_file",
title: "Testing: Run Tests in Current File",
hint: "",
}
TestingRerunFailed {
id: "testing_rerun_failed",
title: "Testing: Rerun Failed Tests",
hint: "",
}
TestingRerunLast {
id: "testing_rerun_last",
title: "Testing: Rerun Last Run",
hint: "",
}
DebugTestAtCursor {
id: "debug_test_at_cursor",
title: "Testing: Debug Test at Cursor",
hint: "Cmd+K Shift+Enter",
}
ToggleSideBar {
id: "toggle_side_bar",
title: "View: Toggle Primary Side Bar",
hint: "Cmd+B",
}
ToggleAutoHideSideBar {
id: "toggle_auto_hide_side_bar",
title: "View: Toggle Auto-Hide Side Bar",
hint: "",
}
ToggleSecondarySideBar {
id: "toggle_secondary_side_bar",
title: "View: Toggle Secondary Side Bar",
hint: "Cmd+Opt+B",
}
ToggleZenMode {
id: "toggle_zen_mode",
title: "View: Toggle Zen Mode",
hint: "Cmd+K Z",
}
ToggleCenteredLayout {
id: "toggle_centered_layout",
title: "View: Toggle Centered Layout",
hint: "",
}
ToggleTerminal {
id: "toggle_terminal",
title: "View: Toggle Terminal",
hint: "Ctrl+J",
}
ToggleActivityBar {
id: "toggle_activity_bar",
title: "View: Toggle Activity Bar Visibility",
hint: "",
}
ToggleStatusBar {
id: "toggle_status_bar",
title: "View: Toggle Status Bar Visibility",
hint: "",
}
ToggleSideBarPosition {
id: "toggle_side_bar_position",
title: "View: Toggle Primary Side Bar Position",
hint: "",
}
SetPanelAlignment {
id: "set_panel_alignment",
title: "View: Set Panel Alignment…",
hint: "",
}
SetQuickInputPosition {
id: "set_quick_input_position",
title: "View: Set Quick Input Position…",
hint: "",
}
CustomizeLayout {
id: "customize_layout",
title: "View: Customize Layout…",
hint: "",
}
FocusTerminal {
id: "focus_terminal",
title: "Terminal: Focus Terminal",
hint: "Cmd+Shift+T",
group: Terminal,
}
ShowProblems {
id: "show_problems",
title: "View: Show Problems",
hint: "Cmd+Shift+M",
}
ShowOutput {
id: "show_output",
title: "View: Show Output",
hint: "Cmd+Shift+U",
}
OutputSelectChannel {
id: "output_select_channel",
title: "Output: Select Channel…",
hint: "",
}
ShowPorts {
id: "show_ports",
title: "View: Show Ports",
hint: "",
}
ShowCaptures {
id: "show_captures",
title: "View: Show Captures",
hint: "",
}
ToggleMinimap {
id: "toggle_minimap",
title: "View: Toggle Minimap",
hint: "Cmd+Opt+M",
}
ProblemsCheckProject {
id: "problems_check_project",
title: "Problems: Check Whole Project",
hint: "",
}
ProblemsToggleProjectAuto {
id: "problems_toggle_project_auto",
title: "Problems: Whole-Project Check Auto-Run (Auto / On / Off)",
hint: "",
}
ProblemsToggleScope {
id: "problems_toggle_scope",
title: "Problems: Toggle Scope (Open Files / Whole Project)",
hint: "",
}
DiffToggleIgnoreWhitespace {
id: "diff_toggle_ignore_whitespace",
title: "Diff: Toggle Ignore Whitespace",
hint: "",
}
NewTerminal {
id: "new_terminal",
title: "Terminal: Create New Terminal",
hint: "Cmd+T",
group: Terminal,
}
RunSelectedText {
id: "run_selected_text",
title: "Terminal: Run Selected Text in Active Terminal",
hint: "",
group: Terminal,
}
FocusNextTerminal {
id: "focus_next_terminal",
title: "Terminal: Focus Next Terminal",
hint: "Cmd+]",
group: Terminal,
}
FocusPreviousTerminal {
id: "focus_previous_terminal",
title: "Terminal: Focus Previous Terminal",
hint: "Cmd+[",
group: Terminal,
}
TerminalClear {
id: "terminal_clear",
title: "Terminal: Clear",
hint: "Cmd+K K",
group: Terminal,
}
TerminalRename {
id: "terminal_rename",
title: "Terminal: Rename",
hint: "Cmd+K R",
group: Terminal,
}
TerminalKill {
id: "terminal_kill",
title: "Terminal: Kill the Active Terminal Instance",
hint: "",
group: Terminal,
}
TerminalSplit {
id: "terminal_split",
title: "Terminal: Split Terminal",
hint: "",
group: Terminal,
}
TerminalNewWithProfile {
id: "terminal_new_with_profile",
title: "Terminal: Create New Terminal (With Profile)",
hint: "",
group: Terminal,
}
TerminalQuickSelect {
id: "terminal_quick_select",
title: "Terminal: Quick Select",
hint: "Ctrl+Shift+Space",
group: Terminal,
}
TerminalCopyMode {
id: "terminal_copy_mode",
title: "Terminal: Enter Copy Mode",
hint: "Ctrl+Shift+Y",
group: Terminal,
}
TerminalCommandHistory {
id: "terminal_command_history",
title: "Terminal: Show Command History",
hint: "Ctrl+Shift+H",
group: Terminal,
}
TerminalOpenScrollback {
id: "terminal_open_scrollback",
title: "Terminal: Open Scrollback in Editor",
hint: "Cmd+K D",
group: Terminal,
}
StartDebugging {
id: "start_debugging",
title: "Debug: Start Debugging",
hint: "F5",
}
SelectDebugConfig {
id: "select_debug_config",
title: "Debug: Select and Start Debugging",
hint: "",
}
AddDebugConfig {
id: "add_debug_config",
title: "Debug: Add Configuration…",
hint: "",
}
StopDebugging {
id: "stop_debugging",
title: "Debug: Stop Debugging",
hint: "Shift+F5",
}
PauseDebugging {
id: "pause_debugging",
title: "Debug: Pause",
hint: "F6",
}
SwitchDebugSession {
id: "switch_debug_session",
title: "Debug: Switch Session",
hint: "Cmd+Opt+Shift+G",
}
RestartDebugging {
id: "restart_debugging",
title: "Debug: Restart",
hint: "Shift+Cmd+F5",
}
ToggleBreakpoint {
id: "toggle_breakpoint",
title: "Debug: Toggle Breakpoint",
hint: "F9",
}
EditBreakpointCondition {
id: "edit_breakpoint_condition",
title: "Debug: Add Conditional Breakpoint",
hint: "Shift+F9",
}
EditLogpoint {
id: "edit_logpoint",
title: "Debug: Add Logpoint",
hint: "Shift+Alt+F9",
}
ShowIncomingCalls {
id: "show_incoming_calls",
title: "Calls: Show Incoming Calls",
hint: "Cmd+K H",
}
ShowOutgoingCalls {
id: "show_outgoing_calls",
title: "Calls: Show Outgoing Calls",
hint: "Cmd+K Shift+H",
}
ShowSupertypes {
id: "show_supertypes",
title: "Types: Show Supertypes",
hint: "Cmd+K Shift+U",
}
ShowSubtypes {
id: "show_subtypes",
title: "Types: Show Subtypes",
hint: "Cmd+K Shift+D",
}
ToggleCodeLens {
id: "toggle_code_lens",
title: "Editor: Toggle CodeLens",
hint: "",
}
RunCodeLens {
id: "run_code_lens",
title: "Editor: Run CodeLens on This Line",
hint: "Cmd+K Shift+E",
}
DebugAddHitCountBreakpoint {
id: "debug_add_hit_count_breakpoint",
title: "Debug: Add Hit Count Breakpoint",
hint: "",
}
DebugAddFunctionBreakpoint {
id: "debug_add_function_breakpoint",
title: "Debug: Add Function Breakpoint",
hint: "",
}
DebugRemoveFunctionBreakpoints {
id: "debug_remove_function_breakpoints",
title: "Debug: Remove All Function Breakpoints",
hint: "",
}
DebugRunToCursor {
id: "debug_run_to_cursor",
title: "Debug: Run to Cursor",
hint: "Ctrl+F10",
}
DebugBreakOnValueChange {
id: "debug_break_on_value_change",
title: "Debug: Break When Value Changes",
hint: "",
}
DebugRemoveDataBreakpoints {
id: "debug_remove_data_breakpoints",
title: "Debug: Remove All Data Breakpoints",
hint: "",
}
OpenSearchEditor {
id: "open_search_editor",
title: "Search: Open Results in Editor",
hint: "Cmd+K Shift+F",
}
RerunSearchEditor {
id: "rerun_search_editor",
title: "Search Editor: Rerun",
hint: "Cmd+K Shift+R",
}
RebaseAbort {
id: "rebase_abort",
title: "Rebase: Abort",
hint: "",
}
GitContinueOperation {
id: "git_continue_operation",
title: "Git: Continue Rebase, Cherry-Pick or Revert",
hint: "",
}
GitSkipOperation {
id: "git_skip_operation",
title: "Git: Skip Commit (Rebase, Cherry-Pick or Revert)",
hint: "",
}
GitAbortOperation {
id: "git_abort_operation",
title: "Git: Abort Merge, Rebase, Cherry-Pick, Revert or Bisect",
hint: "",
}
GitCreateTag {
id: "git_create_tag",
title: "Git: Create Tag",
hint: "",
}
GitPushTags {
id: "git_push_tags",
title: "Git: Push Tags",
hint: "",
}
GitDeleteRemoteTag {
id: "git_delete_remote_tag",
title: "Git: Delete Remote Tag",
hint: "",
}
GitCommit {
id: "git_commit",
title: "Git: Commit",
hint: "",
}
GitPush {
id: "git_push",
title: "Git: Push",
hint: "",
}
GitPull {
id: "git_pull",
title: "Git: Pull",
hint: "",
}
GitSync {
id: "git_sync",
title: "Git: Sync",
hint: "",
}
GitCheckoutTo {
id: "git_checkout_to",
title: "Git: Checkout to\u{2026}",
hint: "",
}
GitStash {
id: "git_stash",
title: "Git: Stash",
hint: "",
}
ToggleTerminalSuggestions {
id: "toggle_terminal_suggestions",
title: "Terminal: Toggle Command Suggestions",
hint: "",
group: Terminal,
}
ToggleScreenReader {
id: "toggle_screen_reader",
title: "Accessibility: Toggle Screen Reader Mode",
hint: "",
}
OpenKeyboardShortcuts {
id: "open_keyboard_shortcuts",
title: "Preferences: Open Keyboard Shortcuts",
hint: "Cmd+K Cmd+S",
}
SwitchProfile {
id: "switch_profile",
title: "Profiles: Switch Profile",
hint: "",
}
ToggleInlineSuggestions {
id: "toggle_inline_suggestions",
title: "Editor: Toggle Inline Suggestions",
hint: "Cmd+K Shift+G",
}
StepOver {
id: "step_over",
title: "Debug: Step Over",
hint: "F10",
}
ContinueDebugging {
id: "continue",
title: "Debug: Continue",
hint: "F5",
}
StepInto {
id: "step_into",
title: "Debug: Step Into",
hint: "F11",
}
StepOut {
id: "step_out",
title: "Debug: Step Out",
hint: "Shift+F11",
}
StepIntoTarget {
id: "step_into_target",
title: "Debug: Step Into Target",
hint: "",
}
ToggleRaisedExceptions {
id: "toggle_raised_exceptions",
title: "Debug: Toggle Break on Raised Exceptions",
hint: "Alt+F9",
}
AttachPythonProcess {
id: "attach_python_process",
title: "Debug: Attach to Python Process",
hint: "Ctrl+F5",
}
RunTask {
id: "run_task",
title: "Tasks: Run Task",
hint: "",
}
RunBuildTask {
id: "run_build_task",
title: "Tasks: Run Build Task",
hint: "Cmd+Shift+B",
}
RerunLastTask {
id: "rerun_last_task",
title: "Tasks: Rerun Last Task",
hint: "",
}
ColorTheme {
id: "color_theme",
title: "Preferences: Color Theme",
hint: "Cmd+K Cmd+T",
}
KeyboardShortcuts {
id: "keyboard_shortcuts",
title: "Help: Keyboard Shortcuts Reference",
hint: "F1",
}
UpdateCroft {
id: "update_croft",
title: "Help: Update croft (Relaunch or Rebuild)",
hint: "Cmd+Shift+F9",
}
OpenSettings {
id: "open_settings",
title: "Preferences: Open Settings",
hint: "",
}
OpenSettingsEditor {
id: "open_settings_editor",
title: "Preferences: Open Settings (UI)",
hint: "",
}
OpenSettingsJson {
id: "open_settings_json",
title: "Preferences: Open Settings (JSON)",
hint: "",
}
OpenWorkspaceSettingsJson {
id: "open_workspace_settings_json",
title: "Preferences: Open Workspace Settings (JSON)",
hint: "",
}
OpenWorkspaceSettingsLocalJson {
id: "open_workspace_settings_local_json",
title: "Preferences: Open Workspace Settings — Local (JSON)",
hint: "",
}
OpenKeybindingsJson {
id: "open_keybindings_json",
title: "Preferences: Open Keyboard Shortcuts (JSON)",
hint: "",
}
ConfigureSnippets {
id: "configure_snippets",
title: "Preferences: Configure User Snippets",
hint: "",
}
OpenTriggersJson {
id: "open_triggers_json",
title: "Preferences: Open Terminal Triggers (JSON)",
hint: "",
}
OpenAgentsJson {
id: "open_agents_json",
title: "Preferences: Open Agent Lanes (JSON)",
hint: "",
}
OpenMatchersJson {
id: "open_matchers_json",
title: "Preferences: Open Problem Matchers (JSON)",
hint: "",
}
ToggleTerminalTimestamps {
id: "toggle_terminal_timestamps",
title: "Terminal: Toggle Timestamps",
hint: "",
group: Terminal,
}
ToggleLogHighlight {
id: "toggle_log_highlight",
title: "Log: Toggle Highlighting (tailspin)",
hint: "",
}
CollapseTerminalPane {
id: "collapse_terminal_pane",
title: "Terminal: Collapse Pane",
hint: "Cmd+K [",
group: Terminal,
}
RestoreTerminalPanes {
id: "restore_terminal_panes",
title: "Terminal: Restore All Collapsed Panes",
hint: "Cmd+K ]",
group: Terminal,
}
ToggleSecretRedaction {
id: "toggle_secret_redaction",
title: "Terminal: Toggle Secret Redaction",
hint: "",
group: Terminal,
}
RevealRedactedSecrets {
id: "reveal_redacted_secrets",
title: "Terminal: Reveal Redacted Secrets for 10s",
hint: "",
group: Terminal,
}
SearchFromTerminal {
id: "search_from_terminal",
title: "Terminal: Search & Replace from Last grep/rg",
hint: "",
group: Terminal,
}
SessionParticipants {
id: "session_participants",
title: "Session: Participants",
hint: "Cmd+K A",
}
SessionDetach {
id: "session_detach",
title: "Session: Detach",
hint: "Cmd+K Shift+Q",
}
CollabCancelStream {
id: "collab_cancel_stream",
title: "Collab: Cancel AI Stream",
hint: "Cmd+K X",
}
AskNavigator {
id: "navigator_ask",
title: "Navigator: Ask About Line or Selection",
hint: "Cmd+K Q",
}
AskNavigatorAboutCapture {
id: "captures_ask_navigator",
title: "Captures: Ask Navigator About This Line",
hint: "",
}
OpenWorkspaceOnSshHost {
id: "remote_open_workspace_on_ssh_host",
title: "Remote: Open Workspace on This Pane's Host",
hint: "",
}
ScrubHistory {
id: "scm_scrub_history",
title: "Source Control: Scrub History",
hint: "",
}
DebugInstallDelve {
id: "debug_install_delve",
title: "Debug: Install Go Debugger (delve)",
hint: "",
}
RemoteSyncConfigNow {
id: "remote_sync_config_now",
title: "Remote: Sync Config Now",
hint: "",
}
DropToLocal {
id: "drop_to_local",
title: "Remote: Drop to Local",
hint: "Cmd+K L",
}
StopAutoApprove {
id: "agents_stop_auto_approve",
title: "Agents: Stop Auto-Approving",
hint: "",
}
ScrubOpenHere {
id: "scm_scrub_open_here",
title: "Source Control: Open Scrubbed File Here",
hint: "",
}
ScrubDiffToWorkingTree {
id: "scm_scrub_diff_working_tree",
title: "Source Control: Diff Scrubbed File to Working Tree",
hint: "",
}
FleetRun {
id: "terminal_fleet_run",
title: "Terminal: Fleet Run",
hint: "",
group: Terminal,
}
OpenAsSymbolTab {
id: "editor_open_symbol_tab",
title: "Editor: Open Symbol as Its Own Tab",
hint: "Cmd+K Shift+V",
}
LoadReviewThreads {
id: "review_load_threads",
title: "Review: Load PR Comments for This File",
hint: "",
}
ReviewAddComment {
id: "review_add_comment",
title: "Review: Add Comment on This Line",
hint: "",
}
ReviewSubmit {
id: "review_submit",
title: "Review: Submit Review",
hint: "",
}
ReviewToggleResolved {
id: "review_toggle_resolved",
title: "Review: Resolve or Unresolve Thread",
hint: "",
}
ReviewDiscardPending {
id: "review_discard_pending",
title: "Review: Discard Pending Comments",
hint: "",
}
ExportCommentsToPr {
id: "scm_export_comments_to_pr",
title: "Source Control: Export Comments to Pull Request",
hint: "",
}
NoteAdd {
id: "note_add",
title: "Notes: Add Note on This Line",
hint: "Cmd+K N",
}
NoteDelete {
id: "note_delete",
title: "Notes: Delete Note",
hint: "",
}
ToggleSessionRecording {
id: "session_toggle_recording",
title: "Session: Record Terminal as Asciicast",
hint: "",
}
NewWorktreeLane {
id: "agent_new_worktree_lane",
title: "Agent: New Worktree Lane",
hint: "Cmd+K Shift+L",
}
ReviewPullRequest {
id: "review_pull_request",
title: "Source Control: Review Pull Request",
hint: "",
}
CloseWorktreeLane {
id: "agent_close_worktree_lane",
title: "Agent: Close Worktree Lane",
hint: "",
}
DiffWorktreeLane {
id: "agent_diff_worktree_lane",
title: "Agent: Diff Lane Against Its Base",
hint: "",
}
MarkAgentLaneReviewed {
id: "agents_mark_reviewed",
title: "Agents: Mark Changed Files Reviewed",
hint: "",
}
ShowAgentLane {
id: "agents_show_lane",
title: "Agents: Show Changed Files",
hint: "",
}
OpenAgentLaneSection {
id: "agents_open_lane",
title: "Agents: Open Agent Lane",
hint: "",
}
MarkAgentFileReviewed {
id: "agents_mark_file_reviewed",
title: "Agents: Mark This File Reviewed",
hint: "",
}
DiffAgentFileSinceReview {
id: "agents_diff_since_review",
title: "Agents: Diff This File Since Review",
hint: "",
}
PickAgentLaneFile {
id: "agents_pick_changed_file",
title: "Agents: Review a Changed File…",
hint: "",
}
FixProblemWithNavigator {
id: "problems_fix_navigator",
title: "Problems: Fix With Navigator",
hint: "",
}
SendHttpRequest {
id: "http_send_request",
title: "HTTP: Send Request Under Caret",
hint: "Cmd+Enter",
}
CopyHttpRequestAsCurl {
id: "http_copy_curl",
title: "HTTP: Copy Request as curl",
hint: "",
}
SwitchHttpEnvironment {
id: "http_switch_environment",
title: "HTTP: Switch Environment",
hint: "",
}
YieldToNavigator {
id: "navigator_yield",
title: "Navigator: Yield the Turn",
hint: "Cmd+K Y",
}
ToggleNavigator {
id: "navigator_toggle",
title: "Navigator: Activate or Deactivate",
hint: "",
}
ClearNavigatorNotes {
id: "navigator_clear_notes",
title: "Navigator: Clear Comments",
hint: "",
}
ToggleProactiveNavigator {
id: "navigator_toggle_proactive",
title: "Navigator: Toggle Proactive Comments",
hint: "",
}
NextComment {
id: "navigator_next_comment",
title: "Navigator: Next Comment",
hint: "F4",
}
IgnoreComment {
id: "navigator_ignore_comment",
title: "Navigator: Ignore Comment",
hint: "Shift+F4",
}
}
pub const LAYOUT_COMMANDS: &[Command] = &[
Command::CustomizeLayout,
Command::ToggleActivityBar,
Command::ToggleSideBar,
Command::ToggleSecondarySideBar,
Command::ToggleTerminal,
Command::ToggleStatusBar,
Command::ToggleMinimap,
Command::ToggleAutoHideSideBar,
Command::ToggleSideBarPosition,
Command::SetPanelAlignment,
Command::SetQuickInputPosition,
Command::ToggleZenMode,
Command::ToggleCenteredLayout,
];
impl Command {
pub fn keyword(self) -> &'static str {
if LAYOUT_COMMANDS.contains(&self) {
"layout"
} else if self == Command::KeepEditor {
"keep open"
} else if matches!(
self,
Command::RestartLanguageServers | Command::RestartLanguageServersForFile
) {
"restart language server, restart ts server, restart lsp"
} else if matches!(
self,
Command::GitCopyPermalink | Command::GitCopyHeadLink | Command::GitOpenOnRemote
) {
"github gitlab bitbucket share link url"
} else if matches!(
self,
Command::GitOpenLineCommit | Command::GitCopyLineCommitHash
) {
"blame"
} else {
""
}
}
pub fn skips_the_shell(self) -> bool {
self.group() == Some(Group::Terminal)
}
pub fn is_codeql(self) -> bool {
self.group() == Some(Group::CodeQl)
}
}
const HINTS_WITHOUT_A_CTRL_FORM: &[(&str, &str)] = &[
("Cmd+\\", "Super+\\"),
("Cmd+Shift+\\", "Super+Shift+\\"),
("Cmd+Opt+\\", "Super+Alt+\\"),
("Cmd+Opt+←", "Super+Alt+←"),
("Cmd+Opt+→", "Super+Alt+→"),
("Cmd+]", "Super+]"),
("Cmd+[", "Super+["),
("Cmd+T", "Ctrl+Shift+T"),
("Cmd+Shift+T", "Super+Shift+T"),
("Cmd+A", "Super+A"),
("Cmd+E", "Super+E"),
("Cmd+F12", "Super+F12"),
("Cmd+K Cmd+\\", "Ctrl+K \\"),
("Cmd+K Cmd+Shift+\\", "Ctrl+K Shift+\\"),
];
pub fn platform_hint(hint: &str) -> std::borrow::Cow<'_, str> {
hint_for_platform(hint, cfg!(target_os = "macos"))
}
pub fn hint_for_platform(hint: &str, macos: bool) -> std::borrow::Cow<'_, str> {
use std::borrow::Cow;
if macos || !(hint.contains("Cmd") || hint.contains("Opt")) {
return Cow::Borrowed(hint);
}
if let Some((_, there)) = HINTS_WITHOUT_A_CTRL_FORM
.iter()
.find(|(mac, _)| *mac == hint)
{
return Cow::Borrowed(there);
}
Cow::Owned(hint.replace("Cmd", "Ctrl").replace("Opt", "Alt"))
}
pub fn glyph_hint_for_platform(glyphs: &str, macos: bool) -> std::borrow::Cow<'_, str> {
if macos {
return std::borrow::Cow::Borrowed(glyphs);
}
let names = glyphs
.split(' ')
.map(|step| {
let key = step.trim_start_matches(['⌃', '⌘', '⌥', '⇧']);
let held = &step[..step.len() - key.len()];
let mut words: Vec<&str> = [('⌃', "Ctrl"), ('⌘', "Cmd"), ('⌥', "Opt"), ('⇧', "Shift")]
.into_iter()
.filter(|(glyph, _)| held.contains(*glyph))
.map(|(_, word)| word)
.collect();
words.push(if key == "⌫" { "Delete" } else { key });
words.join("+")
})
.collect::<Vec<_>>()
.join(" ");
std::borrow::Cow::Owned(hint_for_platform(&names, false).into_owned())
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn every_id_resolves_to_its_command() {
for cmd in ALL_COMMANDS {
assert_eq!(Command::from_id(cmd.id()), Some(*cmd), "{cmd:?}");
}
for unknown in ["", "no_such_command", "Move_Line_Up", "move_line_up "] {
assert_eq!(Command::from_id(unknown), None, "{unknown:?}");
}
}
const WITHOUT_A_CHORD: usize = if cfg!(target_os = "macos") { 271 } else { 272 };
#[test]
fn commands_without_a_chord_never_grow_in_number() {
let without: Vec<&Command> = ALL_COMMANDS
.iter()
.filter(|cmd| cmd.keybinding_hint().is_empty())
.collect();
assert!(
without.len() <= WITHOUT_A_CHORD,
"{} palette commands show no chord, more than the {WITHOUT_A_CHORD} allowed: \
a new command needs a chord in its row of the table",
without.len()
);
assert!(
without.len() >= WITHOUT_A_CHORD,
"{} palette commands show no chord, fewer than {WITHOUT_A_CHORD}: lower \
WITHOUT_A_CHORD to {} here (and the other platform's number with it) so \
the count cannot rise again",
without.len(),
without.len()
);
}
#[test]
fn every_command_has_a_nonempty_title() {
for cmd in ALL_COMMANDS {
assert!(!cmd.title().is_empty(), "{cmd:?} has empty title");
}
}
#[test]
fn off_macos_a_hint_reads_ctrl_for_cmd_and_alt_for_opt() {
for (mac, linux) in [
("Cmd+/", "Ctrl+/"),
("Shift+Cmd+Z", "Shift+Ctrl+Z"),
("Cmd+Opt+Shift+J", "Ctrl+Alt+Shift+J"),
("Cmd+K Cmd+T", "Ctrl+K Ctrl+T"),
("Cmd+K Z", "Ctrl+K Z"),
("Cmd+Enter", "Ctrl+Enter"),
] {
assert_eq!(hint_for_platform(mac, false), linux);
}
}
#[test]
fn a_hint_keeps_its_names_on_macos_and_without_cmd() {
for hint in ["Cmd+/", "Cmd+Opt+Shift+J", "Cmd+E", "Cmd+\\", "Cmd+T"] {
assert_eq!(hint_for_platform(hint, true), hint);
}
for hint in ["Alt+\u{2191}", "F5", "Shift+F9", "Ctrl+J", "Ctrl+-", ""] {
assert_eq!(hint_for_platform(hint, true), hint);
assert_eq!(hint_for_platform(hint, false), hint);
}
}
#[test]
fn a_chord_without_a_ctrl_form_never_reads_as_one() {
for (mac, linux) in [
("Cmd+E", "Super+E"),
("Cmd+A", "Super+A"),
("Cmd+\\", "Super+\\"),
("Cmd+Shift+\\", "Super+Shift+\\"),
("Cmd+Opt+\\", "Super+Alt+\\"),
("Cmd+Opt+\u{2190}", "Super+Alt+\u{2190}"),
("Cmd+Opt+\u{2192}", "Super+Alt+\u{2192}"),
("Cmd+]", "Super+]"),
("Cmd+[", "Super+["),
("Cmd+T", "Ctrl+Shift+T"),
("Cmd+F12", "Super+F12"),
] {
assert_eq!(hint_for_platform(mac, false), linux);
}
}
#[test]
fn a_glyph_chord_reads_as_the_palette_names_it_off_macos() {
for (mac, linux) in [
("⌘B", "Ctrl+B"),
("⌥⌘M", "Ctrl+Alt+M"),
("⌥⇧⌘C", "Ctrl+Alt+Shift+C"),
("⌘⇧N", "Ctrl+Shift+N"),
("⇧⌥F9", "Alt+Shift+F9"),
("⌃⇧Space", "Ctrl+Shift+Space"),
("⌘K Z", "Ctrl+K Z"),
("⌘K ⇧P", "Ctrl+K Shift+P"),
("⌘K ⌘T", "Ctrl+K Ctrl+T"),
("⌘\\", "Super+\\"),
("⌥⌘\u{2190}", "Super+Alt+\u{2190}"),
("⌘T", "Ctrl+Shift+T"),
("⌘F12", "Super+F12"),
("⌘K ⌘\\", "Ctrl+K \\"),
("⌘K ⇧⌘\\", "Ctrl+K Shift+\\"),
("⌫", "Delete"),
("F2", "F2"),
("Enter", "Enter"),
] {
assert_eq!(glyph_hint_for_platform(mac, false), linux);
assert_eq!(glyph_hint_for_platform(mac, true), mac);
}
}
#[test]
fn off_macos_no_palette_hint_names_a_mac_key() {
for cmd in ALL_COMMANDS {
let hint = hint_for_platform(cmd.keybinding_hint(), false);
for mac in ["Cmd", "Opt", "⌘", "⌥"] {
assert!(!hint.contains(mac), "{cmd:?} reads {hint:?}");
}
}
}
}