码农必备技能

vim 使用:

Navigating: 

%: Jump to matching bracket
>: Indent
<: de-indent
=: Properly Indent
=+G: Format code
~: Change case of character
>+%: Indent block

Navigating words: web, WEB
Navigating lines: $, 0, ^,g_,-,+,<return>
Navigating sentences and paragraphs: {,}, (braces), (,), (parantheses)
Navigaring screen: H, L, M, ctrl+e, ctrl+y
Navigating large file: gg, G, ctrl+b, ctrl+f, ctrl+u, ctrl+d, z+<return>, z+., z+

Editing:

Inserting and appending : i, a, I, A,o, O,
Undo and redo: u, U, ctrl+r
U: undo an entire line.
Replacing text: r, R, ~, c, C, cw,
Delete: x, X, dd, d, .
Cutting and pasting: d, p, P, y, Y

Text object:
Delete a word : daw, diw, ciw, caw
Dis, das, dip, da

Searching:

Searching characters: f, F, t, T, ;, ,
Searching words: /, ?, n, N, #, *

Multiple window:

:vs
:sp

Ctrl+ww, Ctrl+ww
, Ctrl+wj
, Ctrl+wk
, Ctrl+wl
, Ctrl+wh

Vertical increase ctrl +w + +
Horisotal increase: ctrl+w + >

猜你喜欢

转载自www.cnblogs.com/masonl/p/12443780.html