이번에 회사에서 새로운 맥북을 받게 되었습니다.
앞으로도 회사에 다니다 보면 맥북을 자주 사고 바꿀 것 같은데.. 기록 및 커맨드를 남기기 위해서 적어봅니다.
자동화 하시는 분들도 있는데.. 어느정도 정리하다 보면 그렇게 시간이 오래걸리지 않을 것 같아서 기록해둡니다.
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
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)
투명도 추가
git clone https://github.com/bojan/xcode-one-dark
mv xcode-one-dark/One Dark.xccolortheme ~/Library/Developer/Xcode/UserData/FontAndColorThemes
# Xcode 완전히 종료 후 다시 실행 Settings > Themes 에서 확인.
echo 'export PATH="/Applications/Visual Studio Code.app/Contents/Resources/app/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
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'
{
"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"
}
]
}
{
"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"
}
]
}
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
:Tutor
하면 튜토리얼 뜸.Finder > 보기 > 경로 막대 표시
키보드 꾹 누르면 특수문자 방지
defaults write -g ApplePressAndHoldEnabled -bool false