> How do I get part of a line into a list?

What sort of list?  An actual Vim7 "List" datatype?
Perhaps something like:

let my_list = [matchstr(getline(2), 'regexp')]

(where "regexp" matches the part you want and "2" is the number
of the line in question)

Or, you have matches on multiple lines that you want to assemble
into a list:

:let my_list=[] | g/regexp/let my_list+=[matchstr(getline('.'), @/)]


which will accumulate the matches of just "regexp" in my_list[]

Or did you mean something else such as "I've got a todo-list in
my document and I want to move arbitrary pieces of other lines
into this todo-list"?

If the above doesn't help, perhaps you could clarify your intent.

-tim



Reply via email to