Closed joshuali925 closed 4 years ago
I think this kind of problem is difficult to handle with regular expressions, especially if an argument includes separators inside parentheses like (abc(def, ghi), jkl)
, since regular expressions are not so good at handling nestings.
I expect it would be more satisfactory to use more particular plugins: targets.vim, vim-textobj-parameter, vim-swap.
Got it. Thanks for the quick response.
Is it possible to create a text object for function arguments similar to targets.vim?
If I just do this,
a
cisa
on(a|bc[0], def)
would give me(|], def)
instead of(|, def)
.I'm not too familiar with vim regex. Is it possible to implement it or should I use targets.vim along with vim-sandwich?