I have this annoying problem since long. I use to type quite fast, and it happens to me that after inserting a special character using the "alt" key I probably do not wait enough to press the space bar. I don't see the difference then, but then when the command is interpreted in the terminal, or the script I just wrote is executed, lots of errors come up because there are hidden strange characters (gremlins). Is there any way I can avoid this?
-
1Type slower (or train yourself to release Opt/Alt faster)...– nohillside ♦Dec 17, 2015 at 12:13
-
1It inserts a non-breaking space. This is a fairly common problem. This question has plenty of good answers. Some a application specific and some global.– JoonasDec 17, 2015 at 12:35
-
1Thank you very much Joonas! I am so happy I sorted this out. For the terminal the basic trick worked. For TextWrangler I had to use BetterTouchTool.– user3796965Dec 17, 2015 at 13:33
1 Answer
Your option + space combination defaults to a non-breaking space and several options to remove that binding exist.
Whether you choose to show invisible characters in your editor to manually proof for these issues or use a lint type tool or change the behavior of the system depends on whether you can avoid typing that combination after knowing it exists.