Jump to content
robert_muench

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?

Share this post


Link to post

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?

Share this post


Link to post

@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

Share this post


Link to post

cmd+v works, but I think I want to use the feature different and chose a bad title.

 

I want the snippets to autoexpand while I type. Which isn't the case.

 

Opening Alfred, getting to the snippet and pasting will definitely work, but that's not a fast workflow.

Share this post


Link to post

@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

Share this post


Link to post

Well there is not a lot to see as just nothing is happening. CMD+V is working.

 

So, this is my configuration and how the text is shown (unexpanded). And a screenshot of the settings that Alfred can control my system.

 

Screenshot 2017-01-05 20.09.01.PNG

Screenshot 2017-01-05 20.10.09.PNG

Screenshot 2017-01-05 20.11.25.PNG

Share this post


Link to post

@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

Share this post


Link to post

Alfred text expansion is not working at all. The OSX text expansion is working (but not in MacVim and of course not in Termin as this isn't supported).

 

Yes, 3.2.1 [768]

 

BTW: Thanks for all the engagement so far :-)

Share this post


Link to post

@robert_muench Ah, so we can take the focus away from any Terminal-related issues, as it's a broader issue of getting Alfred text expansion working on your Mac!

 

Please take a look at the troubleshooting steps here, which cover most aspects to look at to get text expansion up and running:

https://www.alfredapp.com/help/troubleshooting/snippets/

 

Cheers,

Vero

Share this post


Link to post

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?

Share this post


Link to post

@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

 

Share this post


Link to post

I use: 10.11.6 (15G1212)

 

Correct, the 2nd "Alfred Text Service" pop-up is not showing, while an icon is shwon in the Dock. I made a screenrecording: https://db.tt/PwHAG62uGb

 

The manual work around worked !! :-D Very good! Didn't know about this possibility. So, problem solved. No clue why the standard procedure doesn't work.

Share this post


Link to post

@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

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