Xcode snippets not showing in autocomplete

I just started using code snippets for the first time, I added a snippet, set a shortcut, but when I type a shortcut and press Esc , it does not appear. What am I doing wrong? I also tried restarting Xcode, but it still does not work. Shortcuts for other code scanners work fine.

+7
source share
3 answers

When I first worked with the code snippet functionality built into Xcode, I had problems finding the right "completion area". You can change it to "Everything" to find out if there is an error. But in your case, I see that you want to publish methods, so with the "Top Level" everything will be fine. Just keep that in mind for the future.

+3
source

Yes. This seems like an Xcode error. Actually my Xcode crashed when I changed the scope.

So the workaround:

  • Create a new fragment.

  • Change the area to All before clicking Finish

  • Now Voila is working.

+3
source

It doesn't seem to work for me on Xcode 6.1. I am very confident in the field, but it also does not work with setting All scope. Although, I used snippets with previous versions of Xcode without any problems.

+1
source

Source: https://habr.com/ru/post/925116/


All Articles