Re: join() a list with a newline char for an echo

2020-02-06 Thread John Little
> I agree that works - but my list is from a ch_read() and has ^@ (NL) at the end of each element and I just cannot seem to get this work. The join("\n") just puts the ^@ back everywhere. I don't know what you've got there. Presumably, you are familiar with the way vim handles NUL characters

Re: join() a list with a newline char for an echo

2020-02-06 Thread M Kelly
Hi, I agree that works - but my list is from a ch_read() and has ^@ (NL) at the end of each element and I just cannot seem to get this work. The join("\n") just puts the ^@ back everywhere. thx tho, -m On Thursday, February 6, 2020 at 6:35:57 PM UTC-5, John Little wrote: > > On Friday,

Re: join() a list with a newline char for an echo

2020-02-06 Thread John Little
On Friday, February 7, 2020 at 7:53:02 AM UTC+13, M Kelly wrote: > I have tried join( mylist, "\n") but it uses ^@ and "\r" uses ^M works fine for me, vim, gvim, and vim --clean. :let l = ["one", "two", "three"] :echo join(l, "\n") one two three Press ENTER or type command to continue Maybe

join() a list with a newline char for an echo

2020-02-06 Thread M Kelly
Hi, If I have a list [ one, two, three ] is there a way to turn it into a single string with newlines after each element ? Such that an echo mylist would show it as mulitple lines, ie: one two three I have tried join( mylist, "\n") but it uses ^@ and "\r" uses ^M thx for everything vim, -m --