Basic
https://www.youtube.com/watch?v=MRXwUUvqLBY&t=218s
Install
Dependencies
node, python, clangd, yapf, pylint, tslint
Neovim
google.com
Vim-plug
google.com
Where will we put these configs
~/.configs
clone this repo here
Extensions should be install
Change mode
i
to toggle insert mode: We can type, insert text to cursor's position.<ESC>
to toggle normal mode: type command, shortcut key,..v
change to visual mode. In this mode, you can select text segment for copying, cut, comment,.. All moving shortkey can use in this mode.
Basic moving
h
j
k
l
for moving cursor to left, down, up right
k
|
h--------l
|
j
Xh
,Xj
,Xk
,Xl
for moving cursor to left, down, up, right X units (X is a number) e.g5j
w
for moving cursor to begin of next wordXw
similar aboveb
for moving cursor to begin of previous wordXb
similar above
Delete
dd
for delete curent linedXd
similar above
Create blank line
o
for create new blank line below,O
for create new line above (o upper and lowercase)Xo
sligtly different, you can try this to see the change
Undo redo
u
for undo,<C-r>
for redo ( mean Ctrl + r)
Home, end, pageup, page down
gg
for going to the beginning of fileXgg
for go to line XG
for ....end of file<C-u>
likepage up
key<C-d>
likepage down
key0
for go to beginning of line$
for go to end of line
Copy, cut, paste
"+y
copy to clipboard (Press key"
then+
theny
). Use this after select text in visual mode"+d
cut to clipboard. Use this after select text in visual mode"+p
paste to clipboardy
just copy. Use after select textd
just cut (maybe use as deleting). Use after select textp
paste fromy
ord
Buffer
File was open under buffer in vim.
Split window
:vs
split horizontal:sp
split vertical<C-h>
<C-j>
<C-k>
<C-l>
moving left, down, up, right buffer
Vimawesome
You can find all vim extension here
Plugins:
Nerdtree
Coc.nvim
Folding
zc
close the foldzM
close all fold on current bufferzo
open the foldzR
open all folds on current bufferzj
cursor is moved to next foldzk
cursor is moved to previous fold