Translate

Some commands for vim

  1. delete a whole line: dd
  2. copy a line: yy
  3. paste: p
  4. copy a few lines: shift+v + y
  5. copy a few words: v + y
  6. undo: u
  7. redo: control+r
  8. replace A with B: :%s,A,B,g
  9. add a word in the beginning of each line: ctrl+v + shift+i + "words" + esc
  10. exit with saving: :wq
  11. exit without saving: :q!
  12. to the top line: gg
  13. to the end line: shift+g
  14. search a word: /"word" + enter
    1. next: n
    2. previous: shift+n
  15. to line 100: 100 + shift+g
  16. to the first of the line: 0
  17. to the end of the line: $
  18. enter replace mode: shift+r
  19. delete all lines: Esc+gg+dG

No comments:

Post a Comment