Skip to content
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.

Support multiple directories in g:minisnip_dir #5

Merged
merged 2 commits into from
Nov 29, 2017
Merged

Support multiple directories in g:minisnip_dir #5

merged 2 commits into from
Nov 29, 2017

Conversation

arp242
Copy link

@arp242 arp242 commented Nov 28, 2017

The specific reason I added this is because I wanted to add support for
minisnip in vim-go (it already supports ultisnips and neosnippet).

However, with just a single directory I can't add the vim-go snippet
directory.

This converts g:minisnip_dir to a colon-separated list of paths, like
the PATH environment variable.

There are several ways to do this; I just chose this as the easiest and
most backwards compatible way.

The specific reason I added this is because I wanted to add support for
minisnip in vim-go (it already supports ultisnips and neosnippet).

However, with just a single directory I can't add the vim-go snippet
directory.

This converts g:minisnip_dir to a colon-separated list of paths, like
the PATH environment variable.

There are several ways to do this; I just chose this as the easiest and
most backwards compatible way.
@joereynolds
Copy link
Owner

Hey,

I'll review this tomorrow, thanks for the contribution! :D

@arp242
Copy link
Author

arp242 commented Nov 28, 2017

Thanks. No hurries :-)

@joereynolds
Copy link
Owner

Looks good to me, can you mention it in the docs and give a few examples there too?

Also fix some small typos in the documentation, and improve the
`autocmd` example to be more general, as well as making sure it works
only for the current buffer by using `setlocal`
@arp242
Copy link
Author

arp242 commented Nov 29, 2017

Done!

@joereynolds joereynolds merged commit 02bb389 into joereynolds:master Nov 29, 2017
@joereynolds
Copy link
Owner

Thanks!

@gowther-zoho
Copy link

That's a great add. Doesn't add complexity to the snippets but adds functionality to the plugin. Great job!

@arp242 arp242 deleted the multidir branch November 29, 2017 18:09
arp242 added a commit to fatih/vim-go that referenced this pull request Dec 7, 2017
Supprt minisnip

Needs joereynolds/vim-minisnip#5

I've also changed the default for `g:go_snippet_engine` to `automatic`,
which is a new value that will use the first snippet engine that's
loaded. I think that's more user-friendly than expecting the user to set
it.

I also changed the detection method to use the variables, instead of
scanning `runtimepath`. This is more efficient.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants