Sublime Forum

Sublime File Navigator

#1

First of all this is my first post on the forum so I wanted to say hello to everyone.

First a short background on why I created this plugin. Like many of Sublime users here I come from VIM background.
That means that despite many cool and useful Sublime features (fuzzy autocompletion was on top of my list) I still missed many of VIM features and it’s ability to operate fully just using the keyboard.

One of the biggest things I missed was the problem with navigating through my files, copying or moving files between directories, creating new directories, deleting files, or just viewing what files are in a particular directory. Sure I could do it from the terminal, but going between one and the other all the time was not the best for my productivity.

I’ve decided to look for some plugins that would help me with my daily coding, and found some that allowed me to cover some of the functionalities but none of them was 100% of what I was looking for.

So I’ve decided to create such a plugin my self.
It’s still an early alpha version, and since it’s my first encounter with Sublime Plugin development or Python I think there’s much that needs to be improved.
But it does it’s job, allowing me to manipulate my files without touching the mouse. Plus Sublime’s excellent fuzzy file name matching makes it much quicker then doing the same from the terminal.

You can get the plugin from my GitHub repo: github.com/belike81/Sublime-File-Navigator
I’ve requested for the repo to be added to the Package Control, but it can take some time to get approved.

Usage is pretty simple, and describe on GitHub. Basically just open a folder or a project in Sublime and press “ctrl+shift+o” if your on Windows/Linux or “cmd+shift+o” if on a Mac.

I’ll be happy to here from you what features need to be fixed/changed for it to be more usable.

0 Likes

#2

Really handy plugin. I was hoping for something like that. Huge thanks!

0 Likes

#3

On a mac, you can use Alfred (alfredapp.com/) for all that stuff. It lets you do what you mention plus a great deal more. I have “open_files_in_new_windows” set to false in sublime, and all my text/code files defaulted to open in sublimetext, so whatever I open in Alfred pops up in a new tab.

0 Likes

#4

Well, not really. Using Alfred would be the same as using the terminal, worse actually since You always start in your home directory. Plus You can’t really use the fuzzy matching which really speeds things up.

0 Likes

#5

This is a great idea, less mouse! I think it would much faster and useful if it operated more similar to the ctrl-p file selector instead of having the concept of a “current folder” and having to navigate up and down through directories (the sidebar already does a good job at that). Also it’s unclear to me what the “current folder” is when I press ctrl-shift-o (in a large project I can’t keep the whole dir structure in my head and I don’t necessarily know what dir the file I’m editing is in).

I.e.:
when I hit ctrl-shift-o I should be able to immediately fuzzy-select any file or folder within my project just like ctrl-p (without being able to do this in one step means it’s just going to be faster to use the mouse/sidebar/terminal in many cases)
display the files in the same style as ctrl-p with their filepath underneath the file name so that the file/folder can be identified correctly and easily

Just my feedback, I realize it differs quite a bit from your original design so feel free to ignore it :wink: thanks!

0 Likes

#6

When I want to open a file with Alfred, I type “o FileName” and it fuzzy matches splendidly (unless the file is in a hidden directory. That’s the only time I ever need to use the directory navigation tool). If, instead of pulling up the file by name, you want to search your directories (also with fuzzy matching), then you can set “Folders” to be included in your default results (under Features>Default Results). In any case, I don’t want to belabor the point and I don’t mean to proselytize for Alfred. I’m sure there’s other software that accomplishes as much (I know of Quicksilver on OS X, Launchy on Windows, and GNOME Do on Unix).

I also don’t mean to stand in the way of additional plug-ins for our beloved Sublime Text. But I suppose I’m quite fond of the Unix philosophy: “Write programs that do one thing and do it well. Write programs to work together,” and, truth be told, I use Alfred (plus a few of its extensions) to do everything the OP describes and it works from every application. Just figured I might be able to prevent a little wheel-reinvention.

0 Likes

#7

I think the point about Alfred is marginal because it’s only on OSX, ST2 also supports two other major platforms. I’d benefit greatly from further development of this plugin.

0 Likes

#8

[quote=“sheldno”]This is a great idea, less mouse! I think it would much faster and useful if it operated more similar to the ctrl-p file selector instead of having the concept of a “current folder” and having to navigate up and down through directories (the sidebar already does a good job at that). Also it’s unclear to me what the “current folder” is when I press ctrl-shift-o (in a large project I can’t keep the whole dir structure in my head and I don’t necessarily know what dir the file I’m editing is in).

I.e.:
when I hit ctrl-shift-o I should be able to immediately fuzzy-select any file or folder within my project just like ctrl-p (without being able to do this in one step means it’s just going to be faster to use the mouse/sidebar/terminal in many cases)
display the files in the same style as ctrl-p with their filepath underneath the file name so that the file/folder can be identified correctly and easily

Just my feedback, I realize it differs quite a bit from your original design so feel free to ignore it :wink: thanks![/quote]

Hmm… that’s a great idea actually. I’ll do some testing with it, and update the plugin if it will work.

0 Likes

#9

[quote=“abathologist”]
When I want to open a file with Alfred, I type “o FileName” and it fuzzy matches splendidly (unless the file is in a hidden directory. That’s the only time I ever need to use the directory navigation tool). If, instead of pulling up the file by name, you want to search your directories (also with fuzzy matching), then you can set “Folders” to be included in your default results (under Features>Default Results).[/quote]

Well, we come to the same thing I mentioned before. Yes, you can open/move does files with Alfred. I even did some testing, but let’s say you want to reach a file called “application_controller” or a folder called “config” for Your project. How to do it in Alfred? Well you have to add that projects directory to it’s search scope. Now lets say you have 10-20 projects. All are added to the scope, therefore all of them are being searched every time. Finding specific file/directory becomes cumbersome.

[quote=“abathologist”]
I also don’t mean to stand in the way of additional plug-ins for our beloved Sublime Text. But I suppose I’m quite fond of the Unix philosophy: “Write programs that do one thing and do it well. Write programs to work together,” and, truth be told, I use Alfred (plus a few of its extensions) to do everything the OP describes and it works from every application. Just figured I might be able to prevent a little wheel-reinvention.[/quote]

I agree, but as I showed you before, Alfred in this case is not the BEST tool to do this kind of job. It can do it, but it’s not its purpose. I can give you a ton of examples where using Alfred to do this kind of tasks is simply slower and less efficient. Plus, adding more and more files/folders to alfred search scope is only gonna make it work slower and less efficient.

0 Likes

#10

I think I understand. I’ll give this plugin a go and see if it can help improve my work flow. Thanks for your input.

0 Likes