Vim - lshhhhh/note GitHub Wiki
gg # ๋งจ์๋ก ์ด๋
G # ๋งจ์๋๋ก ์ด๋
:15 # 15๋ฒ์งธ line์ผ๋ก ์ด๋
v + ํ์ดํ๋ก ์ง์ # block ์ง์
x # ์๋ผ๋ด๊ธฐ
y # ๋ณต์ฌํ๊ธฐ
yy # 1 line ๋ณต์ฌํ๊ธฐ
10 yy # 10 lines ๋ณต์ฌํ๊ธฐ
dd # 1 line ์๋ผ๋ด๊ธฐ
10 dd # 10 lines ์๋ผ๋ด๊ธฐ
p # ๋ถ์ฌ๋ฃ๊ธฐ
< (shift+,) # ํด๋น block ์ผ์ชฝ์ผ๋ก tab
> (shift+.) # ํด๋น block ์ค๋ฅธ์ชฝ์ผ๋ก tab
u # ์คํ์ทจ์ (๋ค๋ก)
ctrl+r # ์คํ์ทจ์๋ฅผ ์ทจ์ (์์ผ๋ก)
i # ์์ ๋ชจ๋
o # ์์ ๋ชจ๋ w/ new line
์์ ๋ชจ๋์์ ctrl+p # ์๋์์ฑ
shift+ํ์ดํ # ๋จ์ด๋งํผ ์ด๋
:set hlsearch # highlight search
/[๋ฌธ์์ด] # ๋ฌธ์์ด search
shift+3 # ์ปค์์ ์๋ ๋จ์ด highlight (search)
n # ์๋๋ก search
N # ์๋ก search
:nohl # highlight ์ ๊ฑฐ
:vsplit [file_path] # ํ๋ฉด ์ธ๋ก split (path ์
๋ ฅํ ๋ tab)
:vs [file_path] # ํ๋ฉด ์ธ๋ก split
:split [file_path] # ํ๋ฉด ๊ฐ๋ก split
ctrl+w+w # ์๋ฐฉํฅ ์ฐฝ ์ด๋
ctrl+shift+w+w # ์ญ๋ฐฉํฅ ์ฐฝ ์ด๋
:set number
:set nonumber
:set paste # ์์ ๋ชจ๋์์ ctrl+vํ ๋ ์๋ indent ์์
:set nopaste
:%s/[์ด์ ๋ฌธ์์ด]/[์ดํ๋ฌธ์์ด]/gc # replace w/ check
:%s/[์ด์ ๋ฌธ์์ด]/[์ดํ๋ฌธ์์ด] # replace w/o check
:%s/[๋ฌธ์์ด]/gn # word count
:w
:wq
:q!
:wq!
esc