Timeline for How do I keep accidentally creating a no break space before opening curly brace?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 8, 2017 at 19:58 | comment | added | bpj | Ilmari Karonen is right, so this is not about the explanation but just to describe my workaround. I have added a syntax match linking the non-breaking space to the Error highlighting group, so that it is visibly different from ordinary space. The same goes for soft hyphen and non-breaking hyphen (which are linked to two different highlight groups since I sometimes use all of these intentionally in text as opposed to code). | |
Apr 7, 2017 at 17:21 | vote | accept | Sarumanatee | ||
Apr 7, 2017 at 13:10 | comment | added | Sarumanatee | And that option confirms @Ilmari Karonen 's suggestion, as that karabiner option displays the commands to create nbsp: option+space, and option+shift+space. Though it turns out, it truly wasn't vim-related at all in the end! | |
Apr 7, 2017 at 13:08 | comment | added | Sarumanatee | @progo YES. I'm on macos right now, and use Karabiner to fine-tune the keyboard layout since my keyboard's most bottom-left is "fn" by default, which I believe is completely dumb. You inspired me to check in there, and there is an option to change all non-breaking spaces to normal space | |
Apr 7, 2017 at 6:33 | comment | added | mike3996 |
@Sarumanatee: on linux you can indeed disable nbsp character altogether. Perhaps Ubuntu's keyboard manager even has an option for it. If not, you can tune the keyboard map yourself (it's a matter of deleting one line, in my system the keymap would be /usr/share/X11/xkb/symbols/us ) after finetuning call setxkbmap us or whatever language of your preference
|
|
Apr 7, 2017 at 0:15 | comment | added | Sarumanatee | Oooh I'm so going to try this tomorrow at work. I always put a space before my curly brace, It'd make sense I'd have my finger on the shift key too early from time to time ! | |
Apr 6, 2017 at 23:30 | review | First posts | |||
Apr 7, 2017 at 0:23 | |||||
Apr 6, 2017 at 23:29 | history | answered | Ilmari Karonen | CC BY-SA 3.0 |