Glench / Vim-Jinja2-Syntax

An up-to-date jinja2 syntax file.
https://github.com/mitsuhiko/jinja2
BSD 3-Clause "New" or "Revised" License
343 stars 64 forks source link

Load syntax/BASE.vim for whatever.BASE.j2 files #24

Closed ghost closed 4 years ago

ghost commented 4 years ago

This did bite us, when we were editing loads of whatever.conf.j2 files. With this change, it will work nicely.

Glench commented 4 years ago

How did this bite you? Why would you want this?

I’d really like to know if other people experience this issue.

ghost commented 4 years ago

So, the problem was that when I was editing postgresql.conf.j2, vim loaded jinja syntax, but didn't syntax for conf.

With this patch, it will load conf syntax, and then jinja. Please check attached config files. To see the difference this pull request makes.

sample-config-files.zip

Glench commented 4 years ago

I don't think this is a common enough use case to support, sorry!

ghost commented 4 years ago

While I understand that my use case is somewhat limited, what is the negative of implementing it? As far as I can tell all the functionality that was there will still be there, it's just a bit of new functionality that is being added without any damage to existing one.

Glench commented 4 years ago

For one, I don’t want to have unexpected behavior for people who have files with file names like that. For two, I don’t want to maintain unneeded code that adds complication and may need bug fixes.

Glench commented 4 years ago

But thank you for your pull request! I’m always grateful to receive constructive contributions even if they don’t seem like a good fit for this project.