vim-projectionist icon indicating copy to clipboard operation
vim-projectionist copied to clipboard

Get the list of files for a type

Open RomainEndelin opened this issue 11 years ago • 2 comments

I'd like to use Shougo's Unite as a front-end for Vim-Projectionist, I think it could be awesome! But to do so, I would need to query the list of existing types, and the list of file for a given type.

In term of code, it would need something like this:

:call projectionist#queryTypes()
" returns ['model', 'controller', 'views']
:call projectionist#queryType('Model')
" returns ['User', 'Article', 'Comment']

I have tried to play with projectionist#query(), but it seems to be scoped to the current buffer.

RomainEndelin avatar Sep 14 '14 15:09 RomainEndelin

The requisite information is available in projectionist#navigation_commands(), although this leaves you in charge of the nontrivial task of globbing. I'd be willing to expose a function to help with that. A good place to start would be the for loop in s:projection_complete.

tpope avatar Sep 14 '14 16:09 tpope

Ok, thanks ! projectionist#navigation_commands() is already a good start point to experiment :).

RomainEndelin avatar Sep 14 '14 16:09 RomainEndelin