Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode 6 editor and the escape key

Tags:

xcode6

XCode 6 shows a very annyoing behavior wrt the escape key: pressing that key inserts the ESC char code (0x1B) at the caret position, instead of canceling dialogs and such (which is especially annyoing with autocompletion and also in the search bar). Since this character is an invisible you will get a syntax error for what looks like absolutely perfect code and you don't know why:

enter image description here

By enabling Editor -> Show Invisibles you then understand why:

enter image description here

if you come to the idea that there could something be hidden.

Does anybody know how to fix this behavior? Confirmations that other see the same effect? If not it might be something with my installation (plugins?).

like image 689
Mike Lischke Avatar asked Nov 15 '25 03:11

Mike Lischke


1 Answers

In case anyone else stumbles upon this in the future, I had the same problem and found a solution.

In my case, the default key binding for the escape key (Cancel) had been lost, which I guess is what normally keeps the key press from inserting the actual ESC character. Reverting the key binding for Cancel to ESC solved it.

(I found out by looking at key bindings in the preferences panel and showing only those that had been customized. Cancel was in the list even though I can't ever remember having altered it, not sure if that was something I had done or caused by a bug somewhere).

like image 156
thusoy Avatar answered Nov 17 '25 20:11

thusoy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!