Mission 46 / 52• Text Objects - Mega Review
Text Objects Mega Review
Congratulations on reaching the text objects milestone! You now command Vim's most potent editing primitives.
Let's review the complete grammar: `[operator: d, c, y] + [target: i, a] + [object: {, (, ", w, p]`.
Mega Review Cheat Sheet
- ci{ / di{change / delete inside curly braces
- ci" / di"change / delete inside quotation marks
- ciw / dawchange / delete words and spacing
- cip / dapchange / delete code blocks and paragraphs
Press Enter to start
1function authenticateUser(token, options = {}) {2 const secret = "default-secret-key";3 const isValid = verifyToken(token, secret);4 return isValid;5}Use `ci"` on `secret` to update the key. Use `ci(` on `options` to change parameters. Use `ciw` to rename `isValid`.
Now it's your turn!
0 / 13 tasks complete0.0s / 82s par0 / 140 par
Practice this lesson's commands. Each task checks your technique and the result, not just your cursor position. Take your time.
Task 1: Replace "placeholder" with getMessage() using ca". Return to normal mode.
Expected result
const message = getMessage();
Show hint
Use ca", type getMessage(), then Escape.
Press Enter to start
1const message = "placeholder";jkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next