How to skip over closing braces / brackets / parentheses in PyCharm?

Viewed 6819

I can't get the auto-indentations to work properly unless I use the automatic closing of braces, et al (which I don't like), and I see no option allowing one to skip over/out.

Eclipse has a configuration option for this, and Visual Studio doesn't auto-close everything by default, but rather formats the code block after manually entering the closing brace (which I rather prefer).

Surely there's something apart from going all the way over to the "End" key?

Edit / update:

As I consider it bad form to leave a question without a marked answer, would someone with more recent experience with PyCharm (I haven't used it in quite some time) weigh in with a recommendation for the best among the below solutions? Perhaps there's a newer configuration option or simple solution not yet listed?

4 Answers

Shift + Enter will jump past completions and drop you onto the next line.

Ctrl + ] will jump to the end of the current element.

This seems to work in most cases to skip past auto-completions. I find it the most versatile of the options.

Ctrl + [ will jump you to the start of whatever code block you are in.

As previously mentioned Ctrl + Shift + Enter will add any extra auto-completions you might need and drop onto a new line.

Why do you dislike the auto-closing brackets? They do not disturb anyone, see:
^ specifies the cursor position

method([a, {b: c^}])
behaves as if no brackets were there if you insert new brackets!

insert a '}':
method([a, {b: c}^])
now insert a ']':
method([a, {b: c}]^)
now insert a ')':
method([a, {b: c}])^

et voila! From a users point of view, if you typed blindly, you can not tell from what you see now if the auto-closing brackets were inserted or not.

Or simply: keep the closing brackets on. IntelliJ did a great work on a lot of small things we want to have intuitively.

Related