Dealing with Alt+Space (non-breakable space) in Sublime Text 2 on OS X
If you are working on OS X you've probably come across the issue that "Alt+Space" inserts a non-breakable space into your code/document. This problem is not easily fixable for all applications, as far as I know, but here is an easy solution for Sublime Text 2, my favorite editor:
Simply insert the following custom keybinding into your user-specific key map. To do that, go to Sublime Text 2 > Preferences > Key Bindings - User
and add the following snippet:
[
{
"keys": ["alt+space"],
"command": "insert_snippet",
"args": {"contents": " "}
}
]
This will insert a plain old regular space instead of an annoying non-breaking one :)
Written by Lucas
Related protips
4 Responses
Simple but effective workaround. And I wouldn't want to create it globally… so this is perfect.
This saved my year. Thanks!
Wow, that is SOOO useful :)
actually theres also no good way for non-breaking-hyphens other than this.
thanks for the tip!