Newbie: Need help using the code window

I've encountered a few problems so far.

1. When writing HTML, I've got this:






Now my cursor is at the end there, after the </tr>. When I hit enter, in most IDEs, it would create a new line and my cursor would be indented one level, but instead it goes to the beginning of the line.

This works fine in Python, but why isn't it working when I edit a Django template?

2. I type {{ in my Django template, and it adds the corresponding }}, which is nice, but now how do I get out of the block once I'm done typing my variable name? Do I have to hit the right arrow 3 times, or is there a shortcut to escape the block? Because if there isn't, I'd rather type the }} myself. I figured out by trial and error that I can escape the block and go down a line by pressing Shift+Enter, but I don't know how to do it if I want to go to the right of it and NOT create a newline.

3. If I type {{ by accident, and then delete them, I'm still left with the }}. In Komodo IDE/Edit, it realizes you made a mistake and deletes the corresponding }} for you (at least for quotes and stuff). Can we get PyCharm to do this too?

Edit: Actually, the indentation is really wonky. I just added <h3>MyTitle</h3> and then hit enter, and it moved the cursor in one level deeper than the <h3>, even though that tag was closed, so there should be no indent.

Please sign in to leave a comment.