How to enable "Use character and replace text" inside Xcode

I have a virtual Mac and I want to encode a bit in Xcode. My keyboard has characters like {and [available with Alt-Gr. On my virtual Mac, using the same keyboard shortcuts, I get a different output.

  • Alt-Gr + 9 creates capital รง instead of {
  • Alt-Gr + ^ creates รด instead of [

I managed to solve this problem for some programs using the "Use character and replace text" option in the "Language and text - text" section of the system settings. This works fine in TextEdit, Safari, ..., but not in Xcode. Xcode seems to ignore character and text substitution.

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

+5
source share
2 answers

Xcode, text substitutions are not enabled by default. To enable Xcode -> Edit -> Format -> Substitutions -> Text Replacement

enter image description hereenter image description hereenter image description here

Hope this helps!

Edit: since Sansail mentioned that it is better to use code snippets. This is a link explaining how to use code snippets. Creating custom code snippets and this . Hope this helps!

+5
source

Xcode (, Xcode 9), Xcode Snippet.

0

All Articles