This is the first post of the FlutterTips project. I would like to share my tips on how to install the basic environment (mainly so that new people can install the basic environment with one click). Welcome to Star this project, thank you!
This article mainly includes: BREW, Brew Cask, iTerm2, INSTALL ZSH and configuration, remodeling suggestions, recommended software, worth buying charging software several dimensions to share my Mac basic working environment and Settings.
Start from the terminal
1. Homebrew
Famous package manager software, every Mac developer must install package manager. And here’s a little story that’s been told a lot:
Homebrew author Max Howell was rejected for an interview at Google the other day because he couldn’t write pseudo code on the whiteboard to flip binary trees. A furious Max tweeted: “Google: 90% of our engineers are using Homebrew, but you can’t flip binary trees on whiteboard, so fuck off.”
Without further ado, please directly open the terminal installation, run the following command:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Copy the code
Once installed, verify the status by running the following command:
brew doctor
Copy the code
We can search for packages using Brew Search Foo and brew List to see installed packages. You can see other uses in brew –help.
2. iTerm2 + zsh + oh-my-zsh + zsh-completions
First you need to install iTerm2, which is far better than the Mac terminal software. Why not ask the magic of Google?
brew cask install iTerm2
Copy the code
Then you need to install some plug-ins and configurations
brew install zsh zsh-completions autojump
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Copy the code
The Autojump plugin needs to insert a line of command in ~/.zshrc and run the following command directly from iTerm2:
echo "\n# Autojump\n[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh" >> ~/.zshrc
Copy the code
Autojump is a terminal quick file switching command tool, you can quickly jump to the history folder. You can see more usage on Github
Finally, we need to load the Settings we just did. You can also restart iTerm2
source ~/.zshrc
Copy the code
3. tree
This is a command that outputs the current file structure on the command line, which is ideal for viewing directory structures in blogs.
brew install tree
Copy the code
When using the tree command, you can get the following print:
➜ Go onto those who qualify. ├── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ── ─ Basic - 00 - setupmymac. Md │ └ ─ ─ basic - 01 - singleton. Md ├ ─ ─ practice └ ─ ─ tools 5 directories, 4 filesCopy the code
Installing Required Software
1. cask
Cask is an extension of BREW for managing distributed software. Cask is usually installed by default. If you can’t find cask, you can install it again using BREW:
brew install cask
Copy the code
If you want to view installed software, you can run:
brew cask list
Copy the code
1. Basic editor
VSCode is my recommended base editor and can be used to write almost any file. If you’re not a Vim or Emacs veteran, this is a great preview editor for everything.
brew cask install visual-studio-code
Copy the code
After the installation is complete, we need to enable the command line support: on the menu bar view > Command panel, enter shell command to find Install ‘code’ command in PATH and select it.
Plug-in to share
Here are some commonly used plugins, more plugins and environments to find on demand.
Bracket Pair Colorizer GitLens Git prompt markdownLint Markdown Preview Enhanced Markdown Support flow chart Output Colorizer Output coloring VScode – ICONS icon beautification
2. Change keys to improve efficiency
Karabiner-elements change key artifact
brew cask install karabiner-elements
Copy the code
My habit is to change Caps Lock ⇪ (case toggle key) to control ⌃ key, change input method toggle to Command ⌘ + space, and change Spotlight to option ⌥ + space. The advantages of this are obvious. Caps Lock ⇪ is easier to press than control ⌃ to the left, while Caps Lock ⇪ maps to ⌃ + ⌘ + ⇧ + port. More widely applicable (such as control ⌃ + c, which is often used on the command line).
I will also map control ⌃ + I /j/ K/L to ↑←↓→ and control ⌃ + U/O to PageUp/PageDown so that we can move the cursor quickly without leaving the keyboard area with both hands. Of course, for Vim and Emacs players, it can be directly mapped to the corresponding shortcut keys, so that a more unified button experience can be achieved.
It’s also worth noting that Control + H is also very happy to use as the delete key. This shortcut is implemented in MAC mode, but conflicts with some editors. It is recommended that the backspace key be set to Control ⌃ + h depending on the editor environment.
Here is a simple configuration. After installing Karabiner-Elements, you can do this by overwriting the configuration file to the ~/.config/karabiner directory. Simple configuration
3. Basic tools
usebrew cask install
Command to install basic tools
Google – Chrome Google Browser
Keka decompression tool, because MAC does not support native 7z/ RAR compression formats.
Teamviewer remote assistance
Aliwangwang
Dingtalk nail nail, a lot of Ali technology live also need to use
Evernote
Qq tencent qq
Wechat WeChat
9, Netease Displays a Dict
Sourcetree Git GUI
Boostnote Markdown notebook
Aria2gui download tool
Foxmail Mail client
Android – Studio Android development tool
Docker container environment
Kitematic Docker visualization
Vritualbox virtual machine
The lantern blue light VPN
Brew Cask install Google – Chrome
4. Productivity tools
In addition to the Karabiner-Elements mentioned above, there are other gadgets recommended to improve your productivity:
Manico charges and can map shortcuts to open and hide apps. This greatly reduces the amount of time I spend using the trackpad, which I use on average about 200 times a day, according to the built-in display.
Moom charges a fee to allow Windows to be docked quickly to preset values. Allows us to quickly maximize, or fill half the screen. It’s also possible to quickly maximize Windows to another screen in the context of the ubiquitous MacBook Pro.
While Bartender charges, you can make the toolbar on the upper right fold up as required. Let’s make the whole window look cleaner. In addition, I will hide all interference software prompts (such as QQ), so that I get a “focused working environment”, only when I have a gap, I will check wechat and QQ, reduce passive interference.
1Password charges a fee, and while it costs more to upgrade, it still works well. But I’ve been using Chrome’s own password tool to generate and save passwords, and it’s much easier to refill them.
4. About using Google search
As a programmer, I often need to diagnose problems thrown by some programs. It is recommended to use Google to search for problems. If there is no VPN, you can also directly visit StackOverflow to search for problems. Use less Baidu, protect IQ.