Как я могу выполнить следующую функцию в vimscript?
fun! Foo()
let l:bar = "Hello there, world!"
# Perform a substitution on l:bar, changing "world" to "kitten"
endfun
То есть, как выполнить подстановку для переменной, а не текущего буфера.
Я знаю, что для замены в буфере я могу написать
silent :%s/world/kitten/g
но какова эквивалентная команда для замены на переменную?