Execute¶
Run Last Executed File:
Ctrl + R
(MacOS)Select a file to Run:
Ctrl + Alt + R
(MacOS)
Set your Python executable (Even for virtualenv)¶
Preference
-> Project
-> Project Interpreter
, Set Python executable.
Windows:
C:\Python27\python.exe
MacOS:
If your python are installed from HomeBrew, it should be at:
/usr/local/Cellar/python2/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Linux:
<path-to-your-virtualenv-folder>
Set bash executable¶
Neet a BashSupport plugin.
Open File in Sublime Text¶
Set up external tools:
Preference
->Tools
->External Tools
->Add new one
click+
sign.Config executable:
Name
: name for this tool, I useSublime Text
,Description
: any description text,Program
: The executable file (.exe for Windows, Application/Sublime Text.app for MacOS),Parameters
:$FileName$
(you can select from macro),Working Directory
:$FileDir$
, clickOK
.Assign a Keymap:
Preference
->Keymap
-> SearchSublime Text
-> Add a keymap, I useShift + Cmd + S
.Try it out: select a file in project view, press
Shift + Cmd + S
.
PyCharm: Open the current file in Vim, Emacs or Sublime Text: https://andrewbrookins.com/python/open-the-current-file-in-vim-emacs-or-sublime-text-from-pycharm/
Execute in Bash¶
Set up external tools:
Preference
->Tools
->External Tools
->Add new one
click+
sign.Config executable:
Name
: name for this tool, I useRun with Bash
,Description
: any description text,Program
: The executable file (.exe for Windows, usually using git-bash.exe, /bin/bash for MacOS),Parameters
:$FileName$
(you can select from macro),Working Directory
:$FileDir$
, clickOK
.Assign a Keymap:
Preference
->Keymap
-> SearchRun with Bash
-> Add a keymap, I useShift + `
.Try it out: select a file in project view, press Ctrl + Shift +
`
.