Skip to content

Feature: jump to next/previous case #1721

@ncik-roberts

Description

@ncik-roberts

(This is an idea for a feature.)

If you're editing a large match expression, it could be nice to jump to the previous/next case, e.g.:

let f x =
  match x with
  | A ->
    let x1 = ... in
    let x2 = ... in
    ^
    (* many dozens of lines of code *)
  | B -> 3

If my cursor is as indicated in the A case, it would be nice to jump to the B case.

A sensible place to put this feature might be in the jump rpc. Right now, that supports jumping to the top of a let, match, or function; it might be easy to extend it to support next-case and prev-case.

(I started to look at this but it wasn't trivial so I thought I'd log this issue.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions