How do I open a file using only keyboard in Sublime Text 2/3?
Looking for equivalent of <Esc>:e /path/to/file
from Vim.
sublime-textsublime-text-2sublime-text-3
How do I open a file using only keyboard in Sublime Text 2/3?
Looking for equivalent of <Esc>:e /path/to/file
from Vim.
Best Answer
On OS X, Press Cmd-O to open the file browser.
Then, Cmd-Shift-G allows you to enter the name of the folder to go to.
Finally, just type the file name (or a unique prefix) to select the file you want. You can also navigate using the arrow keys.
Plugin for opening files by name
The following plugin allows you to type a file name and have it opened in Sublime Text 2. It should work on any OS.
This allows you to encode a position in that file in the file name:
/path/to/file:42
will open the file and go to line 42/path/to/file:42:23
will open the file and go to line 42, column 23Selecting a file:
After selection:
For information how plugins work and how you can integrate this in the UI, see this answer.