invalid character in xcode

Quite often when I code in Xcode, I type no-break space (Option + Space / Option + Shift + Space) especially before or after square brackets or curly braces. This causes Xcode to give warning:

invalid character in source file

A workaround is to assign Option+Space and Option+Shift+Space to “Make Text Writing Direction Left ToRight” in Xcode

  • Preferences (menu)
  • Key Bindings(section)
  • Default(drop down)
  • Text(tab)
  • Writing Direction(section)
  • Make Text Writing Direction Left ToRight(command)
  • Double-click and use (+) on the right to add key bindings.

You could assign them to any other command that doesn’t have a useful effect for you.

It will make it seem that the space bar is not responding when you accidentally hold the modifier keys but that’s much less of a time waster than the compilation errors.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s