Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

Latest commit

 

History

History
59 lines (46 loc) · 1.66 KB

README.md

File metadata and controls

59 lines (46 loc) · 1.66 KB

Vim

Return to top README.md

Install Vim on Linux

Commands to install Vim to be used within the terminal

sudo apt update
sudo apt install vim

Vim on VSCode

If you use VSCode you can also use Vim via the Vim extension, and you can learn Vim via the Learn Vim extension. The Learn Vim book, and reference of Vim commands.

Guide on how to customize Vim keybindings within VSCode.

Vim Commands

Normal Mode

  • Get into command mode: esc
  • Enter Insert mode: i
  • Enter Insert mode one character ahead: a
  • Enter Visual mode: v
  • Enter Command mode: :
  • Moving the cursor
    • Move up: k
    • Move down: j
    • Move left: h
    • Move right: l
  • New line
    • Below and enter insert mode: o
    • Above and enter insert mode: O
  • Search and replace
  • Copy and paste guide
    • Copy
      • Everything to the right: y$
      • (Almost) everything to the left: y^
      • Entire line: yy
      • Word with its trailing whitespace: yaw
      • Word without its trailing whitespace: yiw
      • yfx
      • ytx
    • Paste
      • P
      • "0p paste last yanked string, instead of paste last cut string
    • Cut
      • Current line: dd
      • Everything to the right: d$

Visual Mode

This is the mode used to highlight text, guide.

  • Highlight current word: viw