본격 macOS에 개발 환경 구축하기
개발자를 위한 OS X(>= Catalina) 설정
맥 최신버전에서 한글입력일때 ₩가 입력되고 영문입력일땐 backtick가 입력되어 불편한 경우가 많은데 무조건 backtick이 입력되도록 시스템을 설정합니다.
~/Libaray/KeyBindings/DefaultkeyBinding.dict
에 파일을 생성하고 다음과 같은 내용을 입력합니다.
{
"₩" = ("insertText:", "`");
}
# Install
$ xcode-select --install
# gcc test
$ gcc
clang: error: no input files
# 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.
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
# 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
# 쉘 체크
$ echo $0
# zsh설치
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
$ 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
$ brew install nvm
$ brew install mas
# mas를 통해 xcode를 검색하면 다음과 같은 결과를 볼 수 있다.
$ mas search xcode
497799835 Xcode
1183412116 Swiftify for Xcode
…
# install 명령어를 통해 다운로드 받을 수 있다.
$ mas install 497799835
환경설정 > 키보드
의 단축키 탭에서 Spotlight의 Command를 해제시키고 Alfred 단축키를 Command + Space로 변경해서 사용& mas search alfred
405843582 Alfred (1.2)
& mas install 405843582
$ brew cask install docker
$ brew cask install visual-studio-code
Settings Sync
Extension을 설치하고 Visual Studio Code 세팅을 맞춰준다.
$ brew cask install shiftit
$ brew cask install google-chrome, firefox, homebrew/cask-versions/firefox-developer-edition
$ brew cask install dropbox
# Dbeaver requires oracle-jdk
$ brew cask install oracle-jdk
$ brew cask install dbeaver-community
$ brew cask install postman
$ brew cask install notion
$ brew cask install telegram
$ brew cask install 4k-video-downloader
$ brew install tig
$ brew install neofetch
$ brew install htop
$ brew cask install telegram
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
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
-> 하위 디렉토리 검색 후 이동