2

I'm on Mac OS X 10.9 using Vim 7.4 and I'm looking to find a way to map the key combination behavior "option + delete" to delete a word backwards. Currently, this works on every app in the OS, except when running Vim in the terminal. "control + W" works in Vim and some apps but not in all of the ones I use.

Any help?

Regards.

2 Answers 2

0

Check out the vim wiki page on mapping to learn more than you ever wanted to know about how to map keys in vim. To preserve your key mappings, open (or create) a .vimrc file in your home directory.

-1

This works for me, but I use iTerm2:

inoremap <A-Backspace> <C-w>
cnoremap <A-Backspace> <C-w>

I have a note near that in my config file that says Terminal doesn't allow you to map delete combinations; but since I haven't used the default Terminal in quite a long time I don't know if that's true anymore.

3
  • That goes into your .vimrc? I'm trying this in iTerm2, but still doesn't work. Do you have your "option" key as a meta?
    – mnemonicj
    Dec 18, 2013 at 4:29
  • Yes, it goes in .vimrc; and yes, I have Option as meta. Dec 18, 2013 at 14:04
  • Still not working. I forgot to mention that I'm using a Macbook, and it only has a single delete key unlike the normal Apple keyboard.
    – mnemonicj
    Dec 20, 2013 at 17:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .