Jump to content

Workflow snippet affected by features/snippet settings


april

Recommended Posts

  • What I was trying to do:
    • To work around the problem snippet collections are not linked to specific apps (see this feature request I made), I instead followed this tutorial to create a workflow snippet for Visual Studio Code (the specific app I want the snippet to auto-expand in).
  • How to replicate the bug:
    • Settings in "features" -> "snippets":
      • "Automatically expand snippet by keywords" is checked
      • in "Auto Expansion Options" -> "Options" add VSCode as an app in "Don't expand snippets in the following code:"
        •  
        •  
        • 1845483850_ScreenShot2020-12-08at12_31_23.thumb.png.addf268792029c1173bdf6bc568c7e0f.png
    • Add a snippet workflow like the following:
      • 1174452239_ScreenShot2020-12-08at12_32_00.png.8acd3b88863a8476f47ba212c348212d.png
      • 56386934_ScreenShot2020-12-08at12_42_11.png.d06def2450551821b99098d502bb10eb.png
      • 2033925842_ScreenShot2020-12-08at12_41_49.thumb.png.215c0e33f4f992b2db70ecfaa2a1a970.png
    • type "\code" in VSCode
    • the snippet does not auto expand
  • NOTE
    • However, if I remove VSCode in "features" -> "snippets"the auto expansion works
  • Alfred version & build number
    • 4.2.1 [1187]
  • macOS version
    • MacOS Catalina 10.15.6

 

Link to comment

@april Welcome to the forum :)

 

You'll need to remove Visual Studio Code from the "Don't expand" apps list in the Snippets preferences in order for the workflow snippets to expand, as these respect the same list of excluded apps.

 

If you're having issues with your snippets expanding where they shouldn't, take a look at our tips for better snippet keywords:

 

https://www.alfredapp.com/help/features/snippets/#tips-expansion

 

In particular, setting decent prefixes that you won't accidentally use in code, for example, is a good way to ensure your snippets won't expand when you don't want them to.

 

Moving this to Discussion & Help as it isn't a bug.

 

Cheers,
Vero

 

Link to comment
21 hours ago, april said:

However, if I remove VSCode in "features" -> "snippets"the auto expansion works

I have tried that, but there is a problem with that solution. After removing VSCode in the app list, unwanted snippets expansions will be done in VSCode. The issue is workflow snippet and feature snippets should be independent of each other.

Edited by april
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...