daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Aug 12th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Navigation Keys - These are used in command mode:
  2. $           Move to end of line
  3. ^       Move to beginning of line
  4.   Save and Quit Commands - These are used in lastline mode:
  5. :w          Write buffer (Save changes and continue working in vi Editor)
  6. :w new_filename     Write buffer to new filename (continue working in vi)
  7. :wq             Write buffer (save changes) and quit vi
  8. :q!             Quit without saving changes
  9. :wq!            Write buffer (save changes) and quit vi
  10.                 (The ! will override Read only permissions but only if you are the owner of the file.)
  11.  
  12. Basic Text Deletion Commands  - These are used in command mode:
  13. x           Delete character at the cursor
  14. dw          Delete word (or part of word to right of cursor)
  15. 3dw             Delete three words
  16. dd          Delete line containing the cursor
  17. 3dd         Delete three lines
  18.  
  19. Undo and Change Commands - These are used in command mode:
  20. r           Replace character at cursor with one other character
  21. u           Undo previous command
  22.  
  23. Copy and Paste Text - These are used in command mode:
  24. yy          Yank a copy of this line and place in the clipboard
  25. yy 3            Yank a copy of next 3 lines and place them in the clipboard
  26. yw          Yank a copy of this word and place in the clipboard
  27. yw 3            Yank a copy of next 3 words and place them in the clipboard
  28. p           Put (paste) yanked or deleted line below current line
  29. P (upper case)  Put (paste) yanked or deleted line above current line
  30.  
  31. Basic Search Commands- These are used in lastline mode:
  32. G (upper case)  Go to last line of file
  33. H (upper case)  Go to top line of file
  34. :21             Go to line 21
  35. /string         Search forward for this string of text
  36. ?string         Search backward for this string of text
  37. n           Find next occurrence of this string of text
  38.  
  39. Session Customizing Commands
  40. :set nu         Show line numbers
  41. :set nonu       Hide line numbers
  42. :set showmode   Display current mode of operation
  43. :set noshowmode     Turn off mode display
  44. :set            Display all vi variables set
  45. :set all        Display all possible vi variables and their current
RAW Paste Data
Top