Question

I wonder if it is possible to change the colon key to activate the command line mode? I don't know if this will be useful or not but I think it is worth trying. Because typing colon key in my keyboard requires the movement of two little fingers in both hands.

Was it helpful?

Solution

You can indeed.

I have this in my .vimrc; it swaps : with ;, which means that I can activate command line mode with a single keystroke:

nnoremap ; :
nnoremap : ;

You could of course substitute any key you like (and that you don’t mind remapping — if it’s already assigned to a command, ideally it’s not to a command that you use very often) for ;.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top