Home Vim basic
Post
Cancel

Vim basic

Vim Key Maps: A Beginner’s Guide

Vim is a powerful text editor that has been around for decades. While it may seem overwhelming at first, once you learn a few basic key maps, you’ll find that Vim is a highly efficient and customizable tool for editing text.

Here is a list of some of the most commonly used key maps in Vim:

  • h: Move cursor one character to the left
  • j: Move cursor one character down
  • k: Move cursor one character up
  • l: Move cursor one character to the right
  • w: Move cursor to the start of the next word
  • b: Move cursor to the start of the previous word
  • 0 (zero): Move cursor to the start of the line
  • $: Move cursor to the end of the line
  • G: Move cursor to the last line of the file
  • gg: Move cursor to the first line of the file
  • :<line number>: Move cursor to a specific line number

Insert Mode

  • i: Enter insert mode at cursor position
  • I: Enter insert mode at the start of the line
  • a: Enter insert mode after cursor position
  • A: Enter insert mode at the end of the line
  • o: Open a new line below the cursor and enter insert mode
  • O: Open a new line above the cursor and enter insert mode
  • Esc: Exit insert mode

Deleting Text

  • x: Delete the character under the cursor
  • dd: Delete the current line
  • dw: Delete from the cursor to the end of the current word
  • db: Delete from the cursor to the start of the previous word
  • d$: Delete from the cursor to the end of the line
  • d0: Delete from the cursor to the start of the line

Visual Mode

  • v: Enter visual mode
This post is licensed under CC BY 4.0 by the author.

Upgrade Samsung NVMe Firmware on Unraid

Script to Delete User Profiles with PowerShell GUI

Comments powered by Disqus.