Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable 'Use symbol and text substitution' inside Xcode

Tags:

xcode

macos

I have a virtual Mac running and want to code a bit in Xcode. My keyboard has characters as { and [ available by using Alt-Gr. In my virtual Mac, using the same keyboard combinations gives me a different output.

  • Alt-Gr + 9 produces a capital ç instead of {
  • Alt-Gr + ^ produces ô instead of [

I managed to solve this for some programs by using the 'Use symbol and text substitution' option under Language & Text - Text in the system settings. This is working fine in TextEdit, Safari, ..., but not in Xcode. Xcode seems to ignore the symbol and text substitution.

Any ideas how to fix this? Or maybe another workaround? Any help is appreciated, because this issue is really slowing down my programming speed.

like image 251
Benny G Avatar asked Jun 30 '12 11:06

Benny G


People also ask

Why are my keyboard text shortcuts not working Mac?

Make sure you're using the latest version of the app. If the keyboard shortcut uses a function key, you may also need to press and hold the Fn key or the Globe key on the keyboard to perform the shortcut (depending on your Mac model, if you're using a Magic Keyboard, and how you set an option in Keyboard preferences).


1 Answers

Xcode, the text substitutions are not enabled by default. To enable go to Xcode -> Edit -> Format -> Substitutions -> Text Replacement (Enable this)

enter image description hereenter image description hereenter image description here

Hope this helps!

Edit: As Senseful mentioned its better to use Code Snippets. This is a link explaining how to use code snippets Creating Custom Code Snippets and this. Hope it helps!

like image 116
coder284 Avatar answered Nov 15 '22 09:11

coder284