[Reprint] Efficient MacBook working environment configuration

Source: Internet
Author: User
Tags version control system homebrew cask macbook

Original: http://www.xialeizhou.com/?p=71

Efficient MacBook Working Environment configurationposted on August 1, 2015 by Xialeizhou

This document records the entire configuration process, for new MacBook and find the MacBook more difficult to use for reference.

1. Hardware Upgrade

Laptop is characterized by portability, the disadvantage is that the screen is too small, so you first need to apply for an external monitor, one more screen will greatly reduce the number of times you switch applications, significantly improve your productivity, do not forget to apply for a mini DP VGA adapter for connecting the display. To accommodate multiple displays, a software is recommended to manage the multi-monitor window.

If you're well-funded, you can buy a mechanical keyboard and a wireless mouse to further improve your productivity.

2. System Setup 2.1 Set the function key (F1-F12) to the standard function key

The function keys (F1-F12) in the top row of the MacBook keyboard are the default settings for system brightness and sound, which is very handy when the MacBook is your entertainment pc, but for the MacBook as a working PC and requires frequent use of function keys ( F1-F12), it's a good idea to set function keys (F1-F12) as standard function keys.

First Open System Preferences , click Keyboard on the icon, tick on Use all F1, F2, etc. keys as standard function keys . Then, if you want to adjust the volume, hold down the key in the lower left corner of the keyboard fn and press F11 or F12.


Figure 2.1-1

2.2 Setting trackpad (Touchpad) tap to click

When you first use your MacBook, do you feel that the touchpad is not smooth? That's because you need to do the following settings.
Open System Preferences , click on the Trackpad icon, tick the Tap to click option, now touch the touch pad with the finger lightly, the mouse click to achieve a smooth effect.

2.3 Dock the dock to the left of the screen

Why would I Dock dock to the left of the screen? The MacBook screen is a rectangle, and if you Dock put it down, the screen will 宽度 be less usable, and the other person's eyes will be read from left to right, so it Dock 's better for the person on the left to use the MacBook as a working computer.

Open System Preferences , click Dock the icon,

    1. Adjust the icon Size to the appropriate size
    2. Turn off Magnification effects (that is, mouse over the dock to enlarge the effect, this effect interferes with attention)
    3. In Position on screen one column, selectLeft
    4. CheckMinimize window into application icon


Figure 2.3-1

2.4 Full Keyboard control mode

What is the full keyboard control mode? For example, as shown, I am writing a document that has not been saved and has no file name, and if you do not accidentally click the 关闭 button, a dialog box will appear:


Figure 2.4-1

Currently, the [Save] button is activated by default, and pressing 回车 will pop up the Save dialog box. But what if I don't want to save it? You can only move the cursor by mouse or touch pad and click [Don‘t Save] to cancel the save. Can I use the keyboard to control the cursor activation [Don‘t Save] button? The answer is yes, make a simple setup just fine.

, first open System Preferences , click on the Keyboard icon, select Shortcuts this tab, selectAll controls


Figure 2.4-2

Now when I try to close an unsaved file again, the new pop-up dialog box follows, with a slight change, [Don‘t Save] a blue border on the button, and when you press the key on the keyboard tab , the blue frame switches between the 3 buttons. Suppose now the blue box is on the [Don‘t Save] button, you press 回车 , but found that the system still entered the 保存 file dialog, why the blue frame does not work? That is because the blue box selected by the button is 空格键 triggered, when you press 空格键 , the system will not save the file to exit directly. This allows you to interact with your MacBook more quickly when you are not comfortable with the mouse and touchpad.


Figure 2.4-3

2.5 Quick Lock Screen

If you leave the computer for a long time, it is best to lock your screen to 防止数据泄露 . So how do you quickly lock your MacBook? The answer is that it is only necessary 一摸触摸板 or 一甩鼠标 possible.

    • Open System Preferences , click on the Desktop & Screen Saver icon, select Screen Saver This tab, and then click Hot Corners... , in the following screen pop-up, select the lower right corner Put Display to Sleep , click OK ok.
      Figure 2.5-1
    • Open again System Preferences , click Security & Privacy on the icon, in the General tab, tick Require password[immediately] after sleep or screen save begins .


Figure 2.5-2

Now when you leave the computer, remember 一摸触摸板 or 一甩鼠标 move the cursor quickly to the lower right corner of the screen, the MacBook will enter the mode immediately and need to go to the Screen Saver 密码 desktop.

3. Common shortcut keys for the system

Please click on this document to learn the system shortcut keys, the appropriate use of shortcut keys will improve your productivity.

4. Daily software recommended 4.1 Chinese Input method

System comes with the input method is not very useful, recommended installation Sogou input method or Rime input method. After the installation is complete, open System Preferences , select Keyboard , switch to Shortcuts this tab, tick, Select the previous input source and click the space behind the above text, set the shortcut to Ctrl+Space (that is, ^space).


Figure 4.1-1

4.2 Window management Software-Sizeup
    1. Do you often want to make a Word document fill the left half of the screen, where wants chat fills the right half of the screen, while chatting with the small partners on the document side?
    2. Finally the external monitor, do you often drag a window between the notebook and the external display screen directly between the back and forth?

Sizeup quickly solve such requirements, the software can be permanently free trial, download after installation open Sizeup, and then open Wang Wang, shortcut key press control+option+command + M , then want want will immediately into full-screen mode.

In most cases, however, you will see this prompt because Sizeup requires your authorization to control the window.


Figure 4.2-1

Click or open directly, click Open System Preferences System Preferences on the Security & Privacy icon, in the Privacy tab, click Accessibility , and then add the Sizeup to the list on the right. (Tip: You may need to click on the yellow lock in the lower right corner to edit the right-hand list before you enter the password.) )


Figure 4.2-2

If you connect an external monitor at this point, and the shortcut key is pressed control+option + 方向键右键 , the most front-end window activated by the current left-hand display will be immediately sent to the right monitor.

Here are some of the sizeup commonly used shortcut keys, more shortcuts and how to use the official website please check.

    • control+option+command + M: Make the current window full screen
    • control+option+command + 方向键上键: Causes the current window to occupy the top half of the current screen
    • control+option+command + 方向键下键: Causes the current window to occupy the lower half of the current screen
    • control+option+command + 方向键左键: Causes the current window to occupy the left half of the current screen
    • control+option+command + 方向键右键: Causes the current window to occupy the right half of the current screen
    • control+option + 方向键左键: Sends the current window to the left monitor screen
    • control+option + 方向键右键: Sends the current window to the right monitor screen
4.3 Finding files and applications and unlimited imagination-Alfred

If you have ever used a MacBook, you should have been exposed to spotlight, that is, the middle of the screen pop-up a long input box, you enter the file name or application name, Spotlight will blur to find the corresponding candidate, press ENTER to quickly open the file or program you need.

Alfred's abilities far outweigh the spotlight, you can download the free version of the installation using directly, Alfred also offers more powerful workflow (workflows) and cutting Board (Clipboard) management and other advanced features that need to purchase Powerpack. For daily operation, the free version is enough to use.

Because Alfred can completely replace Spotlight, the following first removes the spotlight-occupied shortcut keys for command + 空格 Alfred's future use.

Open System Preferences , select Keyboard , switch to Shortcuts this tab, click Spotlight, Cancel the corresponding 2 shortcut key settings.


Figure 4.3-1

Open Alfred, click on the Alfred icon in the menu bar, openPreferences...


Figure 4.3-2

As shown, set Alfred's shortcut key tocommand + 空格


Figure 4.3-3

Now press the shortcut key command + 空格 , enter ali , then Alfred is not case sensitive to all included ali applications, documents and historical URLs are listed, as shown, enter Open 淘云盘 , command+2 open a local xmind file, You can also move the keyboard up or down or the cursor to select a target.


Figure 4.3-4

For more information about Alfred's use and imagination, please refer to the official website or the extensive tutorials available online.

剪切板管理 厂内查人工作流 The following is a simple demonstration of the use of and. As shown, I use the shortcut keys to open the Clipboard manager, listing the pieces of text I have recently copied, and I can quickly select the text fragments or enter some characters to find


Figure 4.3-5

When you install the @文通 developer workflow, activate Alfred, enter r+空格 , and then enter someone's nickname to see the other person's simple information.

    • Press to 回车 open Ali inside and outside the information page
    • Press ctrl+回车 , directly open the other side Wang Wang into chat mode


Figure 4.3-6

4.4 Smart and beautiful calendar--fantastical 2

Open Fantastical 2 website, you will be attracted by her beautiful appearance, the most valuable is fantastical is also very smart, when you create a new reminder in the calendar, enter the following "HTML training at 7:30pm tomorrow Alert 5 min ", fantastical will automatically set the date to tomorrow, then set the start time to 7:30 in the evening, and 5 minutes before the reminder, isn't it smart?


Figure 4.4-1

4.5来 Cup free coffee--caffeine

This afternoon to the big boss and important customers to demonstrate PPT, you seem to see the promotion of the rise in the peak of life, when you open the MacBook connected projector, eloquent explanation, suddenly MacBook into the sleep mode, the picture is too beautiful, I dare not think.

You should immediately install this free conscience software---caffeine, set boot up, click on the status bar of the coffee cup icon, when the coffee is full, the MacBook will not go into hibernation mode, and then click the coffee cup empty normal hibernation, I set the default boot, coffee cup to stay full state.

4.6 Quickly switch and open applications--Manico

The MacBook system defaults to a shortcut key to display the currently running application, while pressing to tab + command see the style as follows:


Figure 4.6-1

If you want to change to Firefox, you need to click tab , if you want to switch to the calendar, you need to press ' tab ', if you open 10 of several applications at once, you often need to press more than 10 to tab change to the desired program.

Manico is designed for this scenario, installed and opened, the default shortcut is to press and hold, when the number is option pressed to 7 quickly open the number 7 地图 .


Figure 4.6-2

In addition, the recommended settings Manico use the left-hand 字母加数字 index to make it easy to quickly switch applications with just the left hand side. Click on the Manico icon in the menu bar, open Preferences... , Appearance inside tab, select Uses left hand area and Use numeric and alphabet .


Figure 4.6-3

4.7 arbitrary copy and paste and infinite imagination--popclip
    • How many times do you copy a piece of text from one application and paste it into another in your daily work?
    • How many times is it to copy a URL and then open the browser and paste it into the address bar and enter it?
    • How many times are you copying a noun and then opening the browser to find a search engine?

These repetitive modes of operation can be simplified, the only thing you need is popclip, when you select a piece of text (for example, select "The same day earnings"), Popclip will pop up a shortcut action bar, you can copy, cut or paste, more powerful is, Popclip offers a number of free plugins, such as searching for selected text using the specified search engine, or selecting English words for case conversion and so on.


Figure 4.7-1

Note that popclip need your authorization to pop up the shortcut status bar, directly click Open System Preferences or Open System Preferences , click on the Security & Privacy icon, in the Privacy tab, click Accessibility , Then add the Popclip to the list on the right and tick the previous checkbook. (Tip: You may need to click on the yellow lock in the lower right corner to edit the right-hand list before you enter the password.) )

4.8 Enhanced Resource Manager--Xtrafinder

The MacBook comes with a resource Manager (Finder) that can meet general needs, but when you have a lot of file maintenance operations, you need a more powerful finder. The Xtrafinder is fully integrated into the finder, and you don't feel like it's a third-party application, but it also offers many enhancements, such as:

    • Browser-like tabs (tab)
    • Dual operator Panel support (panel)
    • Enhanced global shortcut keys, such as new file
    • Colorful side bar icons
    • Quickly open a terminal in the current folder
    • Quickly create a new file in the current folder


Figure 4.8-1

4.9 Arbitrary full keyboard control-Shortcat

In the system settings, I introduced 全键盘控制模式 , but this mode can only do simple button control, unable to achieve arbitrary control. Here is a comparison of geek software, Shortcat help you to fully use the keyboard to control the system, for students with keyboard obsessive-compulsive disorder.


Figure 4.9-1

4.10来 Cup cocktail-Bartender

If you see here, believe you have been I push (HU) Recommend (you) installed a row of software, your system status bar has 人满为患 , and sometimes because the current activation of the application's menu more blocking the status bar icon you want to click, this time you need a 酒保 to help you conditioning the status bar, Bartender will be the last app I recommend for everyday use, and you can customize the hide some of the infrequently used status bar icons, especially for Virgo Obsessive compulsive disorder.


Figure 4.10-1

5. Development environment Configuration

Finally to the development environment configuration phase, before configuring the development environment, it is recommended to upgrade the OS X system to the latest version, while going to the Mac App store to download the most recent edition of Xcode, and then use the following command to install Xcode command line tools, This will install many of the commands that are commonly used under the terminal, which will likely be used in the future:

5.1 Command line terminal terminal

Before the user interface is not invented, the terminal terminal is the only way to interact with the computer, even today, many servers still only provide terminal landing to operate, as a development test operations related personnel, in daily work reasonable use of terminal will greatly improve work efficiency.

5.1.1 Replace system default shell--Oh My zsh!

Bash is a shell that is installed by default for most systems, zsh and bash are like shells, but zsh is more focused on user experience and interaction with people, OS X is installed Zsh by default, However you want to start from the beginning to configure a handy ZSH is a waste of time, someone has helped us to configure, this popular ZSH configuration called---Oh My zsh!, intuitive effect as shown, code open source on GitHub.


Figure 5.1.1-1

    • Toggle default Shell to Zsh

Mac OS x is already installed by default zsh, you can open the terminal, enter zsh --version to confirm, if not installed, please refer to this document.

Open terminal and enter the following command to toggle the default shell to Zsh:

When the terminal is turned off, you will use zsh as the terminal shell by default. You will find, however, that the terminal does not become much cooler and then goes down,安装Oh My ZSH!

    • Install Oh My zsh!

Open terminal and enter the following command:

Wait patiently for a while, and you'll find your terminal turned into color.


Figure 5.1.1-2

You can change the profile of the terminal and choose a dark background profile, which makes it more cool. If you Oh My ZSH are not satisfied with the default color, please refer to here to find your favorite color.

5.1.2 Replacement system default Terminal--ITerm 2

If you use the terminal frequently, it is recommended that you use the Iterm and replace the system comes with the terminal. For the features of Iterm 2, see here.

Here I only introduce a small trick, I would like to set a shortcut key hypothesis for F12, in any case, I click on the shortcut key F12 pop-up terminal, enter some commands to execute, then click on the F12 terminal automatically hide, this is often used terminal people, such as often SSH connection to the server is too convenient.

The setup process is as follows:

    • The system has already assigned F12 by default Show Dashboard , and this setting needs to be canceled first.

Open System Preferences , select Keyboard , switch to Shortcuts this tab, click Mission Control , Cancel the corresponding F12 shortcut keys.

Figure 5.1.2-1

    • Open Iterm Preferences... , in the Profiles tab, click on the [ + ] Add a new profile, why create a new profile? The answer is to customize 弹出 the future of the terminal style and size and so on parameters. The new profile hypothesis is named Guake, (note: Guake this name is to pay tribute to the Guake terminal under Linux), you can make your own name, the following will be used.


Figure 5.1.2-2

Then switch to Window tab, and Style set the Screen Space same as these 3 values.


Figure 5.1.2-3

Then switch to Keys tab and set the F12 as shown Hotkey .


Figure 5.1.2-4

Now you press F12, immediately get a full screen of the black command line terminal, and then click the F12 hidden terminal, very convenient.

5.2 Command management under terminal--Homebrew

MAC APP Store You must be very familiar with it, it can help you to download and install most of the common software.

Under the terminal, we also need an app store-like management program, when you need to install a new command under a terminal, this program can help us to automatically download the command and related dependencies, and even after the download to do the necessary compilation and environment settings.

Homebrew is such a command Package manager under the terminal, the installation is very simple, copy the following command to run under the terminal, press Enter and enter the password to wait for the installation to succeed:

Here is the installation:


Figure 5.2-1

Curl and wget are common commands below the command line, where curl is already installed by default in OS X, but wget does not have a default installation, and the following shows how to use homebrew to install wget.

Here's how to run:

Figure 5.2-2

5.3 Terminal management of non-terminal software--Homebrew Cask

Because Apple does not allow third-party browsers to enter the Mac App Store, if you want to install Google Chrome, you can only run the installation files after downloading the Google site. This kind of App store does not have the software under the terminal can not enjoy the same homebrew command-line installation of the convenience of it?

Homebrew Cask is such a terminal program manager, it expands the Homebrew, as a useful supplement to the Mac App store, convenient for you to quickly maintain the daily software installation upgrade and uninstall, copy the following command to run under the terminal, press ENTER after waiting for installation success:

Here's how to run:


Figure 5.3-1

So how do I use homebrew cask to install Google Chrome? First use chrome as a keyword to find out:

The above command lists 4 candidates after it is run, obviously the last one google-chrome we want to install, continue to enter

Just wait a little while, and the latest version of Google Chrome will be installed in your MacBook.

5.4 Java Development Environment build 5.4.1 install Java and maven

Now OS X does not have the default installation JDK, if you enter in the terminal java , the system will guide you to the Oracle website to download, and then click on the download file to install, this process is not cool, and can not be automated. Now that you have homebrew Cask, just enter the following command, and Java will be installed automatically.

Now the most recent version of the JDK is 1.8,homebrew default installation of the latest version of the software, if you want to install a non-latest version of the JDK, then go to the Oracle website download, homebrew multi-version support is not very useful.

Similarly, enter the following command to install the latest version of Maven.

In the development, you are likely to encounter this error java.security.InvalidKeyException: Illegal key size or default parameters , it is because the U.S. export software encryption algorithm length limit, you need to go to the following link to download the patch package:

    • JCE Unlimited Policy for JDK 6
    • JCE Unlimited Policy for JDK 7
    • JCE Unlimited Policy for JDK 8

The patch replacement path is ${java.home}/jre/lib/security/ approximately as follows:

5.4.2 Install version control software--Smartgit & SMARTSVN

If the code is life, the version control system is the time machine. Git and subversion are now the most popular 2 version control systems, Smartgit and SMARTSVN are their third-party clients, of course, they have a lot of third-party clients, I think Smartgit and SMARTSVN is the best use.

5.4.3 Installing and configuring the IDE--IntelliJ idea

IntelliJ idea as the most intelligent Java IDE, recommended for all Java developers, you can download the installation file here, or use the following homebrew cask command to download the installation:

Open idea, recommend selection Darcula theme, shortcut map selection I‘ve never used IDEA , all the way to confirm go to the main interface.

It is recommended to use the version control client (Smartgit & smartsvn) to download the source code, then use idea to import the source code, because if you use idea to checkout source code, while the checkout side of the analysis of the code, for a multi-module MAVEN project , the idea of dynamic detection of the Spring framework configuration file may not be able to get a timely and complete dependency analysis.


Figure 5.4.2-1

We assume that the project is based on Maven, for example, select Maven :

Figure 5.4.2-2

All the [Next] way to the main interface, idea will help us automatically detect the dependent framework, and idea finds that we have used the OSGi and spring frameworks, clicked [Configure] , and then removed OSGi dependencies, because the sofa project is not fully implementing the OSGi specification, Tick the spring configuration file.


Figure 5.4.2-3

Idea will be created when you first import a project 索引 , patiently waiting for the index to be built, and then finding it quickly.

6. Meaning of the tool

工欲善其事, its prerequisite, tools are always used to solve problems, there is no need for tools and tools, all tools are to be able to quickly and accurately complete the work and learning tasks and services.

[Reprint] Efficient MacBook working environment configuration

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.