Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sublime text 3 - console - how to open a file

Tags:

sublimetext3

I would like to open files to edit from the sublime text 3 console (which appears on ctrl+`)

I have tried

open [filename] 

but it always gives syntax error on the last character of filename. I have tried enclosing name in quotes.

Also, I would like to know if I can execute shell commands directly from it's console

like image 665
Yash Gupta Avatar asked Dec 26 '22 01:12

Yash Gupta


1 Answers

That's the command:

sublime.active_window().open_file("filename.txt")

It's a bit ugly, but probably could be scripted/automated somehow (to have a shortcut for instance).

like image 196
Sergey Kostrukov Avatar answered Jan 09 '23 07:01

Sergey Kostrukov