Skip to content

Instantly share code, notes, and snippets.

@thiagoa
Created February 28, 2016 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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