I want to:
let s:asciiart = ["", "", s:hardinclude(system("command params")), "", ""]
where command
returns one string with:
"art-line-1", "art-line-2", "art-line-3"
so I end up with:
s:asciiart == ["", "", "art-line-1", "art-line-2", "art-line-3", "", ""]
Is there a way to make a working s:hardinclude()
? How? Thanks.
systemlist()
? To be honest, your question is unclear—you've not explained how (algorithmically, not programatically, of course) to get from your input to your output...eval()
is the one you were looking for. But note that's usually a bad idea, generating a Vim snippet from an external command and evaluating it as Vimscript. Instead, generate your output in a more general format (multiple lines, or comma-separated, or tab-separated) and parse that simple format in your Vim code.