The [ and ] Family
[ goes back, ] goes forward. The semantic siblings of search.
[ and ] form a paired-prefix family for navigating semantically: previous/next bracket, function, comment, change, spelling error, etc. Mostly used in code.
The [ and ] Family
The bracket-prefix family is symmetric: [ always means "backward," ] always means "forward." The second key picks the thing to look for. [c = previous diff hunk; ]c = next diff hunk. [m = previous method start; ]m = next.
Reference
| Key | Action |
|---|---|
| [( / ]) | Previous / next unmatched ( |
| [{ / ]} | Previous / next unmatched { |
| [m / ]m | Previous / next method start |
| [M / ]M | Previous / next method end |
| [c / ]c | Previous / next diff change |
| [s / ]s | Previous / next spelling error |
| [I | List occurrences of keyword under cursor |
| [p / ]p | Put before / after, adjusting indent |
| [# / ]# | Previous / next preprocessor directive |
Watch
- ๐บ #0317 [( ]) Unmatched Parens (not yet published)
- ๐บ #0333 [f ]f Go to File (not yet published)
See also: The {key:g} Family, Match Bracket