Why shortcuts to insert snippets or live templates are actually a great (and needed) feature

I've seen on old posts that a number of people keep asking for shortcuts to insert snippets or live templates. So far, I think the team's answer has been that "live templates are good, learn to use them instead."
Yes, live templates are great, but many of us are used to using snippets in ways that save a lot of time and that live templates can't replace.

For me, the advantage of shortcuts is that it speeds up the insertion of fragments, especially, when you want to insert the same fragment multiple times in a row.

To take the most basic example, in other IDEs, I have always had something mapped to <br />
If I want five line breaks, and my shortcut is, for instance, Shift + Enter, I hold the shift key down and press Enter five times.
Super fast.

To do the same with Live Templates, I map lb to the <br /> fragment. To insert five line breaks, I have to type l, b, Tab five times! Or l, b, Tab once, then, if the fragment is on a line of its own, a shortcut to duplicate the line.
Super slow!

I have the same problem in PyCharm.
JetBrains IDEs rock, but I'm sure many of us would be grateful if JetBrains would take action on this request that keeps coming up, as there are good reasons for that request.

Thanks in advance.

2 comments
Comment actions Permalink
Please vote

Done. Thank you for the suggestion.
In case someone else wants to vote: there's a "thumbs up" symbol for voting on the right hand side (it took me a while to notice).

0

Please sign in to leave a comment.