let filename = something
new filename
new takes the literal string 'filename' instead of expanding it and
using its value. How can I tell :new to expand the variable instead?
Thanks
It's because :new is an ex command and expects a filename and not an
expression. Therefore you have to use exe to evaluate an expression.
:exe ":new " . filename
regards,
Christian
--
• Modern PCs are horrible. ACPI is a complete design disaster in every way.
But we're kind of stuck with it. If any Intel people are listening to this
and you had anything to do with ACPI, shoot yourself now, before you
reproduce.
Linus Torvalds
You can use exec:
:exec 'new '.filename
-tim