Advertisement
thesuhu

Vim Command

Oct 11th, 2020 (edited)
1,131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.74 KB | None | 0 0
  1. # hapus all line
  2. # go to first line, tekan ESC
  3. gg
  4. # kemudian
  5. dG
  6. # bisa juga replace dengan file kosong
  7. cat /dev/null > file
  8.  
  9. # pencarian text, ketik / diikuti kata yang dicari
  10. # jump to first
  11. ggn
  12. # jump to the last
  13. GN
  14.  
  15. # To turn off highlighting until the next search
  16. :noh
  17. # Or turn off highlighting completely
  18. set nohlsearch
  19. # To clear the last used search pattern
  20. :let @/ = ""
  21.  
  22. # delete line
  23. dd
  24. # begin character-based visual selection
  25. v
  26. # select whole lines
  27. V
  28. # delete
  29. d
  30. # copy
  31. y
  32. # paste after cursor
  33. p
  34. # paste before cursor
  35. P
  36. # undo
  37. :u # or u in visual
  38. # redo
  39. CTRL+R
  40.  
  41. # select line and paste
  42. v # to select text
  43. d # to cut or y to copy
  44. # go to line where to paste
  45. p # to paste
  46.  
  47. gg=G # indent from top
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement