Skip to content

Instantly share code, notes, and snippets.

@thiagoa
Created February 28, 2016 14:58
Show Gist options
  • Save thiagoa/3691ce22f2bbf6dfde16 to your computer and use it in GitHub Desktop.
Save thiagoa/3691ce22f2bbf6dfde16 to your computer and use it in GitHub Desktop.
" How to process a set of files (includes escaping file name) and populate the arglist
" This example "copies" everything from quickfix to arglist
command! -nargs=0 -bar Qargs execute 'args' QuickfixFilenames()
function! QuickfixFilenames()
let buffer_numbers = {}
for quickfix_item in getqflist()
let buffer_numbers[quickfix_item['bufnr']] = bufname(quickfix_item['bufnr'])
endfor
return join(map(values(buffer_numbers), 'fnameescape(v:val)'))
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment