Skip to content

Motion to jump between ends of open-to-close block #406

Description

@bootleq

Is your feature request related to a problem? Please describe.

Take below vim script code as example, we can use ]% to jump to endif, then [% to jump back to if.
But we can't quickly jump between them.

  if l:x == 1
    call one()
  elseif l:x == 2
    call two()
  else
    call three()
  endif

Describe the solution you'd like

Add a motion mapping (e.g., <plug>(matchup-[]%)), which jumps to "close" word, or to "open" word if already on close word.
Then we can use the same key to quickly jump back and forth.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions