How can I source a vim script whose filename is contained in a variable?
Just like :source
, except that the parameter isn't a string literal, but a variable name.
You can always use :execute
to build a command dynamically:
:execute 'source '.fnameescape(myvar)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With