ITerm-enrich your command lines

Source: Internet
Author: User

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.gitVersion 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

iTermIt 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 startiTermA journey.

Of courseiTermThe website also has a Chinese version. You can also visit this address www.iterm2.cn.

OpeniTermFirst, 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.PerferencesTo adjust the settings:

After entering the settings page, weProfilesYou can findColorsColor 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

iTermOf 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

iTermProvides a mechanism to remove the mouse and select text, calledSearch + TabDon'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 examplepingCommand. We usepingCommand to obtain a domain name after resolutionIP:

  1. localhost:~ icafe$ ping z.cn
  2. PING z.cn (106.50.16.198):56 data bytes
  3. ^C
  4. --- z.cn ping statistics ---
  5. 1 packets transmitted,0 packets received,100.0% packet loss

I believe everyone has had this experience:pingCommand to obtainIPWe want to copy it, we can only pick up the mouse, and then precisely select this sectionIPAnd then copy it out. Frequent switching between the keyboard and the mouse will affect our attention.

iTermA good method is provided for us. We press Cmd + F to bring up the search box, and then enter this section.IPSuch as 106:

We found this text by searching, and the next magic thing will happen. We pressTabKey, we foundiTermAutomatically help usIPSelected and automatically copied to the clipboard:

We need to use this sectionIPAnywhere, pressCmd + VTo 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 isiTermYou can call the function with one click. Go to the settings page and enterKeysTab

We can see that there isHotkeyTo 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:

iTermIn a translucent form, it is displayed on the top of the desktop. Here we can execute the commands we need, suchlsCommand 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 + MMark this line. When necessary, you can pressCmd + Shift + JYou 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 ExpressionYou can use the regular expression to search for the options:

 

Clipboard history

This is also a very convenient feature,iTermWe can save all the copy and paste operations while using the command line, and then pressCmd + Shift + HYou can copy and paste all the content in the list:

In addition, the time when these entries are copied is displayed.CopyAndPasteRight ~

 

Snapshot return

This function is callediTermAnother 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 + BA timeline is displayed on the page:

At this time, we press the left and right arrows of the keyboard to move the timeline freely.iTermThe 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 theniTermThe 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 timeiTermThe selected text is intelligently selected based on the text content pointed to by the mouse. For example, we place the cursor onURLAt this time, we click this button four times in a row.URL,Intelligent SelectionThis will help us select thisURLInstead 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 rightiTermFor 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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.