vim

For discussion on all things (neo)vim.
yiorgos 2019-11-24T13:51:05.483500Z

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.

dominicm 2019-11-24T14:20:47.484200Z

In Vim-sexp that would be localleader w.

dominicm 2019-11-24T14:21:09.484900Z

Vim-surround would also work (or vim sandwich)

yiorgos 2019-11-24T14:21:34.485300Z

ah thanks, I’ll give it a go 👍