Last active
February 23, 2026 18:54
-
-
Save tommythorn/070f689735231c46beaa24a6a55aaea6 to your computer and use it in GitHub Desktop.
Bind Option-Space to U+202f (Narrow No-Break Space) to property typeset values and units, eg. 10 kg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Highly opinionated: The correct typesetting of values with units according | |
| # to most standards (incl. American Physics Society) requires separating the | |
| # value and unit with a _thin_ unbreakable space. Executing the below will | |
| # globally rebind Option-Space on macOS from Non-Break Space (U+00A0) to | |
| # Thin Non-Breaking Space (U+202F) | |
| # Tommy Thorn, 20260223 | |
| mkdir -p ~/Library/KeyBindings | |
| cat > ~/Library/KeyBindings/DefaultKeyBinding.dict <<EOF | |
| /* Option-Space to Thin Non-Breaking Space (U+202F) */ | |
| "~ " = ("insertText:", "\U202F"); | |
| EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment