Jump to content

Recommended Posts

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

Share this post


Link to post

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  :)

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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 :-)

Share this post


Link to post

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

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...