Jump to content

Alfred snippets with trailing space or tab.


Recommended Posts

Alfred trims trailing spaces and tabs in keyword. Fix it please.

 

 

Hi there, could you please fill in your registered Powerpack email address in your forum profile?

 

Cheers,

Vero
Link to comment
  • 2 weeks later...

Alfred 3.0.1 now allows leading and trailing spaces in the keyword.

 

Nice, but how about the <tab> character? I have a snippet "!important;" with keyword "im<tab>" and I want it to be expanded on "im<tab>", but not on "im" or "im ".

Link to comment

Nice, but how about the <tab> character? I have a snippet "!important;" with keyword "im<tab>" and I want it to be expanded on "im<tab>", but not on "im" or "im ".

 

I have a note for allowing tab, but this will take further consideration as tab has other purposes in OS X such as switching between fields which means Alfred would have to intercept this behaviour. This is a more involving change than space suffix.

 

Cheers,

Andrew

Link to comment

I have a note for allowing tab, but this will take further consideration as tab has other purposes in OS X such as switching between fields which means Alfred would have to intercept this behaviour. This is a more involving change than space suffix.

What this mean? Will You add <tab> interception in the future minor release or not?

In https://smilesoftware.com/textexpander this feature realized.

 

P.S. Thanks for amazing application.

Edited by quaritexa
Link to comment

 

P.S. Thanks for amazing application.

 

well, at least a little sign of  appreciation...

 

In have seen Vero and Andrew answering you like two little Gandhi...

 

please, try to be 'amazing' a little you too, just some little 'thanks' or 'regards' or 'cheers' or 'hi' or 'thanks' while you are posting your questions would be appreciated ( from me at least, but maybe I'm  too much sentimental )

 

    Giulio

Edited by juliosecco
Link to comment

Sorry, but I didn't speak or write English at all, until recently. And I accustomed to speaking briefly. Forgive me for my cold Russian style :)

 

I think, best appreciation to Andrew and Vero is my recommendations to all my friends to use this helpful application, without which I feel myself clumsy.

Link to comment

Sorry, but I didn't speak or write English at all, until recently. And I accustomed to speaking briefly. Forgive me for my cold Russian style :)

 

I think, best appreciation to Andrew and Vero is my recommendations to all my friends to use this helpful application, without which I feel myself clumsy.

 

Sorry too,

quaritexa.

 

I'm getting old and maybe a little strict  (непреклонный)

 

greetings from Rome,

 

     Giulio

Link to comment
  • 1 month later...

I have a note for allowing tab, but this will take further consideration as tab has other purposes in OS X such as switching between fields which means Alfred would have to intercept this behaviour.

This is a more involving change than space suffix

 

Andrew, could You please add tab interception? Trailing tab is more usual behavior for snippets expansion in all other applications.

Link to comment
  • 4 months later...
  • 1 month later...
  • 4 months later...

@quaritexa Given the level of interest for this feature (one user in the past year), this is highly unlikely to come to Alfred.

 

At this point, Alfred doesn't modify any macOS events, having a read-only view and replacing snippets when matched.

 

Supporting Tab for snippet expansion would require Alfred to interfere with the macOS event tap, removing keystrokes to prevent i.e. moving focus to the next text field - something which isn't worth the relative behavioural risk to support a niche feature.

 

In the latest Alfred 3.4 (currently in pre-release), you can set global prefixes and suffixes to your snippets, so you can set an affix that uses the key above tab or another key to complete your snippet.

 

Cheers,
Vero

Link to comment
  • 1 month later...
  • 2 years later...

Hi, can you also fix trailing spaces in the expanded text?  if you use the snippets to replace common acronyms or misspelled words and enter a space in the keyword, it will not include in any trailing spaces in the replacement text.

For example i want to replace osha with OSHA.  

so if I put in a keyword of osha_ and a replacement text of OSHA_ (underscores representing the space), it will replace with OSHA (no space)

 

so a sentence like "in this situation osha has decided..." ends up looking like "in this situation OSHAhas decided..." because it dropped the trailing space

 

Link to comment
3 minutes ago, abzz said:

Hi, can you also fix trailing spaces in the expanded text?  if you use the snippets to replace common acronyms or misspelled words and enter a space in the keyword, it will not include in any trailing spaces in the replacement text.

For example i want to replace osha with OSHA.  

so if I put in a keyword of osha_ and a replacement text of OSHA_ (underscores representing the space), it will replace with OSHA (no space)

 

so a sentence like "in this situation osha has decided..." ends up looking like "in this situation OSHAhas decided..." because it dropped the trailing space

 

 

In what application or website have you seen this? I've tested this in TextEdit, and if there's a trailing space at the end of the snippet content, this is respected when it's pasted.

 

However, we know that certain apps/sites like Google Docs and Microsoft Word manipulate content before pasting, resulting in lost or added paragraph breaks, line breaks, trailing spaces, etc.

 

If you try it in TextEdit as plain text, what behaviour do you see? 

 

Cheers,
Vero

Link to comment
  • 1 year later...
On 10/8/2019 at 6:35 PM, Vero said:

In what application or website have you seen this? I've tested this in TextEdit, and if there's a trailing space at the end of the snippet content, this is respected when it's pasted.

 

Hello @Vero. I have this issue on chromes address bar. In other places it works.

Could you please check it out to see whether it is only the case with me? 

Link to comment
9 minutes ago, OAL said:

Could you please check it out to see whether it is only the case with me? 

 

I've had a look and you're correct that the Chrome address bar, Chrome manipulates the snippet and removes the space at the end. Unfortunately, this is entirely in Chrome's hands and not something we have control over.

 

It works in TextEdit and in normal, non-manipulating apps, so this is just something you'll have to keep in mind in apps that try to be overly "smart" by overruling what you're typing or pasting in.

 

Cheers,
Vero

Link to comment

Thank you for confirming. It is the same with gmail. 

I also tried this with another text expansion tool and got the same result!

Interestingly, when there is an extra space after the cursor, the space stays.

 

Cheers!

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