- 3rd place, the DELETE key, because removing duplicates and bad code is always a joy. Make sure you only refactor well-tested code though!
- 2nd place, the DOT (.) key, but that’s only if you’re using VIM, you can use the dot key to repeat things. It is also usually helpful in other editors (and Chrome dev tools console) when it is used to check the list of methods you can call on an object.
- 1st place, the TAB key, because, well, TAB COMPLETION!
(If you’re on Windows, this might not be super useful to you. Sorry for your loss)
So why is TAB so damn good you ask?
Type things faster.
cd /home/bigNameHere/LongDirectoryNameHere/AnotherLONGNamehereIf you're using
TABafter the first few letters of every directory, you will get there a lot faster.
You don't really need any more reasons after this, but I'll give you more.
- Elimination of typing mistakes
So you typed
apt-gtdropping the e, and you can't see that, going crazy over why it did not work, wasted 5 seconds there. if you instead typed
apt-g[TAB]to auto complete, this is your GUARANTEE of a typo-free command.
- Awareness of commands
Was that command
ipconfig? you don't need to guess or try, type in
if[TAB][TAB]to see all the commands starting with if.
- Awareness of arguments
Yep, autocomplete works on arguments too, for example, a quick way to list all directories under your current one is to do
cd [TAB][TAB]! since you're trying to cd somewhere, autocomplete will give you all the directories you can cd into, if for example you typed in
less [TAB][TAB], then it would show everything you can
Some scripts will take this concept to beautiful extremes, my favorite one is the git-completion script, using that, not only you can see all the git commands you can do with a simple
git [TAB][TAB], but you can even see all the flags you can use on all commands. So you can do something like
git log --[TAB][TAB]to see the options you can pass to the log command. Pure brilliance.
- Text indentation
Indentation in programming is important, good indentation results in readable and more maintainable code, most editors do simple multiple lines indenting with a single TAB hit, and then you can use shift+TAB to unindent. Don’t use the actual tab character to indent though, make your editor replace a tab with 2 spaces.
- The TAB index
In every HTML document, there is a TAB index, which is the order of elements that you can cycle through using
TAB/Shift+TAB, you can use that to reach an input field for example, fill a form without needing to hit the mouse to get the input focus, then to move to the next input in the form, TAB!
You probably know this one, but if you don’t, you’re welcome.
CMD+SHIFT+TABworks in reverse here too
Bonus, the least useful key on your keyboard is
CAPS-LOCK, I mean, DO YOU REALLY USE IT? I remap it as another
Esc, because the original
Esc is a bit far from the home-row.