Sublime Forum

Combine Distraction free and MaxPane into single sortcut

#1

I use the More Layouts package to set a three pane window. I want to use the Distraction Free Mode to make one of these panes full screen but Shift+F11 shows the three panes, not just the active one.

I get around this by first using the MaxPane package to maximize the active pane (via ctrl + k, ctrl + f or ctrl + k, ctrl + m) and then enter zen mode with Shift+F11.

How can I combine these two shortcuts into a single one so that Shift+F11 first activates MaxPane and then it accesses zen mode?

0 Likes

#2

The built in chain command can execute multiple commands one after the other; so, you could create a key binding that executes first the one command and then the other.

An example of such a key binding is:

    { "keys": ["super+s"], "command": "chain",
        "args": {
            "commands": [
                {"command": "echo", "args":{"chain": true} },
                {"command": "echo", "args":{"chain": false} }
            ]
        },
    },

Replace the echo commands with the two commands you’re using, and adjust the arguments to whatever exists in the current key bindings that you’re using and you should be good to go.

0 Likes