Generalize hook naming convention
ahw opened this issue · comments
It's weird that the patterns are [SORT].[EVENT].[EXT].vimhook, [SORT].[EVENT].vimhook and [FILENAME].vimhook. A better pattern might be ^\.?(\d+\.)?(.+\.)?(\w+)\.vimhook
which is best visualized on Regexper. Basically it allows an optional sort key, an optional "suffix" (which could be just "js" or the whole filename itself), and the event name. They each have a "." dot between them and it allows for an optional dot at the beginning, which lets the user decide whether or not to make the file hidden.