Module Review: Advanced Editing
[!NOTE] This module explores the core principles of Module Review: Advanced Editing, deriving solutions from first principles and hardware constraints to build world-class, production-ready expertise.
1. Key Takeaways
- Visual Modes: Use
vfor characters,Vfor lines, andCtrl-vfor rectangular blocks. - Block Editing:
Ctrl-vallows you to insert (I) or append (A) text on multiple lines simultaneously. - Registers: Vim has many clipboards.
""is the default."0holds your last yank (copy)."1-"9hold your last deletes."a-"zare for you. - Macros: Record (
q{reg}) a sequence of commands to automate repetitive tasks. Replay with@{reg}. - Automation: Use relative motions (
w,f,$) in macros to make them robust against varying line lengths.
2. Interactive Flashcards
Test your memory of the commands learned in this module.
Loading...
(Click card or press Space to flip)
1 / 5
3. Cheat Sheet
Visual Mode
| Command | Action |
|---|---|
v |
Character-wise selection. |
V |
Line-wise selection. |
Ctrl-v |
Block-wise selection. |
gv |
Re-select previous selection. |
o |
Move to other end of selection. |
~ |
Toggle case. |
I (Block) |
Insert on multiple lines. |
A (Block) |
Append to multiple lines. |
Registers
| Command | Action |
|---|---|
"" |
Unnamed register (default). |
"0 |
Yank register (copy history). |
"1-"9 |
Delete history. |
"a-"z |
Named registers. |
"+ / "* |
System clipboard. |
"_ |
Black hole register. |
:reg |
Show registers. |
Ctrl-r {reg} |
Paste in Insert mode. |
Macros
| Command | Action |
|---|---|
q{reg} |
Start recording to register. |
q |
Stop recording. |
@{reg} |
Replay macro. |
@@ |
Replay last macro. |
:norm @{reg} |
Run macro on selected lines. |
4. Next Steps
Now that you can manipulate text like a wizard, it’s time to master your environment. Proceed to Workspace Management to learn about Splits, Tabs, and Buffer management.