前言
古人言,工欲善其事,必先利其器。如下内容是从Ubuntu入坑MAC两年多的积累,供大家参考。注:文档会陆续的完善!
效率/基础工具
- chrome 必须呀,书签同步,密码管理。
- AlfredAlfred 替换自带的find,早用早enjoy
- iterm2,+ ohmyz/命令行工作环境的首选
- homebrew 安装其它命令工具的工具
- charles 截包工具,研发必装神器之一
- postman,同charles,调试网络协议,模拟网络请求的神器之一
- virtualbox,还是离不开window系统的,所以需要安装个虚拟机, 首推virtaulbox
- Beyond Compare ,文件夹/文件对比工具首选
- 提高效率的命令行环境配置汇总(.bash_profile文件的内容)
开发/工作环境
- Android的开发环境(基础套件)
- jdk 官网下载,傻瓜式安装,mac上默认配置好路径可以在终端下使用的
- Android studio 官网下载,也是傻瓜式安装。注:AS是仅自带了jre[java运行时],javac应该也是AS内嵌的,建议还是自己安装一套JDK
- genymotionAndroid模拟器首选
- git安装
- 已经自带,可以用brew install 升级
- git ssh key生成
# 运行如下命令后,最简单的操作是一路回车,最终产生的公钥文件/Users/xxx/id_rsa.pub ssh-keygen -t rsa -C "your_email@example.com"
- git基础配置(常用命令alias,自补全),在.bash_profile添加如下代码
# for git # 自动补全 git-completion.bash从git源码获取 git clone https://github.com/git/git.git 或直接下载 https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash source ${HOME}/dev_tool/git/contrib/completion/git-completion.bash # 常用alias,参考网络上的 alias g='git' alias gst='git status' alias gd='git diff' alias gdc='git diff --cached' alias gl='git pull' alias gup='git pull --rebase' alias gp='git push' alias gd='git diff' alias gc='git commit -v' alias gc!='git commit -v --amend' alias gca='git commit -v -a' alias gca!='git commit -v -a --amend' alias gcmsg='git commit -m' alias gco='git checkout' alias gcm='git checkout master' alias gr='git remote' alias grv='git remote -v' alias grmv='git remote rename' alias grrm='git remote remove' alias grset='git remote set-url' alias grup='git remote update' alias grbi='git rebase -i' alias grbc='git rebase --continue' alias grba='git rebase --abort' alias gb='git branch' alias gba='git branch -a' alias gcount='git shortlog -sn' alias gcl='git config --list' alias gcp='git cherry-pick' alias glg='git log --stat --max-count=10' alias glgg='git log --graph --max-count=10' alias glgga='git log --graph --decorate --all' alias glo='git log --oneline' alias gss='git status -s' alias ga='git add' alias gm='git merge' alias grh='git reset HEAD' alias grhh='git reset HEAD --hard' alias gclean='git reset --hard && git clean -dfx' alias gwc='git whatchanged -p --abbrev-commit --pretty=medium'
常用/至爱工具
- 命令行工具
brew install xxx- tree 在命令行下于树形方式查看目录或文件列表
- ag 更快更易用的全文搜索工具
- 编辑器
- 其它工具
- The Unarchiver 万能解压/压缩工具
- CheatSheet 快捷键帮助工具
- 钉钉 自带的裁图可以了,不需要额外装
- 有道词典
- 搜狗输入法
- SourceTree
- 用于Microsoft Office的模版中心——让人欲罢不能的万能型模板类软件
工具/习惯配置
Android Studio
常用插件
- Genymotion 不解释
Git的配置
-
.gitconfig文件
[core] excludesfile = /Users/luogw/.gitignore_global editor = emacs [color] ui = true [user] name = luogw email = xxxx@163.com [alias] co = checkout br = branch ci = commit st = status last = log -1 HEAD brav = branch -av logp = log --pretty=format:\"%h - %an, %ar : %s\" logpg = log --pretty=format:\"%h - %an, %ar : %s\" --graph log1 = log --pretty=oneline log1g = log --pretty=oneline --graph rv = remote -v [filter "lfs"] clean = git-lfs clean %f smudge = git-lfs smudge %f required = true
-
.gitignore_global文件
*~ .DS_Store build/ build.gradle gradle gradlew gradlew.bat
-
设置类成员字段前缀,避免自动生成setter与getter方法时加上m等前缀
Iterm2
iTerm2下 alt+b 和 alt+f 可以使用
Emacs
常用插件
.emacs配置
系统设置
效率与习惯
Mac终端自动补全忽略大小写
在home目录下的.inputrc文件添加如下代码(没有.inputrc就新建一个)
set completion-ignore-case on
set show-all-if-ambiguous on
TAB: menu-complete
按键调换,利用Karabiner
- caps与左control交换
- ’与右control交换
打开fn组合键
mac默认下F1至F12是对于的系统快键键(如屏幕亮度调节,声量调试),会让很多软件使用不了Command + Fx等组合健。如在AS上按command + F12时会不效,效果就是单按F12,声量调大的系统快键键的效果了。所以需要将Fn键前缀组合开关打开,
如下图所示: