Monday, November 30, 2009

Re: How building a List from a textfile in vimscript

Hi epanda!

On Mo, 30 Nov 2009, epanda wrote:

> Hi,
>
> I have a text file and it contains those lines
>
> item1
> item2
> item3
>
>
> I would like to read this file from a vimscript and feed a List with
> all items read.
>
> echo myList
>
> ['item1','item2',''item3]
>

echo getline(1,'$')

You should read eval.txt and/or usr_41.txt, if you'd like to script
within vim.

regards,
Christian
--
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x].

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment