hamiseixas Posted November 2, 2014 Share Posted November 2, 2014 (edited) I have added a new funcionality for Terminal commands. Now you can execute Terminal commands instead of pasting text snippets. The new command is called "tc". Please take a look at: https://github.com/r...ws-textshortcut --- Workflow for Alfred 2 to abbreviate some texts Just type: ts [shortcut name] Adding new shortcut: First, cmd+c (copy) text you want to use Then, type: ts add [shortcut name] After that, you can type: ts [shortcut name] And the text will be pasted That is all! Removing shortcut: Just type: ts del [shortcut name] If dont remember the shortcut name, just type: ts del and all shortcuts will be displayed. Example: copy: "Best regards, Jon Doe" ts add me When you are writing an email, type: ts me TS will paste: "Best regards, Jon Doe" Edited July 14, 2015 by hamiseixas Link to comment
dserodio Posted April 6, 2015 Share Posted April 6, 2015 I'm getting two extra newlines when I expand a text shortcut, eg, I copy "test" to the clipboard when adding, and when expanding I get "test\n\n". Is this expected? Link to comment
hamiseixas Posted June 16, 2015 Author Share Posted June 16, 2015 I'm getting two extra newlines when I expand a text shortcut, eg, I copy "test" to the clipboard when adding, and when expanding I get "test\n\n". Is this expected? Hi, I have fixed this bug. Thx https://github.com/rtoshiro/alfred-workflows-textshortcut Link to comment
OmarKN Posted June 23, 2015 Share Posted June 23, 2015 (edited) Hi and good day hamiseixas, Not sure what this workflow does, in Alfred I get: ”Text Shortcut Not Found” ? And I do have TextExpander snippets, but if I write ts and then the abbreviation, it will expand at once. ? / with best regards, Omar KN Stockholm, Sweden Edited June 23, 2015 by OmarKN Link to comment
hamiseixas Posted July 14, 2015 Author Share Posted July 14, 2015 Hi and good day hamiseixas, Not sure what this workflow does, in Alfred I get: ”Text Shortcut Not Found” ? And I do have TextExpander snippets, but if I write ts and then the abbreviation, it will expand at once. ? / with best regards, Omar KN Stockholm, Sweden Hi Omar, Sorry for delay. This workflow can manage your snippets without any other third party application. Only using Alfred 2. First thing you have to do, is to add some snippets to use later. For example, if you want to create a snippet like: Best Regards, Omar. So, you have to copy (cmd+c) the text "Best Regards, Omar.", and then type (in Alfred text box): ts add mySnippetName Now you can use the snippet "mySnippetName" typing: ts mySnippetName The workflow has autocomplete. So you don't have to type the entire snippet's name. Only "ts myS" probably will work. I hope it helps. Best H Link to comment
cands Posted July 17, 2015 Share Posted July 17, 2015 Thanks for this workflow, it is most useful! Unfortunately the new tc command is not working for me. The command is not executed. I'm using OS X 10.10.3. I'm using iTerm2, it would be preferable if commands could be executed there (however commands are not executed at all now). The ts function works great. I wonder would it be possible to show the content of the snippet (as many characters as can fit) in the subtext of the result? That would help tell snippets with similar names apart. Link to comment
hamiseixas Posted September 3, 2015 Author Share Posted September 3, 2015 Thanks for this workflow, it is most useful! Unfortunately the new tc command is not working for me. The command is not executed. I'm using OS X 10.10.3. I'm using iTerm2, it would be preferable if commands could be executed there (however commands are not executed at all now). The ts function works great. I wonder would it be possible to show the content of the snippet (as many characters as can fit) in the subtext of the result? That would help tell snippets with similar names apart. Hi About "tc", can you test with simple commands? Like "echo a" Or check if your command needs "sudo" in front of the command? Related to "ts", I've released a new version showing a little bit of contents of tc and ts Thank you. Best Ham cands 1 Link to comment
nschurmann Posted September 4, 2015 Share Posted September 4, 2015 Great!, does this support multiline snippets and variables? it is planned in the future? IE: Hello {{ name }}, my name is {{ me }} and i want to show you bla bla... <img src="{{ awesomeUrl }}" /> Link to comment
hamiseixas Posted September 4, 2015 Author Share Posted September 4, 2015 Great!, does this support multiline snippets and variables? it is planned in the future? IE: Hello {{ name }}, my name is {{ me }} and i want to show you bla bla... <img src="{{ awesomeUrl }}" /> Hi It accept any text that you can copy and paste Unfortunately, variables is not possible now, but It's a nice feature. How would you imagine using variables? Maybe something like: ts mysnippet var1 var2 var3 ? Link to comment
nschurmann Posted October 7, 2015 Share Posted October 7, 2015 I'm really comfortable using snippets like in sublime text. So, i just type the snippet and will display all the text. And to select the next variable i just press tab key. So: ts mySnippet -- display the text and immediately select the first variable type the text of the first variable and then press tab. -- will go to the second variable. type the text of the second variable and then press tab -- will select the third variable and so on... Link to comment
dmydlarz Posted January 4, 2016 Share Posted January 4, 2016 Thanks for this workflow, it is most useful! Unfortunately the new tc command is not working for me. The command is not executed. I'm using OS X 10.10.3. I'm using iTerm2, it would be preferable if commands could be executed there (however commands are not executed at all now). The ts function works great. I wonder would it be possible to show the content of the snippet (as many characters as can fit) in the subtext of the result? That would help tell snippets with similar names apart. Hey what's the status of this fix? The tc command is not working in iTerm2. Though, very useful extension, thanks! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now