A collection of Vim tools that I keep forgetting. Many of these are focused on VSCodeVim. Not meant to be exhaustive.
As defined for VSCodeVim, multi cursor mode can be accessed from normal mode via gb
. There is also a cmd/ctrl-d
keybinding.
Vim can have split windows to view two or more files at once. These bindings work well in VS Code as well.
Ctrl
+ws
- split windowCtrl
+ww
- switch windowsCtrl
+wq
- quit a windowCtrl
+wv
- split window verticallyCtrl
+w<hjkl nav key>
- move cursor to another window
This can also be used to get rid of the "modified" state in VS Code.
:e!
or
:edit!
There are common combo commands made up of up to three parts which are composed like a phrase.
- Action (optional for
t
orf
selections)
c
Changed
Deletev
Visual select
- Selection
- (none) [word/paragraph movement type]
i
in [bracket/quote type]a
around [bracket/quote type]t
to [character type]T
backwards to [character type]f
to (including the selector) [character type]F
backwards to (including the selector) [character type]
- Selector
- Word or paragraph type (e.g.
w
,e
,b
) - Bracket or quote type (e.g.
[
,"
) - Character (e.g.
a
,;
)
The t
and f
navigation commands (including their backwards equivalents) can be repeated
;
repeat forward,
repeat backward
From Vim Tips Wiki
- Paste from normal mode:
ciw Ctrl-R 0 Esc
- Paste via visual mode:
viwp
repeated withviw"0p
Just using the J
command will include a space between the two lines you are joining. Use gJ
to join without a space though the indentation from the previous line is not removed.
JS Bin supports Vim keybindings in their editor. This is great for debugging issues.
Note: At last check the new editor did not.