SublimeREPL is supposed to have a default binding for “open the current file in a REPL,” I think it’s ctrl+, then f, but if that doesn’t work for some reason, you could try adding this to your regular Sublime Key Configuration file:
SublimeREPL has a fairly complicated command structure; this is taken from the SublimeREPL/config/Python/Default.sublime-commands file, and runs a command defined in Main.sublime-menu in the same directory. There might be a better way to do this, but this worked for me just now.
I don’t use that particular plugin, but if you open the Sublime console with Ctrl+` or View > Show Console, you can enter the command:
sublime.log_commands(True)
That tells Sublime to log all commands as it’s executing them. Running the command via the key binding and via the menu may point out what one of them is doing differently than the other and help you trace why it doesn’t work.
You can run the same command with False instead to turn off command logging when you’re done (or restart Sublime).
Thanks, very useful to know. I get “The handle is invalid” error below. Not sure how to fix it though. I read the docs and run repl from the command console to enable a SublimeREPL:python, but still get the error.
File “C:\Users\bernie\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\repls\subprocess_repl.py”, line 209, in is_alive
return self.popen.poll() is None
File “./python3.3/subprocess.py”, line 930, in poll
File “./python3.3/subprocess.py”, line 1145, in _internal_poll
OSError: [WinError 6] The handle is invalid
command: drag_select {“event”: {“button”: 1, “x”: 30.5, “y”: 792.5}}