How do I jump to the next unmatched closing parenthesis?
Answer
])
Explanation
The ]) command moves forward to the next unmatched ). This is useful for navigating out of nested parenthesized expressions.
How it works
])skips matched pairs of()- Stops at the first
)that does not have a matching( - Works across multiple lines
Example
if (a && (b || c)) {
With the cursor on a, pressing ]) jumps to the last ) (the one that closes the outer if).
Tips
[(jumps backward to the next unmatched(]}and[{do the same for curly braces- These are invaluable for navigating deeply nested code
- Accepts a count:
2])finds the second unmatched)