How do you use a function in the replacement of a substitution?
:%s/\d\+/\=submatch(0)*2/g
Use \= to evaluate expressions.
:%s/\d\+/\=submatch(0)*2/g
Use \= to evaluate expressions.
"aVaBy
Position cursor in a function, use VaB to visually select the block including braces, then "ay to yank into register a.
:call setreg('a', 'text')
Use setreg() to set register contents from Vimscript.
:echo getreg('a')
Use getreg('a') to get the contents of register a as a string.
qaciWmyFunc(<C-r>")<Esc>q
Record a macro that changes the inner word, types the function name with opening paren, pastes the original word from the register, and closes the paren.