iOS 개발자, 새로운 맥북 세팅 정리

dodo·2025년 1월 28일
0
post-thumbnail

이번에 회사에서 새로운 맥북을 받게 되었습니다.

앞으로도 회사에 다니다 보면 맥북을 자주 사고 바꿀 것 같은데.. 기록 및 커맨드를 남기기 위해서 적어봅니다.

자동화 하시는 분들도 있는데.. 어느정도 정리하다 보면 그렇게 시간이 오래걸리지 않을 것 같아서 기록해둡니다.

설치할 앱

  • HomeBrew
  • IDE
    • Xcode
    • Visual Studio Code
    • Pycharm
  • iTerm
  • 업무용 툴
    • Slack, Notion
  • Chrome
  • Fork (Git GUI)
  • ChatGPT
  • Raycast
  • Karabiner-Elements
  • Daisy Disk (App Store)
  • neo vim

macOS 설정

  • 세 손가락 드래그 (설정 > 드래그 스타일 (포인터 제어))
  • 포인터 크기 (설정 > 포인터 크기(디스플레이))
  • 키보드 (설정 > 키보드)
    • 키 반복 속도 빠르게, 반복 지연시간 짧게
  • 자동완성 기능 끄기 (맞춤법, 점 찍어주기, 자동으로 대문자 시작 등)
  • 데스크탑 및 Dock > 자동으로 Dock 가리기

터미널 설정

  • oh my zsh 설치
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# 플러그인 설치
brew install zsh-autosuggestions zsh-syntax-highlighting autojump

# .zshrc 파일에 추가

echo "source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
echo "source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc

source ~/.zshrc
  • zshrc 파일에서 테마를 ZSH_THEME="agnoster" 로 변경 (디렉토리 등 표시됨)
  • 프롬프트 지우기
echo 'prompt_context() {
  prompt_segment black default "dohyun 🐳"
}' >> ~/.zshrc

source ~/.zshrc
  • 폰트 설치

brew tap homebrew/cask-fonts
brew install --cask font-fira-code

  • 폰트 변경

  • 키보드 옵션 이동, 커맨드 이동
    export, import 할 수 있다. velog에서는 파일 업로드가 안되는 것 같으니.. 나중에 개인 백업에 저장해서 사용.

  - Command + Left Arrow (줄 맨 앞으로 이동):
	•	Escape Sequence: Esc + OH
	•	Keyboard Shortcut: Command + Left Arrow
	•	Action: Send Escape Sequence

  - Command + Right Arrow (줄 맨 끝으로 이동):
	•	Escape Sequence: Esc + OF
	•	Keyboard Shortcut: Command + Right Arrow
	•	Action: Send Escape Sequence

  - Option + Left Arrow (단어 왼쪽으로 이동):
	•	Escape Sequence: Esc + b
	•	Keyboard Shortcut: Option + Left Arrow
	•	Action: Send Escape Sequence

  - Option + Right Arrow (단어 오른쪽으로 이동):
	•	Escape Sequence: Esc + f
	•	Keyboard Shortcut: Option + Right Arrow
	•	Action: Send Escape Sequence

  - 단어 삭제: Send HexCode, 0x17
  - 줄 삭제: Send Hexcode, 0x15!
  • Status Bar 설정

  • Appearance > General > Status bar location: Bottom

  • 테마 다운로드

  • 한글 파일 분리 현상 (Unicode normalization -> NFC)

  • 투명도 추가

    • Profiles > Window > Transparency & Blur

IDE 설정

Xcode

git clone https://github.com/bojan/xcode-one-dark
mv xcode-one-dark/One Dark.xccolortheme ~/Library/Developer/Xcode/UserData/FontAndColorThemes

# Xcode 완전히 종료 후 다시 실행 Settings > Themes 에서 확인.

  • Visual Studio Code
echo 'export PATH="/Applications/Visual Studio Code.app/Contents/Resources/app/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Git alias

git config --global alias.co 'checkout'
git config --global alias.br 'branch'

git config --global push.autoSetupRemote true

# 브랜치 룰 g b ios 1234 add issue -> g co -b feature/IOS-1234-add-issue 로 브랜치 생성 후 체크아웃
git config --global alias.b '!f() { first_part=$(echo "$1" | tr "[:lower:]" "[:upper:]"); branch_name="feature/$first_part"; shift; for arg in "$@"; do branch_name="$branch_name-$arg"; done; branch_name="${branch_name// /-}"; git checkout -b "$branch_name"; }; f'

Karabiner-Elements

  • esc 누르면 한영전환 (Complex Modification > Add your rule)
    • vim 에서 유용
{
    "description": "Press Esc to perform escape and switch to English input",
    "manipulators": [
        {
            "from": { "key_code": "escape" },
            "to": [
                { "key_code": "escape" },
                { "select_input_source": { "input_source_id": "com.apple.keylayout.US" } }
            ],
            "to_after_key_up": [{ "select_input_source": { "language": "en" } }],
            "type": "basic"
        }
    ]
}
  • 한영 전환 씹히지 않도록 설정
    • 원격 접속 중일때는 caps_lock으로 설정
{
    "description": "Caps Lock works differently based on active remote desktop applications",
    "manipulators": [
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "com.apple.ScreenSharing"
                    ],
                    "type": "frontmost_application_unless"
                }
            ],
            "from": { "key_code": "caps_lock" },
            "to": [{ "key_code": "f19" }],
            "type": "basic"
        }
    ]
}

Vim

  • Lunar Vim
brew install neovim
LV_BRANCH='release-1.4/neovim-0.9' bash <(curl -s https://raw.githubusercontent.com/LunarVim/LunarVim/release-1.4/neovim-0.9/utils/installer/install.sh)
echo 'export PATH=/Users/dohyun.lee/.local/bin:$PATH' >> ~/.zshrc
  • dependency 설치는 따로하지 않음

  • 터미널 폰트 설정 (Nerd Font로 렌더링됨)

git clone https://github.com/ronniedroid/getnf.git
./getnf/install.sh
./getnf/getnf

기타

  • Finder > 보기 > 경로 막대 표시

  • 키보드 꾹 누르면 특수문자 방지
    defaults write -g ApplePressAndHoldEnabled -bool false

profile
토스에서 iOS 개발자로 일하고 있습니다. 개발자로서 사용성이 좋은 앱을 만드는 것과, 개발자의 생산성을 올리는 방법에 관심이 많습니다.

0개의 댓글