개발자 이씨개발자 이씨
Home
  • VuePress

    • 테마 기타
  • GIT

    • Conventional Commits 1.0.0
  • AWS

    • CloudFront
  • Java

    • JUnit5로 계층 구조의 테스트 코드 작성하기
  • IDE

    • IntelliJ IDEA
  • DotENV

    • MacOS Development
    • Windows Development
Home
  • VuePress

    • 테마 기타
  • GIT

    • Conventional Commits 1.0.0
  • AWS

    • CloudFront
  • Java

    • JUnit5로 계층 구조의 테스트 코드 작성하기
  • IDE

    • IntelliJ IDEA
  • DotENV

    • MacOS Development
    • Windows Development

MacOS Development

목차
  • brew
    • install
    • config
    • cask config to external drive
  • d2coding font
    • install
  • terminal
    • install
    • config
  • vim
    • .vimrc
    • theme
  • dircolors
    • install
    • config
    • theme
  • zplug
    • install
    • .zplugsetting
    • config
  • powerlevel10k
    • config
    • .p10k.zsh
  • zlogin
  • fnm (for node)
    • install
    • config
    • install node
    • set node version
    • project node version
  • uv (for python)
    • install
    • config
    • install python
    • project python version (init)
    • project python version (exist)
    • pyproject.toml

brew

brew

install

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

config

> echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
> eval "$(/opt/homebrew/bin/brew shellenv)"

cask config to external drive

> mkdir -p /Volumes/{external-drive}/Applications
> echo 'export HOMEBREW_CASK_OPTS="--appdir=/Volumes/{external-drive}/Applications"' >> ~/.zshrc

d2coding font

font-d2coding

font-d2coding-nerd

install

> brew install --cask font-d2coding-nerd-font

terminal

dracula

install

> mkdir -p ~/.config/dracula
> cd ~/.config/dracula
> git clone https://github.com/dracula/terminal-app.git

config

  • open Terminal.app
  • Terminal > Preferences > Profiles > Import...
  • press [command] + [shift] + [.] for hidden files
  • select ~/.config/dracula/terminal-app/Dracula.terminal
  • select Dracula profile

vim

vim

.vimrc

set autoindent
set cindent
set smartindent
set tabstop=2
set shiftwidth=2

set laststatus=2
set number
set showmatch
set hlsearch
set showtabline=2

" set colorcolumn=80

if has('nvim')
  set inccommand=nosplit
endif

" set clipboard=unnamedplus
" set termguicolors
" set mouse=a
" set viewoptions-=options

if has("syntax")
  syntax enable
endif

highlight Normal guibg=NONE
highlight EndOfBuffer guibg=NONE
highlight LineNr guibg=NONE gui=bold guifg=White
highlight ColorColumn guibg=White

if v:version < 802
    packadd! dracula
endif
colorscheme dracula

theme

> mkdir -p ~/.vim/pack/themes/start
> cd ~/.vim/pack/themes/start
> git clone https://github.com/dracula/vim.git dracula

dircolors

coreutils dircolors)

install

> brew install coreutils

config

> vi .zshprofile
if [[ -x "$(command -v gls)" ]]; then
    alias ls='gls --color=auto'
    if [[ -x "$(command -v gdircolors)" ]]; then
        eval "$(gdircolors -b)"
    fi
fi

theme

> mkdir -p ~/.config/dracula
> cd ~/.config/dracula
> git clone https://github.com/dracula/dircolors.git
> cd ~/
> ln -s ~/.config/dracula/dircolors/.dircolors ~/.dircolors

zplug

zplug

install

> brew install zplug

.zplugsetting

##################
# ZPLUG LOAD
##################
export ZPLUG_HOME=/opt/homebrew/opt/zplug
source $ZPLUG_HOME/init.zsh

##################
# ZPLUG START
##################
zplug "zsh-users/zsh-completions"
zplug "zsh-users/zsh-autosuggestions"
zplug "zsh-users/zsh-history-substring-search"
zplug "zsh-users/zsh-syntax-highlighting"
zplug "robbyrussell/oh-my-zsh", use:"lib/*.zsh"
zplug "plugins/git", from:oh-my-zsh
zplug "plugins/macos", from:oh-my-zsh, if:"[[ $OSTYPE == *darwin* ]]"
zplug "plugins/colorize", from:oh-my-zsh
zplug "plugins/docker", from:oh-my-zsh

# theme
zplug "romkatv/powerlevel10k", as:theme, depth:1

# install & load
zplug check || zplug install
zplug load

config

> vi ~/.zshrc
source "$HOME/.zplugsetting"

powerlevel10k

powerlevel10k

config

> p10k configure
> select y
> select y
> select y
> select 1
> select n
> select 3 (Rainbow)
> select 1 (UTF-8)
> select 2 (24-hour)
> select 1 (Angled)
> select 3 (Sharp)
> select 3 (Sharp)
> select 1 (One line)
> select 1 (Compact)
> select 2 (Many icons)
> select 1 (Concise)
> select y (Transient Prompt)
> select 1 (Vorbose)
> select y (overwrite)
> select y (apply changes to .zshrc)

.p10k.zsh

typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
  status
  command_execution_time
  background_jobs
  virtualenv
  node_version
  vim_shell
  time
)

zlogin

print true >>~/.zlogin

fnm (for node)

install

> brew install fnm

config

> echo 'eval "$(fnm env --use-on-cd --shell zsh)" > /dev/null 2>&1' >> ~/.zshrc

install node

> fnm install --lts
> fnm install 18
> fnm install 20

set node version

> fnm list
> fnm use 18
> node -v

project node version

> echo '18' > .nvmrc
> cd ..
> cd {project-name}
> node -v

uv (for python)

uv

install

> brew install uv

config

> echo 'if [ -d ".venv" ]; then source .venv/bin/activate; fi' >> ~/.zshrc

install python

> uv python install
> uv python install 3.8
> uv python install 3.9
> uv python install 3.12

project python version (init)

> uv python list 3.9
> uv init --python 3.9.21
> source .venv/bin/activate
> uv add {package-name}

project python version (exist)

> uv python list 3.9
> uv venv --python 3.9.21
> source .venv/bin/activate
# > python -m pip install --upgrade pip
> vi pyproject.toml
> uv add -r requirements.txt

pyproject.toml

[project]
name = "sample-project"
version = "1.0"
description = "sample project"
readme = "README.md"
requires-python = ">=3.9"
dependencies = []