104 字
1 分钟
zsh美化
2024-12-07

安装 zsh#

apt install zsh

安装 ohmyzsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

安装 powerlevel10k

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

然后把 .zshrc 的 ZSH_THEME 修改成 powerlevel10k/powerlevel10k, 应用 powerlevel10k 主题

安装 zsh 插件#

补全
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

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

其他#

在一些系统上, 可能无法使用一些快捷键, 需要手动指定快捷键

bindkey  "^[[H"   beginning-of-line # Home
bindkey  "^[[F"   end-of-line # End
bindkey  "^[[3~"  delete-char # Del

bindkey "^[[1;5D" backward-word # Ctrl+Left
bindkey "^[[1;5C" forward-word # Ctrl+Right
zsh美化
https://fuwari.vercel.app/posts/zsh/
作者
ilyfairy
发布于
2024-12-07
许可协议
CC BY-NC-SA 4.0