Code
"" http://vi.stackexchange.com/a/7787/2923
function! OpenSelectionAsTabs() range
let tabnr = tabpagenr()
for line in range(a:firstline, a:lastline)
execute "tabedit " . getline(line)
execute "tabp"
endfor
endfunction
nnoremap <leader>gf :'<,'>call OpenSelectionAsTabs()<CR>
vnoremap <leader>gf :call OpenSelectionAsTabs()<CR>
Filelist where I select two files in Visual mode and Press <leader>gf
/Users/masi/Raspberry Pi/me-hello-yes.tex
/Users/masi/hello.tex
...
Output
Error detected while processing function OpenSelectionAsTabs:
line 3:
E172: Only one file name allowed: tabedit /Users/masi/Raspberry Pi/me-hello-yes.tex
There are several complications such as artifact tabs. I think the empty spaces can be one source of the problem.
Why is there the error message E172?