Jump to content

Display Folder items within Alfred to open in Sublime Text


Recommended Posts

Hey guys!

 

I'm pretty new to Alfred in terms of developing workflows.  I have done a couple but nothing notable.

 

The idea is I am trying to display what is in my root folder, which is where I house all the folders I use for development.  Then whichever one I selected would open in Sublime Text (ST3).

 

I thought I could get something from this recent downloads workflow because it displays the downloads folder in alfred, but I don't know ruby.  If I could display the root folder like this and then whichever one I selected would open in ST3 that would be great.

 

I also thought this Open in Sublime Text workflow would help but I don't know AppleScript either.   :(

 

I do have some experience with PHP however.  Any help would be awesome! :D

 

 

Link to comment

Hey guys!

 

I'm pretty new to Alfred in terms of developing workflows.  I have done a couple but nothing notable.

 

The idea is I am trying to display what is in my root folder, which is where I house all the folders I use for development.  Then whichever one I selected would open in Sublime Text (ST3).

 

I thought I could get something from this recent downloads workflow because it displays the downloads folder in alfred, but I don't know ruby.  If I could display the root folder like this and then whichever one I selected would open in ST3 that would be great.

 

I also thought this Open in Sublime Text workflow would help but I don't know AppleScript either.   :(

 

I do have some experience with PHP however.  Any help would be awesome! :D

 

You COULD make a workflow for this if you wanted, but this is actually something that can be accomplished very easily with Alfred already (assuming that I'm understanding what you want tot do).

 

With the root folder or any folder selected in Alfred as a result item, press the right arrow, select Open With and then type a few letters to limit the final item down to Sublime Text. That would open whatever file or folder you have selected in Alfred. 

 

You could also do this from Finder by selecting the item and then pressing Cmd+Opt+\ and performing the same actions.

 

There are several other ways you could configure this to work that may also make things a little easier/more convenient. If you could, try the method I mentioned and see if that's what you were looking for. If not, let me know and I'll help you get to the solution you're looking for.

Link to comment

You COULD make a workflow for this if you wanted, but this is actually something that can be accomplished very easily with Alfred already (assuming that I'm understanding what you want tot do).

 

With the root folder or any folder selected in Alfred as a result item, press the right arrow, select Open With and then type a few letters to limit the final item down to Sublime Text. That would open whatever file or folder you have selected in Alfred. 

 

You could also do this from Finder by selecting the item and then pressing Cmd+Opt+\ and performing the same actions.

 

There are several other ways you could configure this to work that may also make things a little easier/more convenient. If you could, try the method I mentioned and see if that's what you were looking for. If not, let me know and I'll help you get to the solution you're looking for.

 

Thanks David! I actually use this feature a lot.  I made the workflow initially like so

e1ts.png

 

which shows this ( I know you know this but I wanted the chance to play with the new image shack workflow )

 

jexp.png

 

However I was hoping for a workflow that would simply show the results like below BUT Showing Only Folders/Files in the root directory like above

 

jpnh.png

 

It's essentially just like the Sublime Text favorites workflow except it would show the contents of the root folder.  ( almost like an automatic favorites )

 

I started learning AppleScript last night but have only gotten through the basics.

 

I'm pretty sure I can figure out how to get the file to launch directly in ST3, it's just getting the root directory to populate the regular list that I'm having the most trouble with.

Link to comment

Thanks David! I actually use this feature a lot.  I made the workflow initially like so

e1ts.png

 

which shows this ( I know you know this but I wanted the chance to play with the new image shack workflow )

 

jexp.png

 

However I was hoping for a workflow that would simply show the results like below BUT Showing Only Folders/Files in the root directory like above

 

jpnh.png

 

It's essentially just like the Sublime Text favorites workflow except it would show the contents of the root folder.  ( almost like an automatic favorites )

 

I started learning AppleScript last night but have only gotten through the basics.

 

I'm pretty sure I can figure out how to get the file to launch directly in ST3, it's just getting the root directory to populate the regular list that I'm having the most trouble with.

 

It sounds like a good solution for this would be a File Filter workflow.

 

In the Alfred workflows area, click to create a new a new workflow. The quickest way to get going to is select the "File filter from keyword and open" template. Once selected, double click the File Filter item and set your keyword and description. Click the Search Scope tab and then drag and drop your root folder in the Search Scope area.

 

Now, with that done, you have a keyword to search and show results ONLY in your root folder or subdirectories of it. Selecting an item will open it using the default application. If you want to take it one step further, double click the Open File item and drag and drop Sublime Text into there. That will make results shown from this search automatically open in Sublime Text rather than the default application.

 

Let me know if this is more of the workflow that you were looking for.

 

Have a great holiday!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...