Mac Dev Settings

jerome·2020년 4월 29일
1

Mac Dev Settings

본격 macOS에 개발 환경 구축하기
개발자를 위한 OS X(>= Catalina) 설정

‘₩’ 대신 ‘`’ 입력하기

맥 최신버전에서 한글입력일때 ₩가 입력되고 영문입력일땐 backtick가 입력되어 불편한 경우가 많은데 무조건 backtick이 입력되도록 시스템을 설정합니다.
~/Libaray/KeyBindings/DefaultkeyBinding.dict 에 파일을 생성하고 다음과 같은 내용을 입력합니다.

{
  "₩" = ("insertText:", "`");
}

필수 프로그램 설치

  • Xcode
# Install
$ xcode-select --install

# gcc test
$ gcc
clang: error: no input files
  • Homebrew
# Install
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 

# brew test
$ brew doctor
Your System is ready to brew.
  • Git
    macOS에 기본으로 설치되어 있지만 최신 버전이 아니므로 brew를 이용해서 업데이트한다. git-lfs는 Git Large File Storage로 용량이 큰 바이너리 파일을 git으로 관리할 때 유용하므로 같이 설치한다.
$ brew install git git-lfs

# git 설정
$ git config --global user.name "Your Name"
$ git config --global user.email "you@your-domain.com"
$ git config --global core.precomposeunicode true
$ git config --global core.quotepath false

# git 설정 확인
$ git config --list

# gitkraken, GitHub desktop설치
$ brew cask install gitkraken github
  • nvm
# Install nvm 
$ brew install nvm

# Add this command in ~/.zshrc
export NVM_DIR="$HOME/.nvm”
[ -s “/usr/local/opt/nvm/nvm.sh” ] && . “/usr/local/opt/nvm/nvm.sh”  # This loads nvm
[ -s “/usr/local/opt/nvm/etc/bash_completion” ] && . “/usr/local/opt/nvm/etc/bash_completion”  # This loads nvm bash_completion
  • zsh
# 쉘 체크
$ echo $0

# zsh설치
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  • iTerm
$ brew cask install iterm2

Preferences -> Profiles -> Session에서 Status bar enabled로 상단의 Status Bar를 활성화시킨다.

[file:6FB16164-D6BC-49FE-AA2C-B7AB62B8CE0A-1183-0000017E824CBFE4/Snazzy.itermcolors]

설치를 완료했으면 Snazzy.itermcolors 파일을 오른쪽 버튼 누르고 다운 받거나 여러 개의 테마 를 둘러보고 맘에드는것을 고릅니다. 다운받은 파일을 더블클릭하면 자동으로 iTerm Color Preset에 추가됩니다.

iTerm을 실행하고 설정()창에서 Profiles 항목을 선택하고 Colors 탭을 선택합니다.

# zsh최신버전 업데이트 & zsh-completions 설치 
$ brew install zsh zsh-completions

# zsh 설정을 관리하는 oh-my-zsh 설치
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

# zsh-syntax-highlighting
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# zsh-autosuggestions
$ git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

# ~/.zshrc 파일의 plugins항목에 플러그인 추가
plugins=(
  git
  zsh-syntax-highlighting
  zsh-autosuggestions
)

# First, Install lambda-pure-prompt globally
$ npm install --global lambda-pure-prompt

# Second, Install pure-prompt globally
$ npm install --global pure-prompt

# If pure-prompt is installed initially, there might be error like this: prompt_pure_async_callback:13: bad math expression: operand expected at `> 2 '

# If there is an error, Run this commands in terminal
$ ln -s "$PWD/lambda-pure.zsh" /usr/local/share/zsh/site-functions/prompt_lambda-pure_setup
$ ln -s "$PWD/async.zsh" /usr/local/share/zsh/site-functions/async

# Add this command in ~/.zshrc
autoload -U promptinit; promptinit
prompt lambda-pure

# hack-nerd-font 설치
$ brew cask install homebrew/cask-fonts/font-hack-nerd-font
  • nvm(node version manager)
$ brew install nvm
  • mas
    Homebrew를 사용하여 App store에 존재하는 툴을 다운로드
$ brew install mas
# mas를 통해 xcode를 검색하면 다음과 같은 결과를 볼 수 있다.
$ mas search xcode
 497799835  Xcode
1183412116  Swiftify for Xcode   
…
# install 명령어를 통해 다운로드 받을 수 있다.
$ mas install 497799835
  • Alfred
    Mac 기본 spotlight대신 사용
    설치 후, 환경설정 > 키보드 의 단축키 탭에서 Spotlight의 Command를 해제시키고 Alfred 단축키를 Command + Space로 변경해서 사용
& mas search alfred
   405843582  Alfred                         (1.2)
& mas install 405843582
  • Docker
$ brew cask install docker
  • VScode
$ brew cask install visual-studio-code

Settings Sync Extension을 설치하고 Visual Studio Code 세팅을 맞춰준다.

  • Shiftit
$ brew cask install shiftit
  • Chrome, Firefox, Firefox Developer Edition
$ brew cask install google-chrome, firefox, homebrew/cask-versions/firefox-developer-edition
  • Dropbox
$ brew cask install dropbox
  • Dbeaver(https://github.com/dbeaver/dbeaver)
    DBeaver는 SQL 클라이언트이자 데이터베이스 관리 도구이다. 관계형 데이터베이스의 경우 JDBC API를 사용하여 JDBC 드라이버를 통해 데이터베이스와 통신한다. 그 밖의 데이터베이스(NoSQL)의 경우 사유 데이터베이스 드라이버를 사용한다. 자동 완성과 구문 강조를 지원하는 편집기를 제공한다. 이클립스 플러그인 구조 기반의 플러그인 아키텍처를 제공함으로써 애플리케이션 동작 중 상당수를 수정하여 데이터베이스에 특화된 기능이나 데이터베이스에 독립적인 기능들을 제공할 수 있게 한다. 이것은 자바로 작성된 데스크톱 애플리케이션이며 이클립스 플랫폼에 기반을 둔다.
    DBeaver는 아파치 라이선스로 배포되는 자유 오픈 소스 소프트웨어이다.
# Dbeaver requires oracle-jdk
$ brew cask install oracle-jdk
$ brew cask install dbeaver-community
  • Postman
$ brew cask install postman
  • Notion
$ brew cask install notion
  • Telegram
$ brew cask install telegram
  • 4k-video-downloader
$ brew cask install 4k-video-downloader
  • tig
$ brew install tig
  • Neofetch(https://github.com/dylanaraps/neofetch)
    Neofetch is a command-line system information tool written in bash 3.2+. Neofetch displays information about your operating system, software and hardware in an aesthetic and visually pleasing way.
$ brew install neofetch
  • htop
$ brew install htop
  • Telegram
$ brew cask install telegram
  • brew list
asciinema		ilmbase			ncurses			shared-mime-info
awscli			imagemagick		neofetch		sqlite
composer		jenkins			node			telnet
docker-machine		jpeg			nvm			tree
freetype		libde265		openexr			webp
gdbm			libevent		openjpeg		x265
gettext			libffi			openssl			xz
git			libheif			pcre			yarn
git-lfs			libomp			pcre2			zsh
glib			libpng			python			zsh-autosuggestions
go			libtiff			readline		zsh-syntax-highlighting
htop			libtool			screenresolution
icu4c			little-cms2		serverless
  • brew cask list
4k-video-downloader           dropbox                       google-cloud-sdk              shiftit
brave-browser                 expo-xde                      iterm2                        slack
brave-browser-dev             firefox                       mysqlworkbench                telegram
caffeine                      firefox-developer-edition     notion                        vagrant
daisydisk                     font-hack-nerd-font           opera                         virtualbox
dbeaver-community             github                        oracle-jdk                    visual-studio-code
docker                        gitkraken                     postman                       zeplin
drawio                        google-chrome                 pycharm-ce

Fzf
fzf는 강력하고 빠른 fuzzy finder 도구입니다. 증분 검색을 통하여 원하는 파일이나 히스토리를 쉽고 빠르게 찾을 수 있게 해줍니다. 정확하게 원하는 값을 입력하지 않고 일부만 입력해도 실시간으로 검색 결과를 보여줍니다.

$ brew install fzf

# To install useful key bindings and fuzzy completion:
$(brew —prefix)/opt/fzf/install

Brew 설치 후 install 명령어를 입력하면 몇 가지를 물어보는데 전부
y를 누르면 됩니다. 설치가 완료되었으면 source ~/.zshrc를 입력하여 설정을 다시 불러옵니다.

^ + T -> 하위 디렉토리 파일 검색
^ + R -> 히스토리 검색
esc + C -> 하위 디렉토리 검색 후 이동

profile
프론트엔드 개발 🌱

0개의 댓글