myfhmg
Last Updated: February 25, 2016
·
3.882K
· x3ro
0266e613fe487607b582252ca8ae78f2

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 :)

Say Thanks
Respond

4 Responses
Add your response

8938
991b8de70c5edb062ddfe8cd9b59277e

Simple but effective workaround. And I wouldn't want to create it globally… so this is perfect.

over 1 year ago ·
8977
A0bdf41fad9763f3e6ae7394c2b22ae9

This saved my year. Thanks!

over 1 year ago ·
18336
None

Wow, that is SOOO useful :)

over 1 year ago ·
18786
Cdvseob1 normal

actually theres also no good way for non-breaking-hyphens other than this.
thanks for the tip!

over 1 year ago ·
Filed Under