Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " quickfixopenall.vim
- "Author:
- " Tim Dahlin
- "
- "Description:
- " Opens all the files in the quickfix list for editing.
- "
- "Usage:
- " 1. Perform a vimgrep search
- " :vimgrep /def/ *.rb
- " 2. Issue QuickFixOpenAll command
- " :QuickFixOpenAll
- function! QuickFixOpenAll()
- if empty(getqflist())
- return
- endif
- let s:prev_val = ""
- for d in getqflist()
- let s:curr_val = bufname(d.bufnr)
- if (s:curr_val != s:prev_val)
- exec "edit " . s:curr_val
- endif
- let s:prev_val = s:curr_val
- endfor
- endfunction
- command! QuickFixOpenAll call QuickFixOpenAll()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement