Mac Efficiency Tools

Source: Internet
Author: User

Preface: Switching directories on the command line is the most common operation, and I believe that repeating "CD LS cd ls CD ls ..." will definitely make you mad.

Record, convenient next system reload, haha

I. OH-MY-ZSH

Mac pre-installed zsh, only need to set zsh as the native shell can 1 Set zsh as your default shell
Chsh-s/bin/zsh
2 Restart Zsh 3 Enter the following command in the terminal:
Curl-l https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh

4. Advantages of using Oh-my-zsh

4.1. After entering a directory, if there is git, it will automatically display the current branch (clearly see the current Git branch, cool) 4.2. More powerful tab completion, when you switch directories to double tab, he can list all the directories under the current directory, and can use the keyboard and the left and right to select the directory to enter. No more frequent LS, there are 4.3 of wood. More intelligent switch directories, such as you want to enter a very deep directory,/var/log/nginx/error/lastyear/may/first/monday, with zsh can input cd/v/l/n/e/l/ m/f/m, and then press TAB to complete the entire path. 4.4. Bash CD-can switch to the directory you just entered, under Zsh can record the most recently entered 10 directories, only need to enter D, and then see the corresponding 0-9 of the directory, enter the CD-number, you can enter the corresponding directory. or enter the CD directly-and then, after you tab, you'll find that there are 31 recently used directories waiting for your choice. two. Zsh plug-in----autojump1. Description: It will record your current location every time you start the command, and add it to its own database. In this way, some directories are added more often than others, and these directories generally represent your most important directory, and their "weights" will increase. Make the directory jump more convenient. 2. Installation:
Brew Install AutoJump  (requires installation of  homebrew)

Installing homebrew

" $ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install) "

Find plugins= in. ZSHRC and add it later

plugins= (git autojump)

Then continue to add in the above file

[-S $ (brew--prefix)/etc/profile.d/autojump.sh]] &&. $ (Brew--prefix)/etc/profile.d/autojump.sh

[The above operation by default you will be basic Linux command scatter ~]

Then, on the command line, enter

SOURCE ~/.ZSHRC

Reboot, OK ~

Common commands
// Show current directory Ls-la  //  Edit file Common operations: Vim xx.css  // edit xx.css file // Enter edit State after modifying, press ESC: WQ   // Save and exit
3. The merit executes the J read, then will automatically search contains the read the directory, one click jumps to the directory, the very uncomfortable ~

Mac Efficiency Tools

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.