https://www.jianshu.com/p/04a6517869b4
vim: vim into the editor, if followed by the file name, then enter the edit mode of the file, Figure:
①.vim editor, press i
to enter edit mode;
. ② Press Esc
back locking mode;
③ locked mode press. :
into command mode;
. ④ command mode input quit
exit without saving write
save without exiting the wq
save and exit
Simple to use vim editor
-
Quickly navigate to the beginning of the current paragraph:
{
; -
Quickly locate the end of the current paragraph:
}
; -
Copy a piece of text, and paste: Copy:
y(yank)
;p(paster)
Paste: ; -
Delete lines: Delete
dd
, Delete N line: the line where the cursor is inputNdd
, delete the line where the cursor includes three lines or less; -
Fast page: next page:
ctrl+b
the next page:ctrl+f
on half a page turn:ctrl+u
, scroll down half actrl+d
page: ; -
Find a string: Find the first occurrence of the string place:
/
+字符串
, then press Enter;
to find a place last occurrence of the string:?
+字符串
, then press Enter; -
Other:
1. Move the cursor:k
: a;j
: lower;h
: Left;l
: Right;
2. Move multiple lines:nk
: n moved upwardly line;nh
: n mobile left column;j
andl
the like;
3. the verygg
beginning: ;
4. to the lastshift+g
line: ;
5. delete indent and indent: indent:shift+>+>
deleteshift+<+<
indent: ;