Fork me on GitHub

Clever! I have a few similar mappings, but tend to add the form to the current buffer, because it's easy enough to send it to the REPL from there (`<localleader>ee` with Conjure), and also to edit afterwards (it's in a normal vim buffer).


Thanks @UJY23QLS1. I mentioned in the other thread that I prefer not to put the results in my buffer all the time, especially if the result is very long. At this point, I don't really see much benefit to using a function instead of the macro. Perhaps if my use cases start growing it will make more sense. I am going to try adding -> and ->> macros and seeing if I get much use out of those. I haven't done it yet, but it looks like this would pair nicely with


I.e. I'd go for nmap <Leader>if i( *1)<Esc>%a or similar


That adds an extra space before ) when using (I think) auto-pairs; this works better: nmap <Leader>if i( *1<Esc><Right>x%a