Mac OSX iTerm 配置
安装 ohmyzsh
1 | sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
安装主题 powerlevel9k
1 | git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k |
修改 ~/.zshrc 中的 ZSH_THEME 为 ZSH_THEME="powerlevel9k/powerlevel9k"。
将以下内容添加到文件 ~/.zshrc。
1 | # 主题 powerlevel9k |
保存后执行 source ~/.zshrc 来使配置生效,如果没有生效可以再执行一次。
配置每次打开后自动生效
编辑文件 ~/.zprofile ,内容为 source ~/.zshrc,这样,每次启动就会自动重载配置文件。
如果是
linux系统,修改默认shell的命令是chsh -s /bin/zsh
配置自动提示
zsh-autosuggestions 插件会自动从 history 中查找运行过的命令并进行提示和自动补全。
1 | git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions |
编辑 ~/.zshrc 中内容,找到 plugins 添加 zsh-autosuggestions 即可。
1 | plugins=( |
安装 ColorsLS 来使 iTerm 更漂亮
1 | sudo gem install colorls |
安装 autojump 使用 j <anywhere> 快速进入目录
1 | brew install autojump |
把以下内容添加到 ~/.zshrc 中。
1 | [[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh |
修改配色方案
clone dracula/iterm 这个库。
1 | git clone https://github.com/dracula/iterm.git |
然后在 iTerm2 > Settings... > Profiles > Colors > Color Presets > Import ... 导入这个库的文件,并选中使其生效。
配置图标
1 | https://github.com/powerline/fonts |
安装 trzsz
如果之前使用过 lrzsz ,那么这个 trzsz 是一个比 lrzsz 更好用上传/下载文件的插件。
1 | brew update |
1 | sudo apt update && sudo apt install software-properties-common python3-launchpadlib |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Jack.vip!




