This happens sometimes when pressing alt-space on Mac. As the character is not
a space but displayed like one it can cause some problems.
\ ((getcmdtype() == ':' && getcmdpos() <= 2) ? 'q' : 'Q')
endif
+" Make sure xa0 (alt + space) is automatically changed to a normal whitespace
+" if pressed accidentally while in insert mode (happens on Mac sometimes).
+if has("mac")
+ imap <Char-0xa0> <Space>
+endif
+
" Disable Apple style movements in MacVim.
if has("gui_macvim")
let macvim_skip_cmd_opt_movement = 1