I would like to run a external python script (or external command/program) when I press a key on Sublime Text 2.
How can I do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is a solution:
Preferences->Key Bindings – User and put this in the file (overriding the
[,]inside):Where
<your shortcut>as the name says is the shortcut (examples: F1, ctrl+shift+F1, etc.) and<path to your command>is the location of your command (examples:echo,/home/user/scripts/my_script.py,ls, etc.)