Sublime Forum

Keyboard shortcut depending on language/extension?

#1

Is there a way to set two commands for a keyboard shortcut depending on the file extension? For example, when I am writing python code I use a plugin to format the code when I hit alt+x which runs lets say command_1. But when I am writing HTML, I installed another plugin which formats the code when command_2 is executed.

Now I want to set alt+x as keyboard shortcut for running command_1 when I am using python, and command_2 when I am using HTML for code formatting. Is this possible?

0 Likes

#2

Yes.

1 Like

#3

This is what I was looking for. Thanks for the tip.

0 Likes