为什么要修改快捷键?
- 公认快捷键不够人性化,不符合科学,会手指脱离f,j坐标
- 自己的一套快捷键可以轻松上手任意开发工具,何乐而不为?
吐槽
网上全是一堆快捷键的操作教程,然而并没有发现有导入导出的教程,可是作为快捷键修改强迫症患者,从eclipse 到android studio, 都被我定制成了自己的快捷键,可是xcode竟然不支持导出,这完全是受不了的,必须研究,吐槽xcode垃圾也没用,事实上,就运行速度。
我这2手的mac 2016版本秒杀我的window笔记本 中的 cloin c开发工具 ,c代码写完运行n久, 而mac打开软件, 编译 c代码速度都是神速了。
我不知道ma c版本的c lo in开发工具速度如何。。
分析
首先,mac版本的Android studio 清理代码如下;
终端输入命令:
rm -Rf
~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf
~/Library/Application\
Support/AndroidStudio*
rm -Rf
~/Library/Logs/AndroidStudio*
rm -Rf
~/Library/Caches/AndroidStudio*
那么找出Xcode的配置文件我觉得应该不是难事,那么我就直接分析了哈。
结果没分析出来,但是我倒是理解了这个东西和window差不多,弄到了自己用户目录下的隐藏数据目录了。 这个目录隐藏了,
开始教程
我给大家找出来了,顺便贴上代码直接复制 到桌面。
备份快捷键到桌面的终端代码如下:
备份快捷键文件到桌面
cp ~/Library/Developer/Xcode/UserData/KeyBindings/Default.idekeybindings ~/Desktop
还原代码快捷键文件
也是一样的,改一下代码就可以
cp ~/Desktop/Default.idekeybindings ~/Library/Developer/Xcode/UserData/KeyBindings/Default.idekeybindings
手动拷贝的方法
先把目录显示出来
显示隐藏目录
defaults write com.apple.finder AppleShowAllFiles -bool true 此命令显示隐藏文件
defaults write com.apple.finder AppleShowAllFiles -bool false 此命令关闭显示隐藏文件
进入此目录
命令运行之后需要重新加载Finder:快捷键option+command+esc,选中Finder,重新启动即可
手动进入目录
~/Library/Developer/Xcode/UserData/KeyBindings
最后分享我的配置文件其实我的打开内容如下
Menu Key Bindings
Key Bindings
Action
moveCurrentLineDown:
Alternate
NO
CommandGroupID
Xcode.IDESourceEditor.CmdDefinition.MoveLineDown
CommandID
Xcode.IDESourceEditor.CmdDefinition.MoveLineDown
Group
Editor Menu for Asset Catalog Comparison
GroupID
Xcode.IDESourceCodeComparisonEditor.MenuDefinition.Editor
GroupedAlternate
NO
Keyboard Shortcut
^s
Navigation
NO
Parent Title
Structure
Title
Move Line Down
Action
moveCurrentLineDown:
Alternate
NO
CommandGroupID
Xcode.IDESourceEditor.CmdDefinition.MoveLineDown
CommandID
Xcode.IDESourceEditor.CmdDefinition.MoveLineDown
Group
Editor Menu for Playground
GroupID
Xcode.IDEPegasusPlaygroundEditor.MenuDefinition.Editor
GroupedAlternate
NO
Keyboard Shortcut
^s
Navigation
NO
Parent Title
Structure
Title
Move Line Down
Action
moveCurrentLineDown:
Alternate
NO
CommandGroupID
Xcode.IDESourceEditor.CmdDefinition.MoveLineDown
CommandID
Xcode.IDESourceEditor.CmdDefinition.MoveLineDown
Group
Editor Menu for Source Code
GroupID
Xcode.IDEPegasusSourceEditor.MenuDefinition.Editor
GroupedAlternate
NO
Keyboard Shortcut
^s
Navigation
NO
Parent Title
Structure
Title
Move Line Down
Action
moveCurrentLineDown:
Alternate
NO
CommandGroupID
Xcode.IDESourceEditor.CmdDefinition.MoveLineDown
CommandID
Xcode.IDESourceEditor.CmdDefinition.MoveLineDown
Group
Editor Menu for Source Code Comparison
GroupID
Xcode.IDESourceCodeComparisonEditor.MenuDefinition.Editor
GroupedAlternate
NO
Keyboard Shortcut
^s
Navigation
NO
Parent Title
Structure
Title
Move Line Down
Action
moveCurrentLineUp:
Alternate
NO
CommandGroupID
Xcode.IDESourceEditor.CmdDefinition.MoveLineUp
CommandID
Xcode.IDESourceEditor.CmdDefinition.MoveLineUp
Group
Editor Menu for Asset Catalog Comparison
GroupID
Xcode.IDESourceCodeComparisonEditor.MenuDefinition.Editor
GroupedAlternate
NO
Keyboard Shortcut
^w
Navigation
NO
Parent Title
Structure
Title
Move Line Up
Action
moveCurrentLineUp:
Alternate
NO
CommandGroupID
Xcode.IDESourceEditor.CmdDefinition.MoveLineUp
CommandID
Xcode.IDESourceEditor.CmdDefinition.MoveLineUp
Group
Editor Menu for Playground
GroupID
Xcode.IDEPegasusPlaygroundEditor.MenuDefinition.Editor
GroupedAlternate
NO
Keyboard Shortcut
^w
Navigation
NO
Parent Title
Structure
Title
Move Line Up
Action
moveCurrentLineUp:
Alternate
NO
CommandGroupID
Xcode.IDESourceEditor.CmdDefinition.MoveLineUp
CommandID
Xcode.IDESourceEditor.CmdDefinition.MoveLineUp
Group
Editor Menu for Source Code
GroupID
Xcode.IDEPegasusSourceEditor.MenuDefinition.Editor
GroupedAlternate
NO
Keyboard Shortcut
^w
Navigation
NO
Parent Title
Structure
Title
Move Line Up
Action
moveCurrentLineUp:
Alternate
NO
CommandGroupID
Xcode.IDESourceEditor.CmdDefinition.MoveLineUp
CommandID
Xcode.IDESourceEditor.CmdDefinition.MoveLineUp
Group
Editor Menu for Source Code Comparison
GroupID
Xcode.IDESourceCodeComparisonEditor.MenuDefinition.Editor
GroupedAlternate
NO
Keyboard Shortcut
^w
Navigation
NO
Parent Title
Structure
Title
Move Line Up
Version
3
Text Key Bindings
Key Bindings
deleteToMark:
deleteForward:
$@X
capitalizeWord:
$W
insertNewline:
^d
deleteLine:
^u
moveToLeftEndOfLine:
Version
3
编码内容格式是utf-8