Great VI Commands Cheat Sheet

vi commands cheat sheetVi Commands cheat sheet will be your ultimate guide and you need to make sure that you remember and make notes of it. If you want to know Vi editor or Vi commands in general, cheat sheet will be your help.

You can also check our computer cheat sheets to improve your skills.

Vi Cheat: Basic Information

  • cheat sheet htmlI – Inserts the text at beginning of text line and not on the beginning column of vi screen
  • a – Appends to end of right of cursor
  • A – Appends at end of current line
  • – Starts a new line below current line
  • – Drops current line and starts a new one in its place

For Vi replace, here is another Vi cheat that you should know.

  • cw – Vi replace the single word from current cursor position. In replacing the whole word, put the cursor on th 1st character of word.
  • c$ – replace current line; however, it does not extend in changing rest of the wrapped sentence on screen
  • r – Vi Replace the character under cursor
  • R – Replaced text on same line until Esc is pressed; however, it does not change the text on next line. What it does it that it pushes to ahead of current changes.

For Vi cheat sheets in Vi delete, here are details to help you

  • x – Deletes the single character under cursor
  • X – Deletes the single character before cursor
  • dw – Deletes the single word that is currently under cursor
  • dd –delete line, regardless of cursors position in the line
  • D – Deletes all the text from cursor position to end of line
  • dL – Deletes all the text from cursor position to end of screen
  • dG – Deletes all the text from cursor to EOF
  • d^ – Deletes all the text from beginning of line to cursor

For Vi commands copy & paste, here are the codes and details that important to know:

  • yy – Vi copy line – copies the line of the text to buffer that is unnamed
  • 3yy – In here, it will copy the 3 lines of rhw text to the buffer that is unnamed
  • yw – It will copy the word (under cursor) to the buffer that is unnamed
  • 3yw – Copies three words to unnamed buffer
  • P – It will paste the contents of the buffer that is unnamed to right of cursor
  • p – It will paste the contents of the buffer that is unnamed to left of cursor

Navigation with file: Vi Cheat Sheets

  • H – This is left arrow and it is easy to remember because it is the leftmost key in the 4 key set
  • J – Use this for down arrow
  • K – This is up arrow
  • L – Use this for right arrow

Vi page down

  • Ctrl+F – Vi page down and moves forward the page
  • Ctrl+D – Moves forward half of the page

Vi Page Up

  • Ctrl+B – Vi page up and moves back the page
  • Ctrl+U – Moves backward of the half-page

Named and Unnamed Buffers

  • “ayy – Pulls the line of named buffer
  • “Ayy – Appends current line to buffer
  • “A3yy – Pulls 3 lines from current cursor position as well as appends lines to A buffer
  • “ap – Pastes buffer to right of cursor

If you are asking how to do a cheat, it is easy. You just combine all the information with the codes and organize it. After that, you already have the cheat sheet you want that will guide you.

Finally, do not forget to check out some IT cheat sheet tips to help you on what you still need to know. It gives you ideas on what you do and what you consider.

Use our VI commands cheat sheet today!

Download as PDF

Next Post

Previous Post

© 2021 My Cheat Sheet

Theme by Anders Norén