Jump to content
hamiseixas

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

Share this post


Link to post

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?

Share this post


Link to post
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

Share this post


Link to post

 

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

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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 }}" />

Share this post


Link to post

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

?

Share this post


Link to post

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

Share this post


Link to post

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!

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