@@ -191,4 +191,38 @@ You can also call *projectionist#path()* to get the root of the innermost set
191
191
of projections, which is useful for implementing commands like
192
192
| projectionist-:Cd | .
193
193
194
+ FUNCTIONS *projectionist-functions*
195
+
196
+ Projectionist.vim exposes some functions to make interoperability with
197
+ other plugins easier.
198
+
199
+
200
+ *projectionist#list_project_files()*
201
+ projectionist#list_project_files()
202
+ Returns a dictionary of files belonging to the current
203
+ project, keyed on projection types. The dictionary has
204
+ the following form:
205
+ >
206
+ {'type1': [['file1', '/home/user/full/path/to/file1'],
207
+ \ ['file2', '/home/user/full/path/to/file2']],
208
+ \ 'type2': [['file1', '/home/user/full/path/to/file1'],
209
+ \ ['file2', '/home/user/full/path/to/file4']]}
210
+ <
211
+ The short versions of the filenames (`file1` , `file2` etc.) are
212
+ there for use with | projectionist-commands | .
213
+ For instance, `:Etype1 file1` would edit `file1` .
214
+
215
+
216
+ *projectionist#list_files_for_type()*
217
+ projectionist#list_files_for_type({type} )
218
+ Returns the list of files that belong to the current project and
219
+ are of type {type} . The list has the following form:
220
+ >
221
+ [['file1', '/home/user/full/path/to/file1'],
222
+ \ ['file2', '/home/user/full/path/to/file2']]
223
+ <
224
+ If {type} is not an existing projection type, an empty list is
225
+ returned. If {type} exists, calling this function is equivalent
226
+ to calling `projectionist#list_project_files ()[{type }]` .
227
+
194
228
vim:tw=78:et:ft=help:norl:
0 commit comments