0

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.

Fabrizio
  • 7,603
  • 6
  • 44
  • 104
Mehrdad201
  • 121
  • 9

1 Answers1

4

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"
            }
        ]
    }
]
Fabrizio
  • 7,603
  • 6
  • 44
  • 104
skuroda
  • 19,514
  • 4
  • 50
  • 34
  • Log command works but I didn't find if want to change the ctrl+e to another command such as ctrl+enter or anything else, what file should I edit it. I found that F12 key is used for "go to definition" command. so I decided to use ctrl+enter instead of F12 for "ctrl+e" action command. Now can you guide me more. – Mehrdad201 Nov 30 '13 at 08:49
  • Go to `Preferences -> Key Bindings - User` and enter the content of my edit. If you already have key binding entries, remove the square brackets. These files are JSON, so just add a comma where necessary. – skuroda Nov 30 '13 at 09:38