Fork me on GitHub
#vim
<
2019-11-24
>
yiorgos13:11:05

Is there an easy way in Vim to do the following? I have an expression (range 5) and then I want to assign that to a symbol? I was thinking of something like, moving the cursor to the beginning of the expression then start typing def rng (range 5) and pressing a key combination to wrap that in parens.

dominicm14:11:47

In Vim-sexp that would be localleader w.

dominicm14:11:09

Vim-surround would also work (or vim sandwich)

yiorgos14:11:34

ah thanks, I’ll give it a go 👍