Skip to content
Browse files

add :Qargs command

  • Loading branch information...
1 parent 729b484 commit 167cf0d0048cdec7fd3f0a98ad3f3f1cf55b0835 @mislav committed Jul 14, 2013
Showing with 11 additions and 0 deletions.
  1. +11 −0 vimrc
View
11 vimrc
@@ -170,6 +170,17 @@ nnoremap <leader><leader> <c-^>
command! KillWhitespace :normal :%s/ *$//g<cr><c-o><cr>
+" populate arglist with files from the quickfix list
+command! -nargs=0 -bar Qargs execute 'args' QuickfixFilenames()
+function! QuickfixFilenames()
+ " Building a hash ensures we get each buffer only once
+ 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
+
set splitright
set splitbelow

0 comments on commit 167cf0d

Please sign in to comment.
Something went wrong with that request. Please try again.