Vim lessons
Practice
Moderate
10 min
Precise Deletion Techniques
Task Instructions
Master deletion commands for efficient text removal
Clean up the configuration file using appropriate deletion commands. Use 'x' for single characters, 'dw' for words, 'dd' for entire lines, and 'd0' or 'd$' for partial lines.
Learning objectives
- Master character and word deletion
- Learn line-based deletion commands
- Develop precise editing skills
Required keystrokes
Your submission is checked for these keystrokes, not just the final text — so reach for the technique, not a workaround.
- x Use x to delete characters
- d Use d with motions
Helpful commands
- x
- Delete character under cursor
- X
- Delete character before cursor
- dw
- Delete word
- dd
- Delete entire line
- d$
- Delete to end of line
- d0
- Delete to beginning of line
- D
- Delete to end of line (shortcut)
Stuck? Peek at a hint 3 hints · try it on your own first
- x deletes character under cursor, X deletes before cursor
- dw deletes to start of next word, de deletes to end of current word
- dd deletes entire line, D deletes from cursor to end of line
# Configuration File Cleanup Task
# Database Settings
host = = "localhost" # DELETE: extra =
port = 5432;
# Cache Configuration
cache_enabled = true
cache_sizze = 1024 # DELETE: extra 'z' in sizze
cache_ttl = 3600 # DELETE: leading spaces
# # Logging Settings # DELETE: extra #
log_level = "debug"
log_file = "/var/log/app.log"
log_rotation = "daily"y # DELETE: trailing 'y'
# Performance
max_connections = = 100 # DELETE: extra =
connection_timeout = 30
# DELETE this entire line
thread_pool_size = 10
Use x, X, dw, dd, d$ to clean up this configuration.