Search code examples
vimvim-pluginkeymapping

Vim keyboard shortcuts changed, how to revert to normal?


I used to use ctrl+left/right to navigate between words (I know I'm supposed to use b/e etc in vim, but...). But starting today, ctrl+left/right deletes the next 4 lines! I tried disabling my plugins one by one, but it didn't help. I also have triple checked my vimrc file -- nothing there.

Where else are vim key mappings defined? Is there any plugin that can cause this behaviour? The only recent change that I have made has been changing my colour scheme to Solarized.

Thanks

Edit: I found the cause. It's a line I have added to .bashrc to have 256 colors. The line is export TERM="screen-256color-bce" . I still don't know how to correct it (aside from removing the line)


Solution

  • The problem was because of a line I have added to .bashrc to have 256 colors in vim. The line is export TERM="screen-256color-bce". I removed that line and instead added set t_Co=256 to .vimrc before setting colorscheme. Now vim uses 256 colors and the key mappings work properly.