On 26.10.11,09:52, Christian Brabandt wrote:
> On Wed, October 26, 2011 8:43 am, Volker Bouffier wrote:
> >> call append(6, map(readfile('/tmp/chosenfiles'), '"Attach:
> >> ".substitute(v:val,''\s'',''\\ '',"g")'))
> >
> > Sorry, this wasn't correct. But I think the following line should do it.
> > call append(6, map(readfile('/tmp/chosenfiles'), '"Attach:
> > ".substitute(v:val,''\(\s\)'',''\\\1'',"g")'))
> >
> > But who uses file names with tab characters?
>
> You should possibly also escape the '\'. I think a better approach
> would be:
>
> call append(6, map(readfile('/tmp/chosenfiles'), '"Attach:
> ".escape(v:val, " \t\\")'))
>
> (or something like this, haven't tested it)
>
> Would there be interest, to implement an interface to range in the
> previously mentioned Vim-Plugin?
>
I would dig that! :thumbsup:
Jostein