Mac Dev Environment
HomeBrew
1/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Use homebrew install package
1brew install wget
2brew install go
Oh-my-zsh
1sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
2
3# sudo chsh -s $(which zsh)
Modify Keys
settings -> Keyboard -> modifyKeys
1Caplock -> Command
Software
highly recommended
-
Iterm2: Mac terminal replacement
-
Alfred
-
Dash
-
Istat Menus
-
Xnip: for screenshot
Recommend
- Wireshark
- Sublime
- Chrome
- Typora
Others
- alt tab
- Irvue: for desktop picture
- Magnet: for window split
- Cleanmymac
CLI Tools
1tmux
2vim
3git
4golang
Vim Config
1# ~/.vimrc
2cat <<EOF| tee -a ~/.vimrc
3set nu
4syntax on
5inoremap jj <ESC>
6
7
8set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
9set termencoding=utf-8
10set encoding=utf-8
11
12" show existing tab with 4 spaces width
13set tabstop=4
14" when indenting with '>', use 4 spaces width
15set shiftwidth=4
16" On pressing tab, insert 4 spaces
17set expandtab
18
19EOF
Golang
1brew install golang
2
3echo '
4GOPATH=~/go
5GOBIN=$GOPATH/bin
6PATH=$PATH:$GOBIN
7'| tee -a ~/.zshrc
Font
hack
: A typeface designed for source code
https://github.com/source-foundry/Hack
K8s for zsh
1echo 'source <(kubectl completion zsh)' >>~/.zshrc
2echo 'alias k=kubectl' >>~/.zshrc
3echo 'compdef __start_kubectl k' >>~/.zshrc
4source ~/.zshrc
Network Tools
1# for ip command
2brew install iproute2mac
Git configuration
1git config --global init.defaultBranch main