redguardtoo/evil-matchit

% should search for the first keyword in the current line

neojski opened this issue · 1 comments

Pressing % with cursor on m should jump to end:

|module Stable = struct
...
end

Please note that evil-matchit also behaves incorrectly with parenthesis:

|foo ( bar )

If you have cursor on f and press % you should end up on ).

For ocaml it would mean modifying

(defun evilmi-ocaml-get-tag ()
to find the first keyword in the current line.

There's also some work in https://github.com/redguardtoo/evil-matchit/blob/bed39041b1181ec26cf2601a8a7aa4afe2510f5b/evil-matchit-simple.el but I'm not entirely familiar with that one.

In first case, you can (goto-char (cdr (bounds-of-thing-at-point 'word))) at the end of evilmi-ocaml-jump.

In second case, I'm not familiar with Ocaml syntax so I don't know what's the right way to jump. As I remember scan-sexps is used to jump between brackets.

Pull request is welcomed.