25
27

More than 5 years have passed since last update.

SublimeText の画面分割を快適にする方法

Last updated at Posted at 2013-09-18

SublimeText のデフォルトの画面分割は結構使いにくいので、画面分割を便利にする方法を紹介します。

プラグインの紹介

Origami

まずは Origami
これを使うと super+k → で「右側にウインドウを増やす」といった操作ができるようになるため、画面分割が楽になります。

Resize Group with Keyboard (ST2のみ)

Resize Group with Keyboard は画面分割したときの面積をキーボードで変更することができます。

Resize Active Group

Resize Active Group は画面分割時にフォーカスしているウインドウを常に大きくなるように分割の比率を調節してくれます。

例えば画面を上下に分割して、上側にフォーカスがあって面積の比が「上:下 = 7:3」だとします。このとき、フォーカスを下側に移動すると比が「上:下 = 3:7」になります。

おすすめの設定

僕は Sublime Text の画面分割はすごく冗長だと思ってます。
画面分割するときはほぼ 100% 分割した先のウインドウでなんらかのファイルを開きたいときなので、
「画面分割する」→「フォーカスを移動する」→「super+p でファイルを開く」といった操作を毎回します。
これが面倒なので、 Chain of Command を使って画面分割したら
super+p を押した時に出てくるファイル選択パネルを表示するところまで一気にできるようにします。

Origami と Chain of Command を組み合わせた設定

Sublime Text のキーバインドの設定で次のように設定すると Origami を用いて、「画面分割する」→「フォーカスを移動する」→「super+p でファイルを開く」が一度にできるようになります。

{
  "keys": ["super+k", "super+up"],
  "command": "chain",
  "args": {
    "commands": [
      ["create_pane", {"direction": "up"}],
      ["travel_to_pane", {"direction": "up"}],
      ["show_overlay", {"overlay": "goto", "show_files": true}]
    ]
  }
},
{
  "keys": ["super+k", "super+right"],
  "command": "chain",
  "args": {
    "commands": [
      ["create_pane", {"direction": "right"}],
      ["travel_to_pane", {"direction": "right"}],
      ["show_overlay", {"overlay": "goto", "show_files": true}]
    ]
  }
},
{
  "keys": ["super+k", "super+down"],
  "command": "chain",
  "args": {
    "commands": [
      ["create_pane", {"direction": "down"}],
      ["travel_to_pane", {"direction": "down"}],
      ["show_overlay", {"overlay": "goto", "show_files": true}]
    ]
  }
},
{
  "keys": ["super+k", "super+left"],
  "command": "chain",
  "args": {
    "commands": [
      ["create_pane", {"direction": "left"}],
      ["travel_to_pane", {"direction": "left"}],
      ["show_overlay", {"overlay": "goto", "show_files": true}]
    ]
  }
},
25
27
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
25
27