-1

I need to adjust vim to count in visual block mode. See this post for more info: I use Ctrl+a for my tmux binding (replaces Ctrl+b), and that is not going to change.

I tried everything here. Nothing seems to work. I think vim is taking my key combo, and still trying to run Ctrl+a. I need to completely make vim start using a different key combination for the same thing that Ctrl+a did.

nnoremap, noremap, vmap. Every time I try {visual block mode} + g + {new binding}. Nothing happens.

I tested outside of tmux btw.

Dave
  • 522
  • 4
  • 18

1 Answers1

0

If you're using the terminal, and not a GUI version of Vim, using Ctrl-I is going to be practically impossible. That's because Ctrl-I is Tab and the terminal cannot distinguish between those two key sequences. So when you're typing Ctrl-I, Vim is interpreting it as Tab and you're seeing unexpected behavior.

This isn't the case for most GUI environments, which can map keys independently. So this would work in gvim.

You're probably going to need to pick a different key sequence. Note that in a terminal, Ctrl-X, where X is a letter, is mapped to the ASCII sequence for that position in the alphabet. Ctrl-I is ASCII 9 (the ninth letter of the alphabet), which is Tab. So, you'll probably want to pick something that isn't assigned another meaning, and so avoid things like Ctrl-J and Ctrl-M.

bk2204
  • 3,571
  • 5
  • 9
  • Right, but mapping Ctrl-A to Ctrl-I is the same as mapping Ctrl-A to Tab, which already has a well-defined binding. – bk2204 Jul 04 '21 at 15:04