I've been struggling for a while with the auto-closing brackets feature in most code editors, especially when I want to keep typing after the closing parenthesis or quote. For example, after typing `print("random words I")`, I want my cursor to remain on `I`, but instead, it gets put at the end of the line after the closing `)`. This interrupts my flow, forcing me to either reach for the arrow keys or grab the mouse, which is frustrating.
In normal editors like VS Code, here's what I usually do:
1. Press the closing bracket again, which feels a bit hacky.
2. Use tab-out extensions, but those often conflict with autocomplete.
In Vim, I found some motions like `A` to jump to the end of the line and insert, which feel smoother.
So, how do you handle this situation? Is there a cleaner way in VS Code or other editors, or perhaps you have some lesser-known Vim tricks that help? Or is this just a case of choosing your method to break the typing flow? I'd love to hear how different workflows deal with this!
5 Answers
You can disable the auto-closing brackets feature in your editor. That way, you have complete control over when to type the closing brackets yourself, which makes a big difference in maintaining your typing flow.
Try using the "End" key to jump to the end of the line on your keyboard. If you’re on a Mac, you can use Cmd+Arrow Right. This way, you skip over the closing brackets without losing your flow.
Good tip! On some keyboards, using Ctrl + E can also get you to the end of the line.
I personally consider reaching for the arrow keys not a big deal. I just move my hand to navigate when I need to. But I get why it feels like breaking flow—it all depends on your typing habits and ergonomics!
If auto-closing is irritating, another approach is to just close the brackets yourself and ignore the auto-pairing. It feels more natural to me, and I tend to break my flow less this way.
In Emacs, using C-e takes you to the end of the line, and C-M-f can skip over balanced parentheses. Learning key combinations can take time, but they’re super efficient once you get used to them!
Totally! I find it takes time to learn, but it’s worth it for the speed it brings.

That's a good approach! I found that I can still type at my own pace without interruptions.