Home
VIM/NVIM Commands for Reference
In this post, I will capture all the common commands I use often so that I do not have to do google search every-time I want to type something in NVIM
General Commands
- To delete a line -
dd
- To delete a word -
dw
- To delete from cursor to end of line -
d$
- To move the cursor to particular line number -
:n
where n can be any number - To copy (yank) multiple characters based on selection
- Go to visual mode by
v
- Move your cursor to select the characters/lines
- To copy the selected lines
y
. This will only copy to VIM’s clipboard.
- Go to visual mode by
- To delete multiple characters (or lines) based on selection
- Go to visual mode by
v
- Move your cursor to select the characters/lines
- To delete the selected lines
d
- Go to visual mode by
- To paste the copied (yanked) text -
p
- To go to the end of line -
$
- To go to the beginning of line -
^
- To move one word at a time -
w
- To delete a single character -
x
- To go to the corresponding closing bracket (you need cursor to be on top of opening bracket) -
%
NERDTree Plugin
- To cycle through the different panes -
Ctrl + w + w