Xcode 13.1 Duplicate Line shortcut setting

River·2023년 3월 28일
0

Xcode

목록 보기
1/1

1. 터미널(Terminal)

터미널 열고 아래의 코드 실행하기

  • Terminal
  • iTerm2
sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources//IDETextKeyBindingSet.plist
sudo chmod 777 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/

2. Finder

  • Finder 열기
  • Cmd + Shift + G 입력한 뒤 아래 경로 붙여넣고 검색
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/

3. IDETextKeyBindingSet.plist

  • 위 file 을 찾은 뒤 text editor 로 열기

4. 코드 추가 (Append)

아래의 코드를 추가(Append)하기

<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>

5. Xcode 재시작하기


6. Preferences

  • Xcode 에서 Preference 열기
    Key Bindings → Duplicate Lines 검색
  • 원하는 단축키 설정하기

끝!

profile
Passionate about My Dreams

0개의 댓글