0

Using iTerm 2 on OS x 10.14.

I've set the natural text editing for my key-bindings.

In the ZSH shell the key bindings works fine. For example, I use option + → to skip a word. However, when using vim, none of my key bindings work as expected.

How would I ensure the keybinding work in vim on my local machine, and when I ssh to other machines.

It feels like VIM is not adhering to the key mappings made in my iTerm profile.

Kevin C
  • 4,851
  • 8
  • 30
  • 64
  • 1
    Why do you expect bindings for another application to work in vim? Are you expecting for iterm to map `option+` to something that terminal applications can understand? – davidlowryduda Mar 17 '19 at 19:38
  • I thought vim would honour those settings. And yes, I'd prefer it that way. – Kevin C Mar 17 '19 at 19:42
  • 1
    Vim just reads keypresses and responds to them. You can configure vim (and even make it so that `option+` will skip forward a word if you want), but this is a completely different sort of configuration than iterm2 bindings. – davidlowryduda Mar 17 '19 at 19:51
  • So I should either learn VIM’s syntax by heart. Or set a .vimrc at every server I SSH into, including placing the .vimrc at the root user’s home dir... – Kevin C Mar 17 '19 at 20:18
  • 1
    Or use your local vim to ssh anywhere. Or declare a particular vimrc to use when accessing a file as root. Or use a different text editor that better suits your wants. – davidlowryduda Mar 17 '19 at 20:22
  • 1
    I'd advise against square pegs in Vim's round holes. Either learn [the Vim way](https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118), or use another editor whose philosophy you are not fighting; trying to get Vim to be like other editors generally results in a clunky and subpar editor with few benefits and most of the downsides of Vim. – Amadan Mar 18 '19 at 02:18

0 Answers0