WEIGEL FORUM
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login

    Vi / VIM Cheat Sheet

    Linux
    1
    2
    20
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DerMeldosD
      DerMeldos
      last edited by DerMeldos

      VI Shortcuts:

      vi <filename> — Open or edit a file.
      i — Switch to Insert mode.
      Esc — Switch to Command mode.
      :w — Save and continue editing.
      :w <filename> — saves file and made changes to a new file // this will perform a "save as" operation
      :wq or ZZ — Save and quit/exit vi.
      :q! — Quit vi and do not save changes.
      yy — Yank (copy) a line of text.
      p — Paste a line of yanked text below the current line.
      o — Open a new line under the current line.
      O — Open a new line above the current line.
      A — Append to the end of the line.
      a — Append after the cursor’s current position.
      I — Insert text at the beginning of the current line.
      b — Go to the beginning of the word.
      e — Go to the end of the word.
      x — Delete a single character.
      dd — Delete an entire line.
      Xdd — Delete X number of lines.
      Xyy — Yank X number of lines.
      G — Go to the last line in a file.
      XG — Go to line X in a file.
      gg — Go to the first line in a file.
      :num — Display the current line’s line number.
      h — Move left one character.
      j — Move down one line.
      k — Move up one line.
      l — Move right one character.
      

      72cf88e6-b894-4954-a4cd-ad31890395c0-image.png

      3e1d8af2-72c3-4aea-80a4-45b471d4e309-image.png

      DerMeldosD 1 Reply Last reply Reply Quote 0
      • DerMeldosD
        DerMeldos @DerMeldos
        last edited by

        https://vim.rtorr.com for more details

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB | Contributors