Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Projectile detection doesn't include newly-started files #21

Open
dbarnett opened this issue May 28, 2014 · 3 comments
Open

Projectile detection doesn't include newly-started files #21

dbarnett opened this issue May 28, 2014 · 3 comments

Comments

@dbarnett
Copy link

I have a projectile for vim plugins: 'plugin/*.vim|autoload/**/*.vim|addon-info.json'. I also created a template for addon-info.json. The projectile matches any directory that contains an addon-info.json file, but if I create a new directory and run vim newdir/addon-info.json, the projectile doesn't match and the template isn't used.

Projectiles should be triggered when first starting to edit a file that matches the projectile pattern, even if the file hasn't been saved yet.

@tpope
Copy link
Owner

tpope commented May 28, 2014

"Should" is reaaaally presumptuous. You could maybe argue for this under a liberal interpretation of DWIM but I'm not sure I'm convinced.

@dbarnett
Copy link
Author

dbarnett commented Jun 7, 2014

Yeah, I was going to say "probably should"…

Are there particular cases where you see this going wrong? As it is, the logic for templates is "Use when starting the second and subsequent files in a project." Possibly safer, but it's been causing a lot of bother for me and it's not clear to me that there's any actual downside to changing it.

@tpope
Copy link
Owner

tpope commented Jun 7, 2014

The proper event would be after writing the file, not after editing it, as that's when it actually becomes a valid project. But this event is tricky to tap into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants