Skip to content

Instantly share code, notes, and snippets.

@nbardiuk
Created January 25, 2020 11:39
Show Gist options
  • Save nbardiuk/05fbff4d32c4b18d7e3fe41166af2c43 to your computer and use it in GitHub Desktop.
Save nbardiuk/05fbff4d32c4b18d7e3fe41166af2c43 to your computer and use it in GitHub Desktop.
sexp element pair
" emulate text object for pair of elements
" i.e. key/value binding/expr test/expr
"
" pair forward
xmap <buffer> ip <Plug>(sexp_inner_element)<Plug>(sexp_move_to_next_element_tail)
omap <buffer> ip :<C-U>normal vip<CR>
" pair backward
xmap <buffer> iP <Plug>(sexp_inner_element)o<Plug>(sexp_move_to_prev_element_head)
omap <buffer> iP :<C-U>normal viP<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment