dh <ul><li>Delete the letter the cursor is currently on and move left. </li></ul>
dl <ul><li>Delete the letter the cursor is currently on and move right. </li></ul>
diw <ul><li>Delete the current word. </li></ul>
dd <ul><li>Delete the current line. </li></ul>
D <ul><li>Delete to the end of the current line. </li></ul>
dip <ul><li>Delete the current paragraph. </li></ul>
dtq <ul><li>Delete to the next occurrence of the letter q. </li></ul>
Note: <ul><li>When you delete something in Vim it is like cut in other editors. What you delete is then available in the b...
yip <ul><li>“Yank” or copy the current paragraph to Vim’s buffer. </li></ul>
yy <ul><li>“Yank” or copy the current line to Vim’s buffer. </li></ul>
P <ul><li>Paste buffer contents before the current cursor position. </li></ul>
p <ul><li>Paste buffer contents after the current cursor position. </li></ul>
r <ul><li>Replace current character. </li></ul>
R <ul><li>Replace continuous characters starting at the current cursor position. </li></ul>
s <ul><li>Substitute the current character. </li></ul>
S <ul><li>Substitute the current line. </li></ul>
o <ul><li>Open a new line below the current line. </li></ul>
O <ul><li>Open a new line above the current line. </li></ul>
a <ul><li>Append text after the current position. </li></ul>
A <ul><li>Append text at the end of the current line. </li></ul>
i <ul><li>Insert text before the current position. </li></ul>
I <ul><li>Insert text at the start of the current line. </li></ul>
u <ul><li>Undo. </li></ul>
ctrl+r <ul><li>redo. </li></ul>
ctrl+p <ul><li>see autocomplete list. </li></ul>
shift+4 <ul><li>Move to end of current line. </li></ul>
shift+6 <ul><li>Move to start of current line. </li></ul>
ctrl+f <ul><li>Move Forward one screen.  </li></ul><ul><li>Think Page Down. </li></ul>
ctrl+b <ul><li>Move Backward one screen.  </li></ul><ul><li>Think Page Up. </li></ul>
ctrl+w <ul><li>Cycle focus between open Vim windows. </li></ul>
ctrl+wr <ul><li>Swap window positions. </li></ul>
ctrl+w= <ul><li>Equalize window widths. </li></ul>
gf <ul><li>Open the file that the cursor is currently on. </li></ul><ul><li>Think Go to File. </li></ul>
ctrl+wgf <ul><li>Open file at current cursor position in new tab. </li></ul>
/item return <ul><li>Search for the word item. </li></ul>
n <ul><li>Move forward to the next occurrence in a search. </li></ul>
N <ul><li>Move backward to the previous occurrence in a search. </li></ul>
:s/new/old/g <ul><li>Substitute the word “new” for the word “old” on the current line. </li></ul>
:%s/new/old/g <ul><li>Substitute the word “new” for the word “old” on the current document. </li></ul>
:sp <ul><li>Split the current window in order to view two parts of the same file simultaneously. </li></ul>
:pwd <ul><li>Print Working Directory. Lists the Vim’s current directory within the file system. </li></ul>
:cd <ul><li>Change Directory. Works just like in the terminal. </li></ul>
:e ~/path/file.name <ul><li>Edit the file name at the given path.  </li></ul><ul><li>When given for a file that does not e...
:Se ~/path/file.name <ul><li>Edit a file in a horizontally split window. </li></ul>
:Ve ~/path/file.name <ul><li>Edit a file in a vertically split window. </li></ul>
:w <ul><li>Write to file a.k.a Save. </li></ul>
:wq <ul><li>Write to file and quit. </li></ul>
Upcoming SlideShare
Loading in …5
×

Vim Cards - Powerpoint Format

2,035 views

Published on

Slide deck for memorizing the Vim commands that I've found most useful over my first few months as a Vim user.

This was purposefully kept free of any styling etc as this is the actual deck I use for memorization and don't like distractions.

Published in: Technology, Business
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,035
On SlideShare
0
From Embeds
0
Number of Embeds
43
Actions
Shares
0
Downloads
70
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Vim Cards - Powerpoint Format

  1. 2. dh <ul><li>Delete the letter the cursor is currently on and move left. </li></ul>
  2. 3. dl <ul><li>Delete the letter the cursor is currently on and move right. </li></ul>
  3. 4. diw <ul><li>Delete the current word. </li></ul>
  4. 5. dd <ul><li>Delete the current line. </li></ul>
  5. 6. D <ul><li>Delete to the end of the current line. </li></ul>
  6. 7. dip <ul><li>Delete the current paragraph. </li></ul>
  7. 8. dtq <ul><li>Delete to the next occurrence of the letter q. </li></ul>
  8. 9. Note: <ul><li>When you delete something in Vim it is like cut in other editors. What you delete is then available in the buffer to be pasted. </li></ul><ul><li>The buffer and your clipboard are not the same entity. To paste from the clipboard use ⌘v on OS X or on other systems use “+p or “*p </li></ul>
  9. 10. yip <ul><li>“Yank” or copy the current paragraph to Vim’s buffer. </li></ul>
  10. 11. yy <ul><li>“Yank” or copy the current line to Vim’s buffer. </li></ul>
  11. 12. P <ul><li>Paste buffer contents before the current cursor position. </li></ul>
  12. 13. p <ul><li>Paste buffer contents after the current cursor position. </li></ul>
  13. 14. r <ul><li>Replace current character. </li></ul>
  14. 15. R <ul><li>Replace continuous characters starting at the current cursor position. </li></ul>
  15. 16. s <ul><li>Substitute the current character. </li></ul>
  16. 17. S <ul><li>Substitute the current line. </li></ul>
  17. 18. o <ul><li>Open a new line below the current line. </li></ul>
  18. 19. O <ul><li>Open a new line above the current line. </li></ul>
  19. 20. a <ul><li>Append text after the current position. </li></ul>
  20. 21. A <ul><li>Append text at the end of the current line. </li></ul>
  21. 22. i <ul><li>Insert text before the current position. </li></ul>
  22. 23. I <ul><li>Insert text at the start of the current line. </li></ul>
  23. 24. u <ul><li>Undo. </li></ul>
  24. 25. ctrl+r <ul><li>redo. </li></ul>
  25. 26. ctrl+p <ul><li>see autocomplete list. </li></ul>
  26. 27. shift+4 <ul><li>Move to end of current line. </li></ul>
  27. 28. shift+6 <ul><li>Move to start of current line. </li></ul>
  28. 29. ctrl+f <ul><li>Move Forward one screen. </li></ul><ul><li>Think Page Down. </li></ul>
  29. 30. ctrl+b <ul><li>Move Backward one screen. </li></ul><ul><li>Think Page Up. </li></ul>
  30. 31. ctrl+w <ul><li>Cycle focus between open Vim windows. </li></ul>
  31. 32. ctrl+wr <ul><li>Swap window positions. </li></ul>
  32. 33. ctrl+w= <ul><li>Equalize window widths. </li></ul>
  33. 34. gf <ul><li>Open the file that the cursor is currently on. </li></ul><ul><li>Think Go to File. </li></ul>
  34. 35. ctrl+wgf <ul><li>Open file at current cursor position in new tab. </li></ul>
  35. 36. /item return <ul><li>Search for the word item. </li></ul>
  36. 37. n <ul><li>Move forward to the next occurrence in a search. </li></ul>
  37. 38. N <ul><li>Move backward to the previous occurrence in a search. </li></ul>
  38. 39. :s/new/old/g <ul><li>Substitute the word “new” for the word “old” on the current line. </li></ul>
  39. 40. :%s/new/old/g <ul><li>Substitute the word “new” for the word “old” on the current document. </li></ul>
  40. 41. :sp <ul><li>Split the current window in order to view two parts of the same file simultaneously. </li></ul>
  41. 42. :pwd <ul><li>Print Working Directory. Lists the Vim’s current directory within the file system. </li></ul>
  42. 43. :cd <ul><li>Change Directory. Works just like in the terminal. </li></ul>
  43. 44. :e ~/path/file.name <ul><li>Edit the file name at the given path. </li></ul><ul><li>When given for a file that does not exist yet it will be stored in the buffer and created when you Write. </li></ul>
  44. 45. :Se ~/path/file.name <ul><li>Edit a file in a horizontally split window. </li></ul>
  45. 46. :Ve ~/path/file.name <ul><li>Edit a file in a vertically split window. </li></ul>
  46. 47. :w <ul><li>Write to file a.k.a Save. </li></ul>
  47. 48. :wq <ul><li>Write to file and quit. </li></ul>

×