Jump to content

Snippets expansion not enabled - resolved [Was "MacVim / Snippets = Not Working"]


Recommended Posts

I would like to use the snippet feature in MacVim as well but it doesn't work. I think this is due to MavVim not using a plain stock cocoa edit widget but something else.

 

Is there anything how I could get it to work? Are there are any workflows, or simple way to make Snippets & MacVim work together?

Link to comment

Doesn't work for me in terminal as well... I'm using the VimBox configuration which uses a couple of plug-ins like autocomplete etc. Not sure if this could make any problems?

 

But automatic text expansion (meaning I type !abc and it gets replaced) even doesn't work in this input field here. Maybe I try to use this feature in a wrong way?

Link to comment

@robert_muench It's possible that plugins are interfering, but the first two things to check:

  • Did you remap cmd or ctrl, or make changes that could cause cmd + v not to work as expected?
  • Did you set Terminal to secure input? If so, Alfred would be unable to see the snippet keyword when typed so won't expand.

Let me know how you get on :)

 

Cheers,
Vero

Link to comment

@robert_muench I understand what you're trying to do. The reason I'm asking about cmd + v is that Alfred relies on the pasting function for snippets, so if default keys have been remapped, pasting may not be happening as expected.

 

Is snippet auto-expansion working in other apps, e.g. in a Text Edit file, on your Mac?

 

And when you try to auto-expand a snippet, what behaviour do you see? Do the characters from the snippet keyword disappear but the snippet content doesn't appear? 

 

Cheers,

Vero

Link to comment

@robert_muench Is text expansion working as expected in other applications? The second screenshot looks like a text file, so it'd be helpful to understand whether your issue is global or specific to Terminal, as per my earlier post.

 

Also, could you please confirm that you're using Alfred 3.2.1?

 

Cheers,
Vero

Link to comment

Ok, so some more information:


1. When starting Alfred a pop-up states "Let's get started" and I see an "Alfred Text Service" icon in my Dock.

2. I don't see the "Alfred Text Service" in Mac's Security & Privacy preferences.

3. When enabling autoexpansion in Alfred, the icon disappears and nothing happens / works.

 

So, where is this service stuff? Is it an app, where can I manually choose it?

Link to comment

@robert_muench Which version of OS X/macOS are you using?

 

You should see the second Alfred Text Service pop-up after the "Let's get started" one. Does this not appear for you once you click "Let's get started"?

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

 

Open your Applications folder, right-click on Alfred 3 > Show Package Contents > in the Services folder, you'll find Alfred Text Service. You can drag this manually to the System Preferences > Security & Privacy > Privacy > Accessibility section and ensure the box is checked.

 

You should then be able to check the box in Alfred's Features > Snippets to start expanding your snippets.

 

Cheers,
Vero

 

Link to comment

@robert_muench Glad it's resolved!

 

In the future, I would suggest trying to look at an issue more holistically when reporting an issue you're experiencing (e.g. snippets weren't working anywhere on your Mac, nothing to do with MacVim/Terminal) as this could have been resolved in a single reply. :) 

 

Cheers,

Vero

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