ITerm-enrich your command lines
Today we will introduce you to a tool:iTerm
. This time we are talking about development technology, but it is just a tool. However, although it is a tool, it can improve your skill level. Let's take a look at it. Every developer will inevitably use the command line.git
Version library operations, to run some scripts, are inseparable from the command line. Although the graphic interface is very powerful, in many cases, using command line is still the quickest way.
ITerm Introduction
iTerm
It is a free command line application released under GPLv2 and designed for Mac OS users. We can open its official website to see www.iterm2.com:
We can click Downloads to go To the download page and select a version suitable for your system. Here we download version 2.9, which is also a major improvement version:
After the download, we will startiTerm
A journey.
Of courseiTerm
The website also has a Chinese version. You can also visit this address www.iterm2.cn.
OpeniTerm
First, you will see the following interface:
The color scheme of the standard command line application may not be lively enough. You can modify the color scheme.Perferences
To adjust the settings:
After entering the settings page, weProfiles
You can findColors
Color Scheme panel. in the lower right corner of the Selection box, we can see several built-in color schemes for us to choose from, such as the Black style, white style, dark blue style, and so on:
ITerm shortcut
iTerm
Of course, it is not just a simple change of skin, it also provides a lot of convenient functions, let us use the command line more easily.
You can select text without a mouse
iTerm
Provides a mechanism to remove the mouse and select text, calledSearch + Tab
Don't underestimate this tiny feature. It keeps you focused. When using the command line, we often choose to copy and paste the text in the command line. For exampleping
Command. We useping
Command to obtain a domain name after resolutionIP
:
localhost:~ icafe$ ping z.cn
PING z.cn (106.50.16.198):56 data bytes
^C
--- z.cn ping statistics ---
1 packets transmitted,0 packets received,100.0% packet loss
I believe everyone has had this experience:ping
Command to obtainIP
We want to copy it, we can only pick up the mouse, and then precisely select this sectionIP
And then copy it out. Frequent switching between the keyboard and the mouse will affect our attention.
iTerm
A good method is provided for us. We press Cmd + F to bring up the search box, and then enter this section.IP
Such as 106:
We found this text by searching, and the next magic thing will happen. We pressTab
Key, we foundiTerm
Automatically help usIP
Selected and automatically copied to the clipboard:
We need to use this sectionIP
Anywhere, pressCmd + V
To copy it. This small feature makes it very practical to switch between the keyboard and the mouse.
Supports one-click invocation of command lines
We sometimes encounter a situation where we only want to use the command line to execute a specific operation and then do not need it. In fact, in this case, we do not need to open the command line application. For example, we just want to see what files are in a folder. For such operations, we do not need to open a command line window separately.
This isiTerm
You can call the function with one click. Go to the settings page and enterKeys
Tab
We can see that there isHotkey
To open all the check boxes under this option and set a custom shortcut key.Cmd + \
. Then... We can exit.iTerm
.
Later .. When we need the command line, we only need to press the shortcut key we just defined to see .. Something amazing happened:
iTerm
In a translucent form, it is displayed on the top of the desktop. Here we can execute the commands we need, suchls
Command to view the contents of some directories. After executing the command we need, we press the preset shortcut key again and the command line interface disappears. For the lazy people who forget to close the window after using the command line (such as me ~), It is also a great gospel.
Command Line marking
In short, we pressCmd + Shift + M
Mark this line. When necessary, you can pressCmd + Shift + J
You can jump back to this line immediately.
Regular Expression search
You can choose to search for geeks. when calling the search interface, you only needRegular Expression
You can use the regular expression to search for the options:
Clipboard history
This is also a very convenient feature,iTerm
We can save all the copy and paste operations while using the command line, and then pressCmd + Shift + H
You can copy and paste all the content in the list:
In addition, the time when these entries are copied is displayed.Copy
AndPaste
Right ~
Snapshot return
This function is callediTerm
Another killer, for example, you executed some commands at three o'clock P.M., and after several hours, you executed other commands. If you want to go back and see what you did at three o'clock P.M., what is the answer?iTerm
. PressCmd + Option + B
A timeline is displayed on the page:
At this time, we press the left and right arrows of the keyboard to move the timeline freely.iTerm
The command line interface on also changes to the content of the time point you selected. Amazing, very convenient ~
Switch tag Arrangement
When we use the command line, we will find that many labels are opened without knowing how to use them, such as me:
At this time, it is very troublesome to find a window among so many labels. At this time, we can pressCmd + Option + E
...
Another amazing thing happened. We saw all the labels neatly arranged on the screen, and a search box was displayed in the upper left corner of the screen, we can enter the content to be searched in our memory as needed, and theniTerm
The tag matching the keyword we entered is highlighted. Press the Enter key to switch to the tag ~
Intelligent Selection
This small function is also very practical. We click the mouse to select the text four times in a row. At this timeiTerm
The selected text is intelligently selected based on the text content pointed to by the mouse. For example, we place the cursor onURL
At this time, we click this button four times in a row.URL
,Intelligent Selection
This will help us select thisURL
Instead of using the mouse to point the mouse precisely, drag and drop to select thisURL
, Like this:
We can easily select the content in this way. Besides the URL, it also includes the Email address and double quotation marks.Intelligent Selection
.
The software developed by geeks fully considers the various requirements of geeks ~
Already on is my rightiTerm
For more information, see. It may not be profound, but it aims to open up a new idea for everyone. Just like practice and constantly absorbing nutrients in multiple places, you can increase your internal force. Although it cannot appear in a short period of time, over time, and at a certain point in time, you suddenly find yourself powerful.
This article permanently updates the link address: