Jump to content

Text Shortcut - Create text abbreviations


Recommended Posts

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 by hamiseixas
Link to comment
  • 5 months later...
  • 2 months later...
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 by OmarKN
Link to comment
  • 3 weeks later...

 

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

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
  • 1 month later...

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

Link to comment

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
  • 1 month later...

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
  • 2 months later...

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

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