function! FileReadIntoList(file)
let currbuff = bufnr(bufname("%"))
execute 'silent edit ' . a:file
execute 'buffer ' . currbuff
let list = getbufline(bufnr(bufname(a:file)), 1, "$")
execute 'bwipeout ' . a:file
return list
endfunction
but looks a little clumsy to me, is there a more elegant way to do
this?
:help readfile()
m.