live-templates

Live templates file does not exist in pycharm templates folder?

偶尔善良 提交于 2021-01-28 18:12:03
问题 I wanted to insert multiple live templates. For example whenever I type prop and press tab , then pycharm would write the full property for python. I wanted to import the following list: https://github.com/hoffmann/PyCharm-Python-Templates But I can not find the templates folder in <your home directory>\.<product name><version number>\config\templates , as said in https://www.jetbrains.com/help/pycharm/2016.1/live-templates.html Also I am using the community edition 2016.1.4. 回答1: I got this

Live templates file does not exist in pycharm templates folder?

不羁岁月 提交于 2021-01-28 18:04:02
问题 I wanted to insert multiple live templates. For example whenever I type prop and press tab , then pycharm would write the full property for python. I wanted to import the following list: https://github.com/hoffmann/PyCharm-Python-Templates But I can not find the templates folder in <your home directory>\.<product name><version number>\config\templates , as said in https://www.jetbrains.com/help/pycharm/2016.1/live-templates.html Also I am using the community edition 2016.1.4. 回答1: I got this

How to enter logger definition in IntelliJ fast?

不羁的心 提交于 2020-12-05 07:03:05
问题 Are there some live template or something, to add logger definition into a class? In Eclipse I had a template: private static final Logger log = LoggerFactory.getLogger(${enclosing_type}.class); Don't see something about this in Log Support plugin. 回答1: I am using this live template: private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger( $CLASSNAME$.class ); Go to "Edit variables" and set the CLASSNAME variable to be the expression className() so IntelliJ will

IntelliJ live template for logging a selected variable in js

感情迁移 提交于 2020-01-03 20:04:45
问题 I would like to add a new line right after the line where I selected a variable name. This line should than contain the selection. Example: var variable = getValue(); I select the word "variable", press CMD + J to apply a live template or CMD + Alt + T to surround the selection with a live template and get something like this: var value = getValue(); console.log('[value]', value); 回答1: This doesn't work exactly as you expect, but the result is the same. Create a new Live Template (Settings →

PhpStorm live templates: is it possible to have any number of variables

一笑奈何 提交于 2020-01-03 04:47:10
问题 I want to create a template for an insert SQL block of code in PHP. Templates are great to fill in the same value where it is repeated numerous times. Is it possible to have the live template keep repeating certain blocks of code until I exit the template generation? For example I want the template to be able to cater for any number of variable in an Insert statement. It would be great if I can just enter variables until I'm done and the template repeats certain parts until I'm done. Please

Merge live templates

左心房为你撑大大i 提交于 2019-12-25 09:03:36
问题 I have PhpStorm at home and at work. At both I add different live templates. Also at home I try WebStorm where I add some another live templates. Is there any posibility to merge different added live templates to leave all of them? Can I import and merge live templates between PhpStorm and WebStorm ? 来源: https://stackoverflow.com/questions/43583559/merge-live-templates

How to apply more than one function to a passed in live template variable?

泪湿孤枕 提交于 2019-12-25 04:21:42
问题 I'm trying to build a Python Unit Test File Template in PyCharm. The overall result I want to achieve is: A user creates a new file with my template, say " widget_builder.py " Inside the template I want to create the class name by taking the file name " widget_builder " and turning it into " WidgetBuilderTests " It looks like I need to use a Live Template to manipulate the file template variable $FILE_NAME$ ? How can I create a Live Template that given a passed in variable (in this case $FILE