-
Notifications
You must be signed in to change notification settings - Fork 234
Jump command
Ben Millwood edited this page Oct 30, 2015
·
2 revisions
Merlin jump is a feature letting you do basic navigation through your ml files that's aware of ml syntax. A couple of commands are supported. In the below examples running :MerlinJump target
in vim or M-x merlin-jump
and then target
in emacs will move your cursor from the position marked here
to the position marked in square brackets. You can also enter multiple targets separated by spaces which will result in jumping to the one that moves your cursor the least. Giving jump no arguments results in jumping to all of the available targets.
- jump to fun (
:MerlinJump fun
):- if a function is "named"
let [f] x y z = here ;;
let [f] = fun x -> fun y -> fun z -> here ;;
- if it's a lambda function
List.iter l ~f:([f]un x -> here)
- jump to let (
:MerlinJump let
). Jump from let's value binding to let itself:
let [x] =
...
here
...
in
...
- jump to module (
:MerlinJump module
)
module [T] = struct
...
here
...
end
- jump to match (
:MerlinJump match
)
[m]atch value with
| Some x -> here
| None -> ...