Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Append to vader_types filetypes or support any filetype. #14
I want to add a new filetype to the existing supported list without removing the default ones. E.g., if I add:
Then the only ft recognized will be
Is there a way to do that?
does not work because it is not defined to start with.
One possible solution would be to try and load any filetype as it is typed, and only change the syntax of the block if some syntax if found.
added a commit
Sep 7, 2014
Yeah, it's something that has been bothering me. I particularly didn't like the fact that Vader has a hard-coded, predefined set of filetypes that are unconditionally loaded even when they are not used. So I updated Vader to analyze the content of the buffer and load the syntaxes that are only referred to. And as you suggested, it will now dynamically load syntaxes as you type in insert mode. It will add slight overhead to the editing, but I believe it won't be noticeable. Let me know if it's not the case. Since Vader only detects changes in insert mode (using
Please update and let me know if it works for you.