An Interest In:
Web News this Week
- March 12, 2024
- March 11, 2024
- March 10, 2024
- March 9, 2024
- March 8, 2024
- March 7, 2024
- March 6, 2024
March 29, 2022 02:37 am GMT
Original Link: https://dev.to/rstacruz/faster-multi-line-jumps-in-vscode-vim-18dk
Faster multi-line jumps in VSCode-Vim
One of the things that bothered me with VSCode-Vim was with how slow it was to use (number)(arrow)
(eg, 42(down)
) to move multiple lines down. In the screencast below, notice how it goes line-by-line rather than skipping ahead instantly.
Figure 1: VSCode scrolls slooowly line-by-line when pressing
42(down)
.
Solution: use j/k
TIL that VSCode-Vim already accounts for this with hjkl
movements, so 42(down)
can be pressed at 42j
.
Figure 2: Using j/k keys (eg,
3j
instead of3(down)
) hops to the target line instantly. I also did a trick to make this work with arrow keys (see below).
Making it work with arrow keys
To make this work with (up)
and (down)
arrow keys too, I rebound my arrow keys to j/k movements.
/* settings.json */{ "vim.normalModeKeyBindings": [ // Make "9j 9k" work faster { "before": ["Down"], "after": ["j"] }, { "before": ["Up"], "after": ["k"] },}
Original Link: https://dev.to/rstacruz/faster-multi-line-jumps-in-vscode-vim-18dk
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To