Sunday, April 11, 2010

Re: How opening many files into horizontal split windows

On 18/02/10 22:09, Gary Johnson wrote:
> On 2010-02-18, epanda wrote:
>
>> how to build args from a private list variable
>
> :let privlist = ["file1", "file2", "file3"]
> :exe 'args' join(privlist)
>
> See
>
> :help exe
> :help join()
>
> Regards,
> Gary
>

This won't work if there are spaces etc. in the filenames

Here's another try (untested) for the second line

:exe "args" join(map(copy(privlist), 'fnameescape(v:val)'))

see the help items mentioned above, and in addition
:help fnameescape()
:help map()
:help copy()

Best regards,
Tony.
--
Q: How many surrealists does it take to change a light bulb?
A: Two. One to hold the giraffe and the other to fill the bathtub
with brightly colored machine tools.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

To unsubscribe, reply using "remove me" as the subject.

No comments: