Page 1 of 1

PyCharm Live Templates

PostPosted: Thu Jan 07, 2021 10:16 pm
by DaveL17
Under Preferences --> Editor --> Live Templates, you can create code insertion templates that can be accessed by typing their shortcut in the Editor. For example, I like to use the html markup <kbd></kbd> from time to time to highlight text in markdown. To make that a bit easier, I created a Live Template so that now all I have to do is type kbd and hit enter, type my text and hit enter again. The template takes care of the rest. This is obviously a super simple example and there is capacity to do more complex arrangements like entire class definitions and whatnot. I've started to create a few for the Indigo plugin methods where I have trouble remembering the method signature. Nifty little time saver for those that code with PyCharm.

Code: Select all
<kbd>Template Foo</kbd>

Screen Shot 2021-01-07 at 9.37.50 PM.png
Screen Shot 2021-01-07 at 9.37.50 PM.png (50.72 KiB) Viewed 636 times