ahw / vim-hooks

Easily hook shell scripts into Vim autocmd events.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Finished in ad8870e. Was able to remove a lot of code.