xcode 단축키 추가 하기
Visual Studio Code나 이클립스등에서 지원하는
한줄 복사, 한줄 삭제등이 기본지정이 안되어서 불편하다
터미널을 열고
cd /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
sudo -s, //관리자 권한으로 수정해야 한다.
vi IDETextKeyBindingSet.plist // 파일을 열고 제일 마지막 노드에
<key>Custom</key> <dict> <key>Duplicate Current Line</key> <string>moveToBeginningOfLine:, deleteToEndOfLine:, yank:, insertNewline:, moveToBeginningOfLine:, yank:</string> <key>Duplicate Lines</key> <string>selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:</string> <key>Delete Line</key> <string>selectLine:, deleteBackward:</string> </dict>
추가를 해주고 저장
:wq가 먹지 않고 readonly 어쩌구 하면
:w! 로 하면된다.
xcode를 종료 했다 다시 실행 하고
xcode menu > preferences > key bindings > Text 탭을 선택
Custom 을찾아서 Duplicate Current Line에 원하는 키를 종합해서 누르면 된다.
참조: https://gist.github.com/emotality/b1bcb2bb8a07921f9c8cad1c969daedf