同步开发环境到一台全新的电脑
用了将近 10 年的 Mac 终于在 2017 年底的倒数第2天买了第一台 MacbookPro。怎么样一边玩游戏一边把电脑开发环境配置好呢?
开机之后先登录 MAS 更新系统补丁,安装Xcode 或 xcode-select --install,搞定 ClashX。
Preferences
Keyboard > Text >Disable “Correct spelling automatically”.Security and Privacy > Firewall >OnSecurity and Privacy > General >App Store and identified developersFile Sharing >OffTrackpad >Tap to clickKeyboard > Key Repeat >Fast (all the way to the right)Keyboard > Delay Until Repeat >Short (all the way to the right)Keyboard > Shortcuts > Input SourcesSelect the previous input sourceCMD + 空格,其它禁用Keyboard > Shortcuts > SpotlightShow Spotlight SearchALT + CMD + 空格,其它禁用Keyboard > Shortcuts选择下一个输入法使用CMD + 空格,其它禁用Dock >Automatically hide and show the Dock
DropBox
先配好全局跳墙,然后去 DropBox 官网下载客户端并登录同步自己的文件夹。这里有 Mackup 的全部配置。
Homebrew & Zsh Plugins
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap homebrew/bundle
brew tap caskroom/cask
如果开局已经登录 MAS 下面这步就可以忽略了。
brew install mas
mas signin email@email.com
执行 brew bundle exec -- bundle install 搞定全部软件。
这里 是我的 Brewfile。
按照这篇文章把 Zsh Plugins 配置好,这一步会同时把字体配置好。
Mackup
把软件配置都同步过来。
mackup restore
SpaceVim
curl -sLf https://spacevim.org/install.sh | bash
Dock && Menu
按照原来的电脑把 Dock 上的图标和 Menu 上的图标都排列好,正版软件都激活。
iTerm
- Set hotkey to open and close the terminal to
command + option + i - Go to
profiles -> Default -> TerminalChecksilence bellto disable the terminal session from making any sound - Go to
General -> PreferencesCheckLoad preferences from a custom folder or URL:选~/Dropbox/Apps/iterm2 - 修改 Profile 之后可以手动点
General -> Preferences -> Save settings to Folder - Download Mediallion theme
# Specify the preferences directory
defaults write com.googlecode.iterm2.plist PrefsCustomFolder -string "~/Dropbox/Apps/iTerm2"
# Tell iTerm2 to use the custom preferences in the directory
defaults write com.googlecode.iterm2.plist LoadPrefsFromCustomFolder -bool true
rbenv
确保安装了 brew install readline
RUBY_CONFIGURE_OPTS=--with-readline-dir="$(brew --prefix readline)" rbenv install 2.5.0
Other
- VSCode
Sync:download settings同步已经安装的插件和快捷键等配置 - Alfred
defaults write com.runningwithcrayons.Alfred-Preferences-3 dropbox.allowappsfolder -bool TRUE然后修改 General 中的 sync 文件夹到~/Dropbox/Apps/Alfred - AirDrop 把
~/.ssh中的id_rsa和id_rsa.pub拿过来,所有电脑用同一套 ssh key - 网页登录各种账户 chrome,github, things, spotify 什么的
- 如果有些词打不出来,可以更新一下词库 https://github.com/rime-aca/dictionaries
defaults write com.sublimetext.3 ApplePressAndHoldEnabled -bool falseholding down a key won’t repeat itsudo spctl --master-disable启用安装任何来源的应用brew cask install qlcolorcode qlstephen qlmarkdown quicklook-json qlimagesize suspicious-package quicklookase qlvideo安装 Quick Look plugins
其它软件的安装
- Kaleidoscope
- mubu
相关链接
- https://github.com/taniarascia/mac
- https://github.com/sb2nov/mac-setup
- https://github.com/nicolashery/mac-dev-setup
- https://mallinson.ca/osx-web-development/
- https://www.taniarascia.com/setting-up-a-brand-new-mac-for-development/
- https://github.com/Homebrew/homebrew-bundle
- https://robots.thoughtbot.com/brewfile-a-gemfile-but-for-homebrew
- https://github.com/sharat/vscode-brewfile
- https://www.sublimetext.com/docs/3/vintage.html
- Quick Look plugins
