XCode Text Editor Question

Joined
Mar 18, 2016
Messages
3
Reaction score
0
Points
1
When you are typing a string in XCode, it will automatically insert the second double-quote. For example, type:

print ("

and XCode will type

print (""

Which now requires that you take your fingers off of the home row and find an arrow key to get past the second quotation mark.

How do we disable this?

P.S. Sorry, I tried googling this a million ways and mostly they just point to articles about turning off smart quotes (unicode quote replacement). Thanks in advance for relieving me of this torture!
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
So you don't want it to place the cursor between the quotes?

(outdated link removed)
 
Last edited:

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Or, if XCode is like any other editor, if you type the second quotation mark, the editor will ignore it and move the cursor to the right of the second one it inserted.
 
OP
G
Joined
Mar 18, 2016
Messages
3
Reaction score
0
Points
1
Hey Dysfunction,

It's the second double-quote that I don't want it to add (not braces). The "Automatically insert closing braces" doesn't affect double-quote ("), it only affects curly braces (}).

vansmith, you're right, any other editor will let you plow through from the keyboard. In this case, you end up with print("My thing");" -- it just leaves the other double-quote on the end of the line. It's the worst of all scenarios.
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
Bummer, donno.. I've never tried to do that. Then again, I don't think I've noticed the issue you're having (other than the braces, which I've had bug me prior).
 
OP
G
Joined
Mar 18, 2016
Messages
3
Reaction score
0
Points
1
Bummer, donno.. I've never tried to do that. Then again, I don't think I've noticed the issue you're having (other than the braces, which I've had bug me prior).

Your comment made me think maybe this only happens to me (or else Google should be full of rants about this). I figured it out!

My unique setup is that I have internationalization turned on. So "i turns into an i with an umlaut over it, for example. With that, XCode doesn't remove the second double-quote when you try to type through it (by typing the double-quote), probably because they can't tell if you're trying to start an international character or not.

If you're running into this weird behavior when typing strings, turn off your international keyboard and just set it to US-based and everything will go back to normal.

Dysfunction, that was just enough info to send me down the right path. Thanks!
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
AHA! I use umlauts all the time, but I use opt-u to generate the umlaut! Schön! ;) Glad it's working!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top