iOS开发常用路径
iOS新系统版本支持
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Xcode缓存
~/Library/Developer/Xcode/DerivedData
描述文件
~/Library/MobileDevice/Provisioning Profiles
系统模板
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File Templates/iOS/Source
自定义模板
~/Library/Developer/Xcode/Templates
系统代码块
/Applications/Xcode.app/Contents/PlugIns/IDESourceEditor.framework/Versions/A/Resources/SystemCodeSnippets.codesnippets
自定义代码块
~/Library/Developer/Xcode/UserData/CodeSnippets/
oh my zsh 命令(有几个是自定义的)
gaa -> git add --all
gcm -> git commit -m
gd -> git diff
gl -> git pull
gp -> git push
gco -> git checkout
gcb -> git checkout -b
gm -> git merge
gb -> git branch
gbd -> git branch -d
gbD -> git branch -D
grh -> git reset --hard
gst -> git status
gsta -> git stash push
gstp -> git stash pop
gstc -> git stash clear
gstl -> git stash list
gcam -> git commit --amend -m
常用终端命令
从远程拉代码(想要分支名不同时)
git checkout -b 本地分支 origin/远程分支
删除远程分支
git push origin --delete
回退远程代码
git push origin HEAD --force
回退本地代码
git reset --hard commitid
修改最近一次提交描述
git commit --amend -m
把不同写入文本文档
git diff commitid1 commitid2 > diff.txt
显示隐藏文件
defaults write com.apple.finder AppleShowAllFiles -boolean true; killall Finder
允许任何来源
sudo spctl --master-disable
发送通知
osascript -e 'display notification "通知内容" with title "通知标题"'
弹窗
osascript -e 'display dialog "弹窗内容"'
常用快捷键(有几个是自定义的)
Xcode快捷键 | 快捷键含义 |
---|---|
⌃(control) + L | 将光标所在行置于窗口正中间 |
⌥(option) + 左/右 | 光标向左/向右移动一个单词 |
⌘(command) + 0/1/4/5/8 | 显示或隐藏左侧/代码/搜索/警告/断点 |
⌘(command) + \ | 打断点或去断点 |
⇧(shift) + ⌘(command) + 1 | Xcode欢迎页 |
⇧(shift) + ⌘(command) + C | 聚焦控制台 |
⇧(shift) + ⌃(control) + D | 删除选中行 |
⇧(shift) + ⌃(control) + 上/下 | 多行光标 |
⌥(option) + ⌘(command) + 0/1/2/4 | 显示或隐藏右侧/文件/历史/属性 |
⌥(option) + ⌘(command) + D | 隐藏搜索框 |
⌥(option) + ⌘(command) + ` | 聚焦下一个区域 |
⌃(control) + ⌘(command) + E | 修改当前选中变量名 |
⌃(control) + ⌘(command) + 上/下 | .h和.m切换 |
⌃(control) + ⌘(command) + 左/右 | 返回上一个文件/回到下一个文件 |
⌃(control) + ⌘(command) + [/] | 切换Scheme |
⌃(control) + ⌥(option) + ⌘(command) + [/] | 切换模拟器 |
⌃(control) + ⇧(shift) + ⌘(command) + A | 显示或隐藏git用户 |
⌥(option) + ⇧(shift) + ⌘(command) + ↩︎ | 左右对比代码 |
⌘(command) + ` | 切换Xcode窗口 |
⌘(command) + F | 搜索 |
⌃(control) + I | 自动缩进 |
⌘(command) + K | 清空控制台 |
⌘(command) + L | 快速定位到某一行 |
⌘(command) + 上/下/左/右 | 光标移到首行/尾行/行首/行尾 |
⌘(command) + [/] | 向左/向右缩进 |
⇧(shift) + ⌘(command) + J | 定位到当前文件 |
⇧(shift) + ⌘(command) + F | 全局搜索 |
⇧(shift) + ⌘(command) + O | 快速打开(文件/类/方法) |
⇧(shift) + ⌘(command) + E | 显示或隐藏控制台 |
⌥(option) + ⌘(command) + [/] | 将代码上移/下移 |
⌥(option) + ⌘(command) + 左/右 | 折叠/显示大括号 |
⌥(option) + ⌘(command) + S | 保存全部文件 |
⌥(option) + ⌘(command) + / | 增加注释 |
⌥(option) + ⌘(command) + C | commit |
Finder快捷键 | 快捷键含义 |
---|---|
⌘(command) + I | 显示选中文件的简介 |
⇧(shift) + ⌘(command) + . | 显示或隐藏系统隐藏文件 |
⇧(shift) + ⌘(command) + ⌫(delete) | 清空回收站 |
全局快捷键 | 快捷键含义 |
---|---|
⇧(shift) + ⌃(control) + ⏏︎(电源键) | 关闭显示器 |
⌃(control) + ⌘(command) + Q | 锁定电脑 |
⌃(control) + ⏏︎(电源键) | 关机(有提示) |
⌃(control) + ⌥(option) + ⌘(command) + ⏏︎(电源键) | 关机(没提示) |