Chapter 15: Global Commands
Chapter Overview
Part IV: Patterns | Tips 96-101
The global command executes Ex commands on matching lines.
Tips in This Chapter
| Tip | Title | Mastered |
|---|---|---|
96 |
Meet the Global Command |
[ ] |
97 |
Delete Lines Containing a Pattern |
[ ] |
98 |
Collect TODO Items in a Register |
[ ] |
99 |
Alphabetize the Properties of Each Rule in a CSS File |
[ ] |
Global Command Syntax
:[range]g/{pattern}/[cmd]
Common Patterns
| Command | Effect |
|---|---|
|
Delete matching lines |
|
Delete non-matching lines |
|
Yank to register a |
|
Run macro on matches |
Commands Learned
| Command | Description | Notes |
|---|---|---|
Practice
Commands I tried while reading:
" (Add commands you practiced)
Questions
Things I want to explore further.
Chapter Complete
-
Read entire chapter
-
Tried all tips
-
Noted key learnings
Date completed: _