Live Template expansion control

Hello all,

First time here in the forums, new user to PyCharm.

Coming from Slickedit there are a lot of little things that I've been able to adjust to get up to speed with PyCharm (really really quickly in fact). So far, there are two aspects of Slickedits version of live templates that I can't seem to get going in PyCharm, and I want to make sure it's not just ignorance.

First up, I prefer to use space to automatically expand templates for things like def, if, for, try, and so on. I do this because my workplace has a specific coding standard that requires closing comments to many blocks and it's nice to not have to type them. This works very well in PyCharm but in Slickedit I can supress the expansion of the template with Shift-space so when I'm writing a doc string or something I'm not wrestling with unwanted expansion.

My question then, is there anything in PyCharm that I can configure to similar effect (I know I could just use tab, but I'm looking to replicate a workflow I'm already comfortable with).

Second, Slickedit has automatic surround-with functionality if you write your template to use it (as in, once expanded I press the down arrow to gobble up the lines below). So my templates usually have it and holy cow it's a nice feature. Does PyCharm have anything like this?

Lastly, I like automatic indentation but I also prefer this to honor comments. For example:

if True:

    pass

# end if

In pycharm I have Meta-Enter bound to a little macro that moves the caret down one line and then starts a newline so that I can skip the closing comments of blocks like this and in Slickedit I get to the correct indentation level based on the comment, but in PyCharm I can't seem to control this.

All comments and suggestions are greatly appreciated,

Chip

Please sign in to leave a comment.