PyCharm Live Templates

Posted on
Thu Jan 07, 2021 10:16 pm
DaveL17 offline
User avatar
Posts: 5943
Joined: Aug 20, 2013
Location: Chicago, IL, USA

PyCharm Live Templates

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 175 times

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests