Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to customize intentions in PyCharm (e.g. modify "After" code)

PyCharm (and the other IntelliJ IDEs) have the idea of intention actions. One that I want to customize is the "Insert documentation string stub" so that it includes type annotations. I can't type in the After section or find a menu that allows me to modify it at all - is that possible? If not, is there another plugin or something that will allow such a modification?

Preferences window for intentions

like image 670
Pat Avatar asked Nov 24 '14 17:11

Pat


People also ask

What are intentions in PyCharm?

By clicking this icon, you can view intention actions available in the current context. Intention actions cover a wide range of situations from warnings to optimization suggestions. You can view the full list of intentions and customize them in the Settings/Preferences dialog Ctrl+Alt+S .

How do I change the code in PyCharm?

Code Editing Use the Code Editing page of the Settings/Preferences dialog to configure the general code editing options. Select this checkbox to have PyCharm highlight pairs of opening/closing braces when you position the caret right before the opening or right after the closing one.

How do you indent left in PyCharm?

While in the editor, select the necessary code fragment and press Ctrl+Alt+I . If you need to adjust indentation settings, in the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Editor | Code Style. On the appropriate language page, on the Tabs and Indents tab, specify the appropriate indents options and click OK.


1 Answers

You can not customize intentions. But you may use Live Templates, they are very customizable: https://www.jetbrains.com/help/idea/2016.1/live-templates.html

like image 106
kassak Avatar answered Oct 18 '22 20:10

kassak