Sublime Forum

Create own macro for Sublime Repl

#1

I need the following function, keyboard shortcut(cmd+b) : Save file then Sublime Real->Run current file then close all but active tabs(Tab Repl). I tried code it but don’t work

[
{ “keys”: [“command+b”], “command”: “save”,
“command”: “repl_open”,
“caption”: “Python - RUN current file”,
“id”: “repl_python_run”,
“mnemonic”: “d”,
“args”: {
“type”: “subprocess”,
“encoding”: “utf8”,
“cmd”: [“python3”, “-u”, “$file_basename”],
“cwd”: “$file_path”,
“syntax”: “Packages/Python/Python.tmLanguage”,
“external_id”: “python”,
“extend_env”: {“PYTHONIOENCODING”: “utf-8”}
}
}
]

0 Likes