I’m looking for a convenient way to move across sibling forms. Consider the following code (where | is the cursor position):
(comment
(|form1 abc
def
ghi
jkl)
(form2 foo bar)
(form3 baz zaz))
I want to move to the beginning of form2 and from then to the beginning of form3 without having to repeat j . I looked up vim-sexp and it seems like none of the motions offered by it cover this particular case.
Does anyone have a good solution for this?Using vim-sexp-for-regular-humans or whatever that tpope plugin is called, i would use “(“ to move up to the surrounding paren, then “W” to move to the next-by-current-list element, then “w” to move to the next-by-word-boundary element.
ah! this is gold, thanks!
for reference: https://github.com/tpope/vim-sexp-mappings-for-regular-people#motion-mappings
I tried using the <M-b> and <M-w> mappings from vim-sexp originally and they didn’t work but that’s because my meta key was not set properly. Regardless, W makes a lot more sense to me