- delete a whole line: dd
- copy a line: yy
- paste: p
- copy a few lines: shift+v + y
- copy a few words: v + y
- undo: u
- redo: control+r
- replace A with B: :%s,A,B,g
- add a word in the beginning of each line: ctrl+v + shift+i + "words" + esc
- exit with saving: :wq
- exit without saving: :q!
- to the top line: gg
- to the end line: shift+g
- search a word: /"word" + enter
- next: n
- previous: shift+n
- to line 100: 100 + shift+g
- to the first of the line: 0
- to the end of the line: $
- enter replace mode: shift+r
- delete all lines: Esc+gg+dG
Translate
Some commands for vim
Subscribe to:
Post Comments (Atom)
-
ps aux | grep python kill -9 <PID>
-
1. CDN setting: 加速域名:指用CDN加速的那个域名 CNAME:为CDN的域名,将加速域名映射到CDN域名 源站:为CDN从哪个源取资源 * DNS: CNAME: 把...
-
Issue: libstdc++.so.6: version `GLIBCXX_3.4.29' not found Solution: sudo add-apt-repository ppa:ubuntu-toolchain-r/test # Ignore if not...
No comments:
Post a Comment