Skip to content

Instantly share code, notes, and snippets.

@johnmastro
johnmastro / List.vim
Last active August 29, 2015 14:17 — forked from romainl/list.md
" This is an updated, more powerful, version of the function discussed here:
" http://www.reddit.com/r/vim/comments/1rzvsm/do_any_of_you_redirect_results_of_i_to_the/
" that shows ]I, [I, ]D, [D, :ilist and :dlist results in the quickfix window, even spanning multiple files.
function! List(command, selection, start_at_cursor, ...)
" derive the commands used below from the first argument
let excmd = a:command . "list"
let normcmd = toupper(a:command)
if a:selection