Jump to content

Recommended Posts

Posted

I made a nice Alfred workflow for searching through a folder of plain text file snippets that copies the contents and then inserts it into your current focus point. Additionally, it's easy to see, search, and set Mavericks tags on the snippets. Since the whole storage of snippets is done with the file system, it makes it really easy to add and edit the snippets with other means. Go check it out!

 

using-Alfred-Snippets_mov.jpg

Posted

That's a really cool workflow+like the video description.

 

I find using text expanders a faster solution. 

Maybe this not the kind of app you wanted to replace. 

Maybe i am missing a use case  :)

Posted

I like TextExpander too, but I don't like it's search and insert interface whereas I like Alfred's much better. Also, all snippets are stored as files so you can add to it by simply placing a file in your snippets folder without using Alfred. Also, it's easy to copy the contents of a file from the command line and pass it elsewhere if you'd like, again without Alfred. And finally, I'm keeping all my GitHub Gists in there as well.

  • 4 weeks later...
Posted

@EvanLovely I didn't see it this way.

 

The way you manage your code snippets now is easier/faster than with TextExpander in terms of maintenance. 

Awesome.

  • 3 months later...
Posted

The workflow is not working anymore  :(  for me at least.

At first, I had to reinstalled the workflow because I could use every features except the create a new snippet. When I hit enter+cmd, I just had a notification saying a new snippet has been created but no snippet had been created.

 

After I reinstalled the workflow, when I typed ?snip to create my first snippet, I just got the fallback searches. 

 

Brew list -> Tag is installed. 

 

From Alfred's debugger :

[ERROR: alfred.workflow.input.scriptfilter] Code 0: --: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
--: /opt/local/bin/tag: No such file or directory
  • 2 weeks later...
Posted

Can't choose my folder, but it is working.

Would really love to be able to choose it...

 

what folder, do you mean the folder where "tag" is located or the folder for the snippets?

 

  1. To change the folder where "tag" is located, in Alfred go to Workflows -> Snippets and right click it -> Show in Finder.

    Then open "search-snippets.sh" with a text editor and search and replace "/opt/local/bin/tag" to "tag".

     

  2. To change the path where the snippets are located, you have to change the paths in the Snippets workflow in here:  http://www.evanlovely.com/utilities/alfred/snippets/snippet-paths.png
After I reinstalled the workflow, when I typed ?snip to create my first snippet, I just got the fallback searches.

 

yea i had that also, just make sure you always have at least 1 snippet/text file in the snippets folder, then the problem is solved :-)

Posted

@David

 

Thanks for your answer!

 

1°) I ment the folder where the snippets are located. 

 

2°) This is the process I followed. That's why I do not really understand why it stops working after a couple of days.

I just re-set the path to the folder I wanted to save my snippets. Let's see if it still works in a couple of weeks :)    

 

3°) Thanks for the tip.

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...