Gruntfuggly / auto-snippet

A vscode extension to automatically insert a predefined snippet when a file is created, or an empty file is opened.
Other
14 stars 1 forks source link

Exclude .git from pattern #11

Closed matronator closed 3 years ago

matronator commented 3 years ago

If I use pattern **/*.php, every time I open a diff preview of a modified PHP file, the extension tries to insert the snippet, breaking the diff window and making it impossible to preview changes of all PHP files. Also sometimes it inserts the snippet after opening an existing file that hasn't been committed yet.

Gruntfuggly commented 3 years ago

Does it work if you use "language":"php" instead of the pattern?

matronator commented 3 years ago

If I use that, it doesn't work at all, as per #9 (even with the html workaround)

Gruntfuggly commented 3 years ago

OK. I'll see if I can find a way to ignore diff files, etc.

Gruntfuggly commented 3 years ago

I've just uploaded a new version which should only trigger on documents with a "file" scheme, so hopefully it will work better. Can you let me know if it works for you?