Skip to content

Instantly share code, notes, and snippets.

@kamichidu
Created June 15, 2013 09:46
Show Gist options
  • Save kamichidu/5787560 to your computer and use it in GitHub Desktop.
Save kamichidu/5787560 to your computer and use it in GitHub Desktop.
function! s:collect_imports()
return filter(getbufline('%', 1, '$'), 'v:val =~# "^\\s*import"')
endfunction
echo s:collect_imports()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment