On Nov 14, 2010, at 1:20 AM, epanda wrote:

> Hi,
> 
> I have got these both lines:
> 74HC595       0.15            2
> POTTRIM       0.15            5
> 
> 
> I am using range of lines and would like to keep only the last column
> value:
> 
> So I test this script line without success. This keep all my column
> let totallist=map(copy(lines), 'split(v:val,"\s\+")[-1]')

Escape the backslashes or use single quotes.

let totallist=map(copy(lines), 'split(v:val,"\\s\\+")[-1]')

let totallist = map(copy(lines), 'split(v:val,''\s\+'')[-1]')

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

Reply via email to