Reputation: 5182
Is it possible to define "shortcuts" to use with Webstorm something like below?
Example: pressing Shift + C + L would then insert at cursor position a "console.log()
"
Upvotes: 2
Views: 795
Reputation: 57
In Webstorm:
1.Type Ctrl+Alt+S
. You are in preferences.
2.Type Live Templates
3.Type +
Create new group. Then create template there:
console.log($END$)
and chose any abrevation you want cl
for example
Upvotes: 2
Reputation: 165148
You can use existing Live Templates functionality (code snippets) to have cl[TAB]
(for example) to be expanded into console.log(CURSOR_HERE);
If you need actual dedicated keyboard shortcut ... then I may only suggest to record a macro that types such text and assign shortcut to it.
Upvotes: 2