How to make a shortcut for moving between Vim windows?

Viewed 12358

Let’s say I have single Vim tab displaying 9 buffers (equally separated, like a 3×3 table).

Currently, to get from the top left window to the bottom right one, I have to press 3, Ctrl+W, J, and then 3, Ctrl+W, L. This is cumbersome, and I would like to just be able to press Ctrl+9 to go to the 9th window, and Ctrl+3 to go to the 3rd window, etc.

Is there any easy way I can map something like this in Vim?

6 Answers
Related