user3025492
user3025492

Reputation: 3053

How can I remap a quick successive double press of the A key to function as a single press of the B key in any mode?

I've tried nnoremap aa b in my .vimrc but it doesn't work. I want this to work in all modes (line mode, normal mode, and insert mode.)

Upvotes: 4

Views: 1902

Answers (1)

Ben Klein
Ben Klein

Reputation: 1959

I don’t know that you can do this with a single mapping (although that would probably be lovely), but the following series of three mode-specific mappings should do it:

nnoremap aa b
inoremap aa b
vnoremap aa b

Upvotes: 3

Related Questions