Skip to content

Commit db8072b

Browse files
committed
Add documentation for exposed functions
Fix help coloring Fix duplicate helptag
1 parent 3166d8a commit db8072b

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

doc/projectionist.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,38 @@ You can also call *projectionist#path()* to get the root of the innermost set
191191
of projections, which is useful for implementing commands like
192192
|projectionist-:Cd|.
193193

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+
194228
vim:tw=78:et:ft=help:norl:

0 commit comments

Comments
 (0)