Are you a developer with slow fingers? Sticky keyboard got you down? Can’t reach your corner keys? Cut your development time by microseconds per line of code, and impress your friends with fast-typing noises using this one weird trick.
Ok, maybe not one trick, but a collection. I’m talking about the little things that you do over and over. Copy and paste. Select lines. Select words. Reach for awkward keys. Typing commands. These are the places where time-saving tactics come into play.
One of the first lessons drilled into my head as a new developer was to find ways to increase my typing speed. I’ve always been a fast typist, so for me this meant finding shortcuts for hard to reach key-combos and keeping my fingers on they keys as much as possible. I squirm a bit when I see people rely heavily on their mouse or trackpad. Think about it, in the time you take to lift your hand, move it, then locate the cursor, move it to juuuuuust the right position, click, then move your hands back to home key position, you could have used shortcut keys and run to the kitchen to make a sandwich.
However, I am not a keyboard purist—use your trackpad when it makes sense. My ultimate point is for you to catch yourself in moments of sluggishness. If you find your mind working faster than your fingers, there is probably something you can do about it.
It’s a good idea to review your workflow efficiency from time to time and try to work in new time-saving habits. Some more examples of speeding up your workflow are:
- Speed up your development typing with a developer-centric typing program
- Alias like a pro, both in your editor and in the command line. To see someone who has mastered this, check out this talk by Ben Orenstein around the 13:30 mark.
- Try new editors. You might find one that has a lot of built-in time savers. Or maybe one that simply processes more quickly.
- Learn your editor. Do you use the multi-select feature? If not, go look it up how to use it right now. What other time-saving features are you missing out on?
- New uses for your Caps Lock key. If you’re on a Mac (especially a new one with no dedicated escape key), prime candidates for remapping are Esc and Control.
What saves me the most time
I recently got a new mac computer for work, the one that is so controversial to developers because the escape key isn’t a raised button. It has been replaced by a touch bar. I rely on touch to find keys quickly, and the touch bar forces me to look where my fingers are going, so this has been a major adjustment for me. However, many apps show context-relevant buttons, and suddenly a small piece of keyboard real estate has been optimized for maximum usefulness. Ultimately, I feel the change is win-win.
In order to show the context buttons for each program, you have to keep the function keys hidden. This was problematic for me because I rely heavily on my function keys for shortcuts I’ve set up in Atom, and hitting one extra key in order to get there was going to send me into hysterics.
Atom has a good library of community-supported packages that you can add into your workflow (see Josh Love’s post on Atom here), so there was a pretty good bet that someone had already come up with a way to customize the touch bar. I found the touch-bar-utility package to fit my need for speed.
If you’re following along, the buttons you’ll be installing are for:
- Delete line(s): deletes the current line, or all selected lines. Great for quick cleanup.
- Duplicate line(s): makes a copy of the current line, or all selected lines. Great for repetitive tasks where you only need to change one or two things in each version of the copy.
- Move line(s) down: If you find yourself selecting an entire line and then copying and pasting it so you can move it to another place, you NEED this shortcut. It will save you years of development time, and I’m pretty sure I’m not exaggerating.
- Move line(s) up: Seriously. Use this.
Install the touch-bar-utility package, then go to settings. Edit the elements using the options available in the README. Here is the prettified version of what I implemented:
And here is what it looks like:
Notice the opportunity for customization with emoji and colors! How can you resist? It was so easy I plan on adding a few more very soon, and I hope you will, too.
I have paired with a lot of you, and you know what I’m going to say. Once implemented, just type
pry + tab and you’re on your way.
This one is built-in with the language-elixir package that you are probably already using to format all your elixir code anyway.
And there you go. What are some time-saving tricks you have tried?