Tbpgr Blog

Organization Development Engineer tbpgr(てぃーびー) のブログ

Sublime Text2 | ショートカット一覧

パンくず

Sublime Text2
ショートカット一覧

概要

Sublime Text2のショートカット一覧について

各項目

全般

抜粋。

  # プロンプトでファイルを開く
  { "keys": ["ctrl+o"], "command": "prompt_open_file" },
  # 再実行
  { "keys": ["ctrl+shift+z"], "command": "redo" },
  # 繰り返し
  { "keys": ["ctrl+y"], "command": "redo_or_repeat" },
  # インデント付き貼付
  { "keys": ["ctrl+shift+v"], "command": "paste_and_indent" },
  # インデント
  { "keys": ["ctrl+]"], "command": "indent" },
  # 逆インデント
  { "keys": ["ctrl+["], "command": "unindent" },
  # 行選択
  { "keys": ["ctrl+l"], "command": "expand_selection", "args": {"to": "line"} },
  # マクロの記録開始、終了
  { "keys": ["ctrl+q"], "command": "toggle_record_macro" },
  # マクロの実行
  { "keys": ["ctrl+shift+q"], "command": "run_macro" },
  # ファイル選択プロンプト
  { "keys": ["ctrl+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
  # コマンドパレット
  { "keys": ["ctrl+shift+p"], "command": "show_overlay", "args": {"overlay": "command_palette"} },
  # プロジェクト選択
  { "keys": ["ctrl+alt+p"], "command": "prompt_select_project" },
  # 関数検索
  { "keys": ["ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
  # 行移動
  { "keys": ["ctrl+g"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
  # 拡大
  { "keys": ["ctrl+;"], "command": "show_overlay", "args": {"overlay": "goto", "text": "#"} },
  # インクリメンタル検索
  { "keys": ["ctrl+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse":false} },
  # インクリメンタル検索: 逆方向
  { "keys": ["ctrl+shift+i"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse":true} },
  # テキスト検索
  { "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "find"} },
  # テキスト置換
  { "keys": ["ctrl+h"], "command": "show_panel", "args": {"panel": "replace"} },
  # 次のテキスト置換実行
  { "keys": ["ctrl+shift+h"], "command": "replace_next" },
  # 次のテキスト検索実行
  { "keys": ["f3"], "command": "find_next" },
  # 前のテキスト検索実行
  { "keys": ["shift+f3"], "command": "find_prev" },
  # 下のテキスト検索実行
  { "keys": ["ctrl+f3"], "command": "find_under" },
  # 前のテキスト検索実行
  { "keys": ["ctrl+shift+f3"], "command": "find_under_prev" },
  # 選択中の文字列と同じ箇所を前選択状態にする。そのままテキスト入力すればすべてが置換される
  { "keys": ["alt+f3"], "command": "find_all_under" },
  # ファイル検索(秀丸のgrep相当)
  { "keys": ["ctrl+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },
  # ファイル検索(秀丸のgrep相当)の次結果ファイルの表示
  { "keys": ["f4"], "command": "next_result" },
  # ファイル検索(秀丸のgrep相当)の前結果ファイルの表示
  { "keys": ["shift+f4"], "command": "prev_result" },
  # スペルチェックの設定有無変更
  { "keys": ["f6"], "command": "toggle_setting", "args": {"setting": "spell_check"} },
  # 次のスペルミスへ移動
  { "keys": ["ctrl+f6"], "command": "next_misspelling" },
  # 前のスペルミスへ移動
  { "keys": ["ctrl+shift+f6"], "command": "prev_misspelling" },
  # 行移動: 上
  { "keys": ["ctrl+shift+up"], "command": "swap_line_up" },
  # 行移動: 下
  { "keys": ["ctrl+shift+down"], "command": "swap_line_down" },

  { "keys": ["ctrl+backspace"], "command": "delete_word", "args": { "forward": false } },
  { "keys": ["ctrl+shift+backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete to Hard BOL.sublime-macro"} },

  { "keys": ["ctrl+delete"], "command": "delete_word", "args": { "forward": true } },
  { "keys": ["ctrl+shift+delete"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete to Hard EOL.sublime-macro"} },

  { "keys": ["ctrl+/"], "command": "toggle_comment", "args": { "block": false } },
  { "keys": ["ctrl+shift+/"], "command": "toggle_comment", "args": { "block": true } },

  { "keys": ["ctrl+j"], "command": "join_lines" },
  { "keys": ["ctrl+shift+d"], "command": "duplicate_line" },

  { "keys": ["ctrl+`"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },

  { "keys": ["ctrl+space"], "command": "auto_complete" },
  { "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
    [
      { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
      { "key": "auto_complete_visible", "operator": "equal", "operand": false },
      { "key": "setting.tab_completion", "operator": "equal", "operand": true }
    ]
  },

  { "keys": ["ctrl+alt+shift+p"], "command": "show_scope_name" },

  { "keys": ["f7"], "command": "build" },
  { "keys": ["ctrl+b"], "command": "build" },
  { "keys": ["ctrl+shift+b"], "command": "build", "args": {"variant": "Run"} },
  { "keys": ["ctrl+break"], "command": "exec", "args": {"kill": true} },

  { "keys": ["ctrl+t"], "command": "transpose" },

  { "keys": ["f9"], "command": "sort_lines", "args": {"case_sensitive": false} },
  { "keys": ["ctrl+f9"], "command": "sort_lines", "args": {"case_sensitive": true} },

  // Auto-pair quotes
  { "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"$0\""}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
      { "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true },
      { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.double", "match_all": true }
    ]
  },
  { "keys": ["\""], "command": "insert_snippet", "args": {"contents": "\"${0:$SELECTION}\""}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
    ]
  },
  { "keys": ["\""], "command": "move", "args": {"by": "characters", "forward": true}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true }
    ]
  },
  { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "preceding_text", "operator": "regex_contains", "operand": "\"$", "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^\"", "match_all": true }
    ]
  },

  // Auto-pair single quotes
  { "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'$0'"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true },
      { "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true },
      { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single", "match_all": true }
    ]
  },
  { "keys": ["'"], "command": "insert_snippet", "args": {"contents": "'${0:$SELECTION}'"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
    ]
  },
  { "keys": ["'"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true }
    ]
  },
  { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "preceding_text", "operator": "regex_contains", "operand": "'$", "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^'", "match_all": true }
    ]
  },

  // Auto-pair brackets
  { "keys": ["("], "command": "insert_snippet", "args": {"contents": "($0)"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
    ]
  },
  { "keys": ["("], "command": "insert_snippet", "args": {"contents": "(${0:$SELECTION})"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
    ]
  },
  { "keys": [")"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
    ]
  },
  { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "preceding_text", "operator": "regex_contains", "operand": "\\($", "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^\\)", "match_all": true }
    ]
  },

  // Auto-pair square brackets
  { "keys": ["["], "command": "insert_snippet", "args": {"contents": "[$0]"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true }
    ]
  },
  { "keys": ["["], "command": "insert_snippet", "args": {"contents": "[${0:$SELECTION}]"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
    ]
  },
  { "keys": ["]"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
    ]
  },
  { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "preceding_text", "operator": "regex_contains", "operand": "\\[$", "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^\\]", "match_all": true }
    ]
  },

  // Auto-pair curly brackets
  { "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{$0}"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }
    ]
  },
  { "keys": ["{"], "command": "insert_snippet", "args": {"contents": "{${0:$SELECTION}}"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
    ]
  },
  { "keys": ["}"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
    ]
  },
  { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
    [
      { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
    ]
  },

  { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line in Braces.sublime-macro"}, "context":
    [
      { "key": "setting.auto_indent", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
    ]
  },
  { "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line in Braces.sublime-macro"}, "context":
    [
      { "key": "setting.auto_indent", "operator": "equal", "operand": true },
      { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
      { "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true },
      { "key": "following_text", "operator": "regex_contains", "operand": "^\\}", "match_all": true }
    ]
  },

  {
    "keys": ["alt+shift+1"],
    "command": "set_layout",
    "args":
    {
      "cols": [0.0, 1.0],
      "rows": [0.0, 1.0],
      "cells": [[0, 0, 1, 1]]
    }
  },
  {
    "keys": ["alt+shift+2"],
    "command": "set_layout",
    "args":
    {
      "cols": [0.0, 0.5, 1.0],
      "rows": [0.0, 1.0],
      "cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
    }
  },
  {
    "keys": ["alt+shift+3"],
    "command": "set_layout",
    "args":
    {
      "cols": [0.0, 0.33, 0.66, 1.0],
      "rows": [0.0, 1.0],
      "cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]
    }
  },
  {
    "keys": ["alt+shift+4"],
    "command": "set_layout",
    "args":
    {
      "cols": [0.0, 0.25, 0.5, 0.75, 1.0],
      "rows": [0.0, 1.0],
      "cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1]]
    }
  },
  {
    "keys": ["alt+shift+8"],
    "command": "set_layout",
    "args":
    {
      "cols": [0.0, 1.0],
      "rows": [0.0, 0.5, 1.0],
      "cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
    }
  },
  {
    "keys": ["alt+shift+9"],
    "command": "set_layout",
    "args":
    {
      "cols": [0.0, 1.0],
      "rows": [0.0, 0.33, 0.66, 1.0],
      "cells": [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3]]
    }
  },
  {
    "keys": ["alt+shift+5"],
    "command": "set_layout",
    "args":
    {
      "cols": [0.0, 0.5, 1.0],
      "rows": [0.0, 0.5, 1.0],
      "cells":
      [
        [0, 0, 1, 1], [1, 0, 2, 1],
        [0, 1, 1, 2], [1, 1, 2, 2]
      ]
    }
  },
  { "keys": ["ctrl+1"], "command": "focus_group", "args": { "group": 0 } },
  { "keys": ["ctrl+2"], "command": "focus_group", "args": { "group": 1 } },
  { "keys": ["ctrl+3"], "command": "focus_group", "args": { "group": 2 } },
  { "keys": ["ctrl+4"], "command": "focus_group", "args": { "group": 3 } },
  { "keys": ["ctrl+shift+1"], "command": "move_to_group", "args": { "group": 0 } },
  { "keys": ["ctrl+shift+2"], "command": "move_to_group", "args": { "group": 1 } },
  { "keys": ["ctrl+shift+3"], "command": "move_to_group", "args": { "group": 2 } },
  { "keys": ["ctrl+shift+4"], "command": "move_to_group", "args": { "group": 3 } },
  { "keys": ["ctrl+0"], "command": "focus_side_bar" },

  { "keys": ["alt+1"], "command": "select_by_index", "args": { "index": 0 } },
  { "keys": ["alt+2"], "command": "select_by_index", "args": { "index": 1 } },
  { "keys": ["alt+3"], "command": "select_by_index", "args": { "index": 2 } },
  { "keys": ["alt+4"], "command": "select_by_index", "args": { "index": 3 } },
  { "keys": ["alt+5"], "command": "select_by_index", "args": { "index": 4 } },
  { "keys": ["alt+6"], "command": "select_by_index", "args": { "index": 5 } },
  { "keys": ["alt+7"], "command": "select_by_index", "args": { "index": 6 } },
  { "keys": ["alt+8"], "command": "select_by_index", "args": { "index": 7 } },
  { "keys": ["alt+9"], "command": "select_by_index", "args": { "index": 8 } },
  { "keys": ["alt+0"], "command": "select_by_index", "args": { "index": 9 } },

  { "keys": ["f2"], "command": "next_bookmark" },
  { "keys": ["shift+f2"], "command": "prev_bookmark" },
  { "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
  { "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
  { "keys": ["alt+f2"], "command": "select_all_bookmarks" },

  { "keys": ["ctrl+shift+k"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },

  { "keys": ["alt+q"], "command": "wrap_lines" },

  { "keys": ["ctrl+k", "ctrl+u"], "command": "upper_case" },
  { "keys": ["ctrl+k", "ctrl+l"], "command": "lower_case" },

  { "keys": ["ctrl+k", "ctrl+space"], "command": "set_mark" },
  { "keys": ["ctrl+k", "ctrl+a"], "command": "select_to_mark" },
  { "keys": ["ctrl+k", "ctrl+w"], "command": "delete_to_mark" },
  { "keys": ["ctrl+k", "ctrl+x"], "command": "swap_with_mark" },
  { "keys": ["ctrl+k", "ctrl+y"], "command": "yank" },
  { "keys": ["ctrl+k", "ctrl+k"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete to Hard EOL.sublime-macro"} },
  { "keys": ["ctrl+k", "ctrl+backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete to Hard BOL.sublime-macro"} },
  { "keys": ["ctrl+k", "ctrl+g"], "command": "clear_bookmarks", "args": {"name": "mark"} },
  { "keys": ["ctrl+k", "ctrl+c"], "command": "show_at_center" },

  { "keys": ["ctrl++"], "command": "increase_font_size" },
  { "keys": ["ctrl+="], "command": "increase_font_size" },
  { "keys": ["ctrl+keypad_plus"], "command": "increase_font_size" },
  { "keys": ["ctrl+-"], "command": "decrease_font_size" },
  { "keys": ["ctrl+keypad_minus"], "command": "decrease_font_size" },

  { "keys": ["alt+shift+w"], "command": "insert_snippet", "args": { "name": "Packages/XML/long-tag.sublime-snippet" } },

  { "keys": ["ctrl+shift+["], "command": "fold" },
  { "keys": ["ctrl+shift+]"], "command": "unfold" },
  { "keys": ["ctrl+k", "ctrl+1"], "command": "fold_by_level", "args": {"level": 1} },
  { "keys": ["ctrl+k", "ctrl+2"], "command": "fold_by_level", "args": {"level": 2} },
  { "keys": ["ctrl+k", "ctrl+3"], "command": "fold_by_level", "args": {"level": 3} },
  { "keys": ["ctrl+k", "ctrl+4"], "command": "fold_by_level", "args": {"level": 4} },
  { "keys": ["ctrl+k", "ctrl+5"], "command": "fold_by_level", "args": {"level": 5} },
  { "keys": ["ctrl+k", "ctrl+6"], "command": "fold_by_level", "args": {"level": 6} },
  { "keys": ["ctrl+k", "ctrl+7"], "command": "fold_by_level", "args": {"level": 7} },
  { "keys": ["ctrl+k", "ctrl+8"], "command": "fold_by_level", "args": {"level": 8} },
  { "keys": ["ctrl+k", "ctrl+9"], "command": "fold_by_level", "args": {"level": 9} },
  { "keys": ["ctrl+k", "ctrl+0"], "command": "unfold_all" },
  { "keys": ["ctrl+k", "ctrl+j"], "command": "unfold_all" },
  { "keys": ["ctrl+k", "ctrl+t"], "command": "fold_tag_attributes" },

  { "keys": ["context_menu"], "command": "context_menu" },