맥북 개발 세팅하기

진리e·2023년 5월 22일
0

Visual Studio Code

Visual Studio Code - Code Editing. Redefined

Extension

  • Korean language
  • Annotator
  • Live server: 서버 실행
  • Project Manager: 편집기 내에서 간편하게 프로젝트 이동
  • git
    • Git graph
    • Git Lense
  • img view
    • lottie viewer
    • svg preview
  • 테마
    • Material theme & icons
  • prettier

설정

  • snippets
  • 스페이스 공백 문자 표시하기 (Setting > Render Whitespace)
  • Tab → space : Convert Indentation to tabs/spaces

Git 에 연결해놓으면 환경설정 바로 연동 가능

작업환경

HomeBrew

Homebrew

// 기존 스크립트 사용시 error 발생

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

$brew : zsh: command no found: brew // m1 에서 brew 가 실행이 제대로 안되는듯

* .zshrc 파일에서 아래 스크립트 추가

eval $(/opt/homebrew/bin/brew shellenv) // 터미널 킬때마다 brew 가 자동 실행

m1 칩에서 설치시 바로 아래 스크립트 입력해도 됨

/bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/nrubin29/bea5aa83e8dfa91370fe83b62dad6dfa/raw/48f48f7fef21abb308e129a80b3214c2538fc611/homebrew_m1.sh)"

터미널

Item2

iTerm2 - macOS Terminal Replacement

oh my zsh

  • zsh 플러그인 중 하나
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

💡 xcode 설치 완료후에 할것

  1. Agnoster 테마 적용
    현재 디렉토리에서 git 의 상태를 알려줌. 브랜치명 커밋 등 알려줌
ZSH_THEME=”robyrussell” ⬅️ agnoster 로 바꿔주기
  1. 한글폰트깨짐: Font 셋팅
    D2 cording 폰트 추천 (다운로드: https://github.com/naver/d2codingfont)
  • d2codingAll → ttc 파일을 더블클릭하면 설치됨.
  • Homebrew 로 다운로드: brew install homebrew/cask-fonts/font-d2coding

user name 정리

// .zshrc 파일 아래에 스크립트 추가

prompt_context() { 
	if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then 
    	prompt_segment black default "%(!.%{%F{yellow}%}.)$USER" 
    fi 
}

nvm 셋팅

brew install nvm

// nvm error : nvm command not found

// .zshrc 파일 아래에 스크립트 추가
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh"  # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && . "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"  # This loads nvm bash_completion

git config 설정

git config --global user.email {id}@nts-corp.com
git config --global user.name {이름}
git config --global user.password {패스워드}

// 확인
cat ~/.gitconfig
  • host 파일 수정
sudo vi /etc/hosts

127.0.0.1       local-m.pay.naver.com
127.0.0.1       local-mycar.naver.com

기타 이슈

크롬 안켜짐

맥에서 크롬이 열리지 않는 현상 해결 방법

profile
대충살자

0개의 댓글