Code faster with these terminal shortcuts
Terminal is a pretty amazing tool, but there is so much more to it than just bash commands. Often, many new developer’s just don’t truly appreciate how amazing the tool can be and how efficient it can make us — especially if we were to use a couple of useful shortcuts.
As coders, we code “a lot” (it’s kinda our job.) Therefore, we get into the habit of memorizing strings of code and syntax; so much that it often becomes muscle memory. However, it doesn’t mean that we can’t do ourselves a favor and use shortcuts to make our job easier.
A couple terminal shortcuts that are good to know for general efficiency are:
While these are all great, they are also rather broad in scope, aren’t they? What if you find that the shortcut we’re looking for doesn’t exist or if you wanted a shortcut for something specific?
For example, quite frequently for learn.co you will enter the string of code:
While it’s certainly not a lot of code to write; typing it over and over is can be tedious, especially when you consider there is a much easier option available : create your own custom shortcut.
If this cat doesn’t sum up your reaction, then it will in a moment, because it is actually quite easy to do and will make your life much easier. To do so, open terminal, navigate to preferences, and select profile, and click the “+” button in order to create a new shortcut. For this example, we will be setting the new shortcut to the key command shift + down arrow key.
After saving the shortcut, all you then need to do is go into terminal and use it by pressing the key’s you’ve specified. The result show the string of text that you’ve specified in terminal.
Neat, right? While we’re used to typing lot in a day, it doesn’t mean that we must type EVERYTHING. So give your fingers a break and use the shortcut’s you have available to you and make your job easier.