One thing that annoys me: I can’t seem to figure out how to open a file without going through the OS’s open file dialog. Is there any way to open the file by simply typing in a path (preferably with autocompletion)?
Emacs-esque file open?
Only files that are in a project. Hit ctrl/cmd + p and start typing.
You can read more about projects here docs.sublimetext.info/en/latest/ … l#projects
or here: tutsplus.com/lesson/all-about-projects/
You don’t need a project, ctrl/cmd+p will list already opened files and files in opened folders. I often do “subl .” to just open up the current directory.
I wrote a little plugin that does what you are talking about. See page two of this thread:
I found none of the above did what I want so I wrote a new package, ‘iOpener’:
github.com/rosshemsley/iOpener
Basically works like emacs or bash:
- defaults to current working directory
- tab gives completions
- double tap of tab gives directory listings (with nice fuzzy matching provided by ST).
- ‘up’/‘down’ navigate history of paths previously entered.
- ‘open’ on folder works as expected: opens a new window with that folder added to sidebar.
Only works on ST3, may or may not work on Windows (let me know if you have a problem?)
Currently only works when there is an active window.
Install: (package control):
package control: add repository: github.com/rosshemsley/iOpener
then install as normal.
Use:
cmd+o (*nix), then as above.
cntl+o (windows)…hopefully. I haven’t tested it yet. then as above.
[quote=“rosshemsley”]I found none of the above did what I want so I wrote a new package, ‘iOpener’:
github.com/rosshemsley/iOpener
[snip]
[/quote]
Very nicely done, Ross. Love it! And here’s my two comments:
-
A case-insensitive completion at the one-line prompt would improve the experience, I think.
-
It took me a while to learn that double-tab isn’t tap … think about some random thing, yawn … now tap again. It’s fast: tap-tap on tab!
- A case-insensitive completion at the one-line prompt would improve the experience, I think.
I tried to emulate bash which is quite fussy about case, but it’s certainly possible to add in some settings!
- It took me a while to learn that double-tab isn’t tap … think about some random thing, yawn … now tap again. It’s fast: tap-tap on tab!
Yea, I set it to 300ms. I actually thought bash had a similar restriction, but I just had a play and it doesn’t seem to have
any time restriction at all. I never realised!
- I think I’ll add an option to the settings, and default it to a second-or-so.
Thank you for your comments!
This looks great, but I can’t get it to install on Windows. Is it incompatible with the latest version of ST3? I added github.com/rosshemsley/iOpener to package control’s repositories, and when I do Install Package, iOpener appears in the menu. But on selecting it, nothing happens. Console window contains the message ‘Package Control: The package “iOpener” is not available on this platform.’
This seems to be a bug in package control, another user has already mentioned it and I opened a ticket.
github.com/wbond/sublime_packag … issues/657
It would be useful if you could add your problem too.
Ross