Screen Too Small

This course material requires a larger screen to properly display the terminal and editor interfaces.

Please use a tablet, laptop, or desktop computer for the best learning experience.

You can continue browsing, but the experience will be significantly limited.

Practice Beginner 10 min

Visual Block Magic

Visual Mode: The Art of Selection

Task Instructions

Use visual block mode to efficiently refactor multiple variable names at once

Use visual block mode to select text across multiple lines in a column. Position your cursor at the start of the text you want to select, press Ctrl+v to enter visual block mode, then use j/k to move down/up and h/l to extend the selection. Press c to change the selected block.

Learning objectives

  • Master visual block mode (Ctrl+v)
  • Understand multi-line column selections
  • Practice extending selections in block mode
  • Learn to change multiple lines simultaneously

Required keystrokes

Your submission is checked for these keystrokes, not just the final text — so reach for the technique, not a workaround.

  • <C-v> Use visual block mode
  • c Change the selected block

Helpful commands

Ctrl+v
Start visual block mode
j/k
Move down/up in block mode
h/l
Extend selection left/right
I
Insert at beginning of block
A
Append at end of block
c
Change selected block
Stuck? Peek at a hint 3 hints · try it on your own first
  • Position cursor at start of 'mr_whiskers_database', press Ctrl+v
  • Move down 4 lines with 4j, extend right to select the text
  • Press c to change the selected block

Premium Course

This is a premium course available exclusively to paid members.

Upgrade your membership to access this course and all premium content on the platform.

Upgrade to Premium

Access all premium courses

Unlimited lesson submissions

Track your progress

visual-block-magic.txt

1" Read the task on the left.

2" A live Vim editor opens right here.

3" Finish the edits, then submit.

~

~

NORMAL 1,1   All

Ready to practice?

Take your time with the task — start whenever you're set.

Start Lesson