Thursday, February 6, 2020

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

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 you're on MS Windows?  Used single quotes?  Have some settings causing trouble? (try with vim --clean).

HTH, John Little

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/9e8284d8-136e-4dff-8154-d9b24b693c94%40googlegroups.com.

No comments:

Post a Comment