I am new to Sublime Text 2 on Mac OS. I installed the package SublimeREPL.
Is it possible to create a keyboard shortcut to run the file with SublimeREPL?
More precisely, here is a screenshot. I want to avoid going through this menu and run quickly with a keyboard shortcut.
You can set a keyboard shortcut for the command in your screenshot using Sublime key-bindings.
Open Sublime.
Go to Preferences > Key Bindings - User
Add these lines to the opened file between brackets:
{ "keys": ["ctrl+alt+b"], "command": "run_existing_window_command", "args":
{
"id": "repl_python_run",
"file": "config/Python/Main.sublime-menu"
}}
Save it.
It's done! You can type any key-combinations instead of "ctrl+alt+b"
, but make sure it's not reserved by Sublime itself (check in Preferences > Key Bindings - Default)
Note: This works for Sublime in Windows. I don't think there would be any difference for Sublime on Mac OS/Linux.