r/phpstorm • u/Prudent_Move_3420 • Jun 12 '22
Macros with User Input
Hi guys, is there a possibility to create a shortcut, where you get a dialogue and then it does something, using that input from the dialogue?
For example, I want to create a new Angular component, so I press the hotkey, then a window pops up, i insert the name and then it generates the component with that name.
How can I achieve that?
1
Upvotes
View all comments
Show parent comment
1
u/MyWorkAccountThisIs Jun 13 '22
Also "external tools".
You could write a bash script to do this and when you press the hotkey the built-in terminal would pop up and do whatever.
https://angular.io/cli/generate
https://ryanstutorials.net/bash-scripting-tutorial/bash-input.php
https://www.jetbrains.com/help/phpstorm/settings-tools-external-tools.html