Fork me on GitHub
#vim
<
2023-02-19
>
grierson06:02:03

How do I jump between forms? Say my cursor is in the lowest form (_+ y b) how do I jump up/down/between to (_+ a x

(defn foo [x y]
  (let [a 10
        b 20]
    (+ a x
       (+ y b))))

Martynas Maciulevičius07:02:03

I configured vim-sexp to jump to (let by pressing ( twice and using this binding:

\ 'sexp_move_to_prev_bracket':      '(',
The first time it would jump to [(]+ y b) and then after second press it would jump to [(]let [a 10. I don't use jump down but I think it exists in that package too.

👆 2
Amit Gold09:02:24

actually looks like you want to jump to parent form and not sibling. hm

grierson09:02:32

Thanks, That worked. But I tried to jump back to the form with ) but it balances and goes to the closing paren

Noah Bogart12:02:29

( god to enclosing paren, then W/B to move between forms. If i want to enter a list, I move to the first paren, then press l to move to the first word/element inside, then from there use W/B to move around

⬆️ 2
dominicm12:02:06

Are you looking for the flow movements? M-S-w