Give yourself more space to think
Sometimes it’s nice to drastically simplify the tools you use in an attempt to free up mental space. Like Luke Skywalker disabling his targeting device in order to fire a precise shot into the Death Star.
Try disabling autocomplete on your code editor, and use just one monitor. Close as many windows as you can, and only check chat and/or email at pre-determined times. You may find that without a bunch of distracting “help” popping up as you type, you’ll be free to think and write code in a clearer, more contiguous headspace.
Let me know how it goes at [email protected].