Is there some way to add a code snippet to a file when it is created based on the file type/extension. I want to add header guards when I created a new C++ header file. Example:
#ifndef DIRECTORY_FILENAME_H
#define DIRECTORY_FILENAME_H
#endif // DIRECTORY_FILENAME_H
I've already created a code snippet that adds this text, but I can't figure out how to add this automatically when a file is created.