Reputation: 536
So I'm tired of creating two new files for every class I make. AFAIK, macros don't record actions such as creating new files. Snippets also can't create new files. I want to press a kinda hotkey to create a new .h and .cpp file with a specified name. Maybe with a class template.
Upvotes: 0
Views: 467
Reputation: 19754
You can use https://sublime.wbond.net/packages/AdvancedNewFile to create multiple files at the same time with the curly brace expansion. For example, inputting test.{cpp,h}
will create test.cpp
and test.h
. You will need to set posix_input
to true for the expansion to work. Templates with expansion do not work (right now anyways), but that may change in the future. There may be other plugins with much more specific functionality out there, but I do not know of them.
Upvotes: 1