Front end programmer Mac ultrafast installation guide

preface

Recently, the company's computer has been upgraded. The company has equipped a 16 inch New mbp. After the original 15 inch mbp is purchased, all the hard disks are cleaned and used by myself, which means that I have to install the computer twice. The installation of the programmer's computer means that a large number of configurations, software and plug-ins need to be set, which is easy to be omitted. After installing one machine and before installing the second machine, it is specially sorted out and shared for your reference, I'm a front-end programmer, so maybe part of the content is more suitable for the front-end, so we can choose by ourselves.

basic content

git

Entering git command in mac terminal will prompt you to install xcode, but xcode is very large, and front-end programmers don't need it very much, so you can only install git through the following command.

$ xcode-select --install
$ git init
 Copy code

accelerate

If you change the host configuration yourself, it will improve, but it is limited. It is recommended to buy vpn

# GitHub Start
52.74.223.119 github.com
192.30.253.119 gist.github.com
54.169.195.247 api.github.com
185.199.111.153 assets-cdn.github.com
151.101.76.133 raw.githubusercontent.com
151.101.108.133 user-images.githubusercontent.com
151.101.76.133 gist.githubusercontent.com
151.101.76.133 cloud.githubusercontent.com
151.101.76.133 camo.githubusercontent.com
151.101.76.133 avatars0.githubusercontent.com
151.101.76.133 avatars1.githubusercontent.com
151.101.76.133 avatars2.githubusercontent.com
151.101.76.133 avatars3.githubusercontent.com
151.101.76.133 avatars4.githubusercontent.com
151.101.76.133 avatars5.githubusercontent.com
151.101.76.133 avatars6.githubusercontent.com
151.101.76.133 avatars7.githubusercontent.com
151.101.76.133 avatars8.githubusercontent.com
# GitHub End

Copy code

Many people solve the problem of slow speed by setting ip, but many times, even if ip is set, the clone is still very slow. Here I recommend the following methods to be easy to use.

You can put the original

git clone https://github.com/xxx.git
 Copy code

Change to:

git clone https://github.com.cnpmjs.org/xxx.git
 Copy code

My profile

First clone some configuration information to help the quick installation in the form of some scripts (this set of configuration is the configuration information of the great God of Fengcheng in my team. I fork down some modifications. If there is a customization demand, I can fork it down for modification)

$ git clone https://github.com/wang516038746/dot-files.git
$ chmod +x *.sh
 Copy code

ssh

For a new computer and a new ssh key, enter the password after execution

$ ssh-keygen -t rsa -C "youremail@example.com"
Copy code

brew

Enter the dot files file under the clone

cd dot-files
 Copy code

Install homebrew
Direct use homebrew The address provided may be blocked or slow
You can install through my configuration and make sure you are in my dot files directory before using

/bin/bash ./brew_install
 Copy code

(100% success is not guaranteed. If not, please find another method to install it by yourself)
I often get stuck in this step when I use it personally

 

Click ctrl+c to close and restart. Some downloaded will be downloaded quickly. If you restart, this error will appear

 

First execute the following command and replace your name with your folder name

 

$ rm /Users/youname/Library/Caches/Homebrew/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
$ /bin/bash ./brew_install
 Copy code

iTerm2

Directly through iTerm2 official website Download and decompress to use

 

 

iterm2 adjustment

to configure

$ cp iterm2 ~/Library/Application\ Support/iTerm2/DynamicProfiles/
Copy code

Settings take effect

After restarting iterm2, you should be able to see the imported configuration in the Preferences > profiles interface

Additional shortcut keys:

  • alt + →: move the cursor right one word
  • alt + ←: move the cursor right one word
  • alt + del: delete a word

Some settings can be referred to

 

 

 

 

 

 

zsh

install oh-my-zsh

$ sh zsh_install.sh 
Copy code

Install the highlight plug-in

$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
 Copy code

zsh configuration

$ cp .zshrc ~/.zshrc
$ source ~/.zshrc
 Copy code

vim

I use SpaceVim

$ curl -sLf https://spacevim.org/cn/install.sh | bash -s -- -h
 Copy code

It is recommended to reinstall the VIM to cover the system vim

$ brew reinstall vim
 Copy code

SpaceVim configuration

$ cp .space-vim.toml ~/.SpaceVim.d/init.toml
 Copy code

nvm

node version management push nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
 Copy code

nvm loads lazily to increase the speed of opening zsh for the first time. Please choose to add it according to the actual situation, which will affect the default nvm instruction. Just replace the content put into zshrc by nvm (CP. Zshrc ~ /. Zshrc has been executed and can be ignored)

export PATH="~/.nvm/versions/node/v10.14.2/bin:$PATH"

nvm(){
   unfunction "nvm"
   [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"   # This loads nvm
   [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_↷

   nvm "$@"
}
Copy code

node npm

$ nvm install 10
$ nvm alias default 10
 Copy code

Install npm global dependencies. See the file brew casts for the installation list

$ ./npm.sh
$ nrm use taobao
 Copy code

yarn

Installing yarn using brew

$ brew install yarn --without-node
 Copy code

brew install other software

Install the software through brew. It is recommended to install it finally. See the file brew casts for the installation list

$ ./brew.sh
 Copy code

typeface

homebrew-cask-fonts

$ brew tap homebrew/cask-fonts
 Copy code

Font recommended Fira Code

$ brew cask install font-fira-code
$ brew cask install font-meslo-for-powerline
$ brew cask install font-sarasa-gothic          # More gauze blackbody
 Copy code

Tool software

vscode

vscode

Start vscode with the code command
Open Command + shift + p input shell

 

 

 

Migration plug-in and configuration information
Via Settings Sync extension

browser

chrome browser
google accounts can migrate all information, including browsing records

Microsoft Edge
This really smells good. Whoever uses it knows. Anyway, I use Edge for all my spare time activities except chrome at work

snipaste

Screenshot artifact, snipaste official website

set up file

$ cp .snipaste ~/.snipaste/config.ini
 Copy code

Shortcut key

  • ⌘ + ⌃ + a: screenshot

paste

Copy paste artifact
Will record the history you copied ⌘ + shift + v select the paste content


 

Posted by helz on Wed, 25 May 2022 04:51:56 +0300