0. 开局终端命令
sudo spctl --global-disable
1. Homebrew
Homebrew 终端命令安装
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2. Snipaste
网站下载安装包 Snipaste
3. iTerm2
网站下载安装包 iTerm2
4. Oh-My-Zsh
oh-my-zsh 终端命令安装
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
5. Oh-My-Zsh 插件
zsh-autosuggestions 自动补足
zsh-syntax-highlighting 命令高亮
终端命令安装
brew install zsh-autosuggestions zsh-syntax-highlighting
zshrc配置:
.zshrc文件随便用什么文本编辑器打开在plugins上面加两行
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
plugins默认有git加上新安装的两个插件
plugins=(
git ,
zsh-autosuggestions ,
zsh-syntax-highlighting
)
里面有很多的主题自行选择使用,如果配置有问题,那就需要阁下自行百度了~
6. Mise
Mise 终端命令安装
curl https://mise.run | sh
zshrc配置:
如果你使用WebStorm
eval "$(~/.local/bin/mise activate zsh --shims)"
如果你不用WebStorm
eval "$(~/.local/bin/mise activate zsh)"
附录:【别直接复制哈,有的路径需要改成你自己的】
.zshrc
export ZSH="$HOME/.oh-my-zsh"
# Theme Start
ZSH_THEME="mineRobbyrussell"
# Theme End
# ZSH-AutoSuggestions
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# ZSH-AutoSuggestions
# ZSH-HeightLight
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# ZSH-HeightLight
# ZSH
source $ZSH/oh-my-zsh.sh
# ZSH
# Plugin start
plugins=(
git ,
zsh-autosuggestions ,
zsh-syntax-highlighting
)
# Plugin End
# Bun Start
[ -s "/Users/用户名/.bun/_bun" ] && source "/Users/用户名/.bun/_bun"
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
# Bun End
# HomeBrew Start
eval "$(/opt/homebrew/bin/brew shellenv)"
# HomeBrew End
# Mise Start
eval "$(~/.local/bin/mise activate zsh --shims)"
# Mise End
# Alias Start
alias gc='git checkout'
# Alias End
mineRobbyrussell.zsh-theme
PROMPT="%(?:%{$fg_bold[green]%}%1{➜%}:%{$fg_bold[red]%}%1{➜%}) %{$fg[cyan]%}%c%{$reset_color%}"
PROMPT+=' $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}[%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}] %{$fg[yellow]%}%1{✗%} "
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}] "