- 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)
-
libGL.so.1: cannot open shared object file: No such file or directory solution: pip uninstall opencv-python pip install opencv-pyt...
-
install docker: curl -fsSL https://test.docker.com -o test-docker.sh sudo sh test-docker.sh list the containers: docker ps list all the ...
-
Issue: ValueError: SHA could not be resolved, git returned: b'' Solution: git status git config --global --add safe....
No comments:
Post a Comment