LoginSignup
8
8

More than 5 years have passed since last update.

SublimeTextで一つのキーバインドで複数のコマンドを実行させてSidebarの操作をdirex+popwin的にする

Posted at

SublimeTextで一つのキーバインドで複数のコマンドを実行

SublimeTextで一つのキーバインドで複数のコマンドを実行するプラグインを見つけました。

sublime-text-multiple-commands

色々応用できて便利そうですね。

Sidebarの操作をdirex+popwin的にする

emacsではディレクトリをSublimeTextのsidebar的にツリー構造で表示してファイルを選択できるdirexというパッケージがあります。
これとpopwinと組み合わせる事で選択し終えたらそのウィンドウを閉じるという事が出来、非常に便利です。

それっぽい動作をSublimeTextでも出来ないかとmultiple-commandsを使ってやってみました。

単純にキーバインドを追加するだけです。

    {
        "keys": ["ctrl+x", "ctrl+j"],
        "command": "run_multiple_commands",
        "args": {
            "commands": [
                {"command": "toggle_side_bar", "context": "window"},
                {"command": "focus_side_bar", "context": "window"}
            ]
        },
        "context": "window"
    },
    {
        "keys": ["enter"],
        "command": "toggle_side_bar",
        "context": [{"key": "control", "operand": "sidebar_tree"} ]
    },

C-x C-jでsidebarが開き、enterで選択し終えたらSidebarが閉じてくれます。便利ですね。

8
8
2

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
8
8