0

I recently changed from using vim on a linux-based system to OS X, and am having trouble with some of the keybindings. Note that i am not using macvim, just the regular command line vim. i have tried this in both Terminal.app and iTerm2.app with the same results:

The keybindings for moving forward or back a word, (w, e, b, etc.) don't work. the result of pressing any of these keys in normal mode is just a terminal bell. i also have a couple of mappings in my vimrc file, to switch between tabs using M-right and M-left, neither of which function any longer.

my left option key is set to act as meta/Esc+. in bash, left-option-key indeed functions correctly and i can jump around by word (using bash shortcuts). so this seems to be limited to vim.

i have googled around and it doesn't seem like others have this problem. i wondered if it might be an error in my vimrc file, but since even the built-in w, e, b etc. movements don't work, that doesn't seem to be it. this question looks similar, but is unanswered. i find it hard to believe that everyone who uses os x and vim doesn't use any of these bindings? maybe everyone just uses macvim?

TIA for any advice!

Community
  • 1
  • 1
jessykate
  • 255
  • 1
  • 12
  • 2
    Hi, Jessy. Just to be sure it's not a problem with your `.vimrc`, try running `$vim -u NONE` and see what happens. – David Cain Aug 16 '12 at 08:14
  • Also, I use the standard terminal Vim when on Mac OS X, and I do not have this problem. – David Cain Aug 16 '12 at 08:16
  • ah! thanks @david! that fixes the w,e,b keys - so i guess it is two compounded issues (vimrc + option key bindings). it doesn't fix the meta key option though, which i gather might be a more general problem? – jessykate Aug 16 '12 at 08:18
  • As for the special bindings, I think you can expect some trouble replicating this on Mac OS X (I'd solicit the advice of someone more qualified than me, though). But now you know the trouble with standard motions is definitely somewhere in your `.vimrc`. – David Cain Aug 16 '12 at 08:21
  • 2
    thanks. FWIW it looks like it was a keybinding i had set in my vimrc, related to a plugin i hadn't ported over to os x. duh, i should have looked there to begin. too bad i can't mark a comment as "correct"! – jessykate Aug 16 '12 at 08:25

0 Answers0