How can I change Ctrl+E key binding to F12

1.4k views Asked by At

I have installed Sublime text3 today. also I installed emmet plugin.

Now plugin abbreviation command works by pressing Ctrl+E button.

I want to change it to F12, I mean I want whenever I press F12 it works same as pressing Ctrl+E buttons

I have searched a lot and tried a lot of ways, but I could not do that.

Please guide me.

Thanks a lot.

1

There are 1 answers

2
skuroda On

Open the sublime text console and enter sublime.log_commands(True). Press Ctrl+E as if you were expanding an abbreviation. The ST console, will display the command and arguments to use in your key binding. The key binding will have the form

{"keys": ["f12"], "command": <command listed in the console>, "args": <object containing args listed if applicable.>}

Edit

[
    {
        "keys": [
            "f12"
        ], 
        "args": {
            "action": "expand_abbreviation"
        }, 
        "command": "run_emmet_action", 
        "context": [
            {
                "key": "emmet_action_enabled.expand_abbreviation"
            }
        ]
    }
]