Keyboard shortcut to custom file template
Hello,
I have created a file template for TestNG test and would like to be able to create a new test class (a new file) by typing some keyboard shortcut. Unfortunately I can't find such option in settings (Keymap section). Is it possible?
I know I can type ALT + Insert and then navigate with arrows to desired file template but I would like to have one shortcut for this.
And if this is not possible, then can I rearrange the order of file templates after typing ALT + Insert?
--
Cheers,
Tomek Kaczanowski
Please sign in to leave a comment.
it already should be mapped to ctrl+t /ctrl+shift+t
Not really. :) By default CTRL + T is project update, and SHIFT + CTRL + T is for thumbnails.
Any other hint?
--
Cheers,
Tomek Kaczanowski
correct, I remmaped the keys.
Just make your own mapping for "Goto > test".
Once you are in a class, and you press your key combo, it will ask you to create a tetscase/class
Press Alt+Insert and start typing your template name. It is faster than arrow keys.
Good tip, thanks.
--
Cheers,
Tomek Kaczanowski
Thanks, that is useful but not exactly what I was looking for. First of all I have to start with a class (have I?) which is not really what I want as a TDD freak. :) And also I prefer my own test class template which contains all imports I want. And the pop-up offers too many options for me (can I customize it?) which I don't need.
So the questions still remains - is it possible to create a shortcut that would create a file (i.e. test class) based on custom file template?
--
Cheers,
Tomek Kaczanowski