Maybe "mishandled" is the wrong word, but when iTerm is configured to send escape sequences for certain key-combinations (e.g. Shift-Space), I can use them to map keys in vim, but when I'm at the command line, in Bash, the characters following the CSI ( ^[[ ) aren't escaped. Maybe I need add to add something to my bashrc telling the shell how to handle such escape sequences?
For example, I followed the ideas in the libtermkey specification (
http://www.leonerd.org.uk/hacks/fixterms/) and configured iTerm to send ^[[32;2u when Shift-Space is typed. In my vimrc I have these lines:
set <F13>=^[[32;2u
map <F13> <S-Space>
map! <F13> <S-Space>
which allows me to do,
map <S-Space> :buffers<CR>
Now, when I'm in Vim, typing Shift-Space causes the list of buffers to display, as I intended. Outside of Vim, however, if I type Shift-Space at the command line, I see
Is there a way I can have my cake and eat it too?