Sublime text 3 - console - how to open file
I would like to open files for editing from the sublime text 3 console (which appears on ctrl + `)
I tried
open [filename]
but it always gives a syntax error for the last character of the filename. I tried to include the name in quotes.
Also, I would like to know if I can execute shell commands directly from it console
+3
source to share
3 answers
If you really want to open files from the console (much easier to just press Ctrl O), the following command will open a file selection dialog:
window.run_command("prompt_open_file")
There is no command to open a specific file from the console.
If you're interested in learning more about the Sublime Python API, take a look here .
+3
source to share