Home Download Buy Blog Forum Support

Emacs-esque file open?

Emacs-esque file open?

Postby jmbaker on Fri Sep 28, 2012 5:53 pm

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)?
jmbaker
 
Posts: 1
Joined: Fri Sep 28, 2012 5:49 pm

Re: Emacs-esque file open?

Postby iamntz on Fri Sep 28, 2012 6:03 pm

Only files that are in a project. Hit ctrl/cmd + p and start typing.

You can read more about projects here http://docs.sublimetext.info/en/latest/ ... l#projects
or here: https://tutsplus.com/lesson/all-about-projects/
iamntz
 
Posts: 909
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Emacs-esque file open?

Postby quarnster on Fri Sep 28, 2012 6:07 pm

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.
quarnster
 
Posts: 389
Joined: Tue Nov 29, 2011 11:34 am

Re: Emacs-esque file open?

Postby C0D312 on Fri Sep 28, 2012 6:15 pm

facelessuser made FuzzyFileNav: https://github.com/facelessuser/FuzzyFileNav
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Emacs-esque file open?

Postby chrisguilbeau on Fri Sep 28, 2012 7:56 pm

I wrote a little plugin that does what you are talking about. See page two of this thread:

http://www.sublimetext.com/forum/viewtopic.php?f=2&t=6637&start=10
chrisguilbeau
 
Posts: 19
Joined: Fri Nov 11, 2011 5:06 am

Re: Emacs-esque file open?

Postby rosshemsley on Thu Dec 05, 2013 4:50 pm

I found none of the above did what I want so I wrote a new package, 'iOpener':

https://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: https://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.
rosshemsley
 
Posts: 4
Joined: Mon Dec 02, 2013 6:14 pm

Re: Emacs-esque file open?

Postby fburleigh on Sat Dec 07, 2013 1:59 am

rosshemsley wrote:I found none of the above did what I want so I wrote a new package, 'iOpener':

https://github.com/rosshemsley/iOpener

[snip]



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!
fburleigh
 
Posts: 23
Joined: Tue Apr 17, 2012 6:40 pm

Re: Emacs-esque file open?

Postby rosshemsley on Sat Dec 07, 2013 9:48 am

> * 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!
rosshemsley
 
Posts: 4
Joined: Mon Dec 02, 2013 6:14 pm

Re: Emacs-esque file open?

Postby bvm42 on Thu Dec 19, 2013 10:09 pm

This looks great, but I can't get it to install on Windows. Is it incompatible with the latest version of ST3? I added https://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.'
bvm42
 
Posts: 3
Joined: Mon Jul 29, 2013 7:22 am

Re: Emacs-esque file open?

Postby rosshemsley on Mon Dec 23, 2013 12:20 am

This seems to be a bug in package control, another user has already mentioned it and I opened a ticket.

https://github.com/wbond/sublime_packag ... issues/657

It would be useful if you could add your problem too.

Ross
rosshemsley
 
Posts: 4
Joined: Mon Dec 02, 2013 6:14 pm


Return to General Discussion

Who is online

Users browsing this forum: RyanJ and 27 guests