linux关爱小键盘,在 Linux Mint 19 上安装 zsh 和设置小键盘一步到位

在 Linux Mint 19 上安装 zsh 和设置小键盘

安装 zsh 并设置 zsh 为默认 shell

安装

sudo apt install zsh

设置 zsh 为默认 shell,注意没有 sudo

chsh -s /bin/zsh

配置密码认证

sudo vim /etc/passwd

改 /bin/bash 为 /bin/zsh

安装 oh-my-zsh 用于快速配置 zsh

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

配置小键盘

在 .zshrc 尾部加入

# Fix numeric keypad

# 0 . Enter

bindkey -s "^[Op" "0"

bindkey -s "^[On" "."

bindkey -s "^[OM" "^M"

# 1 2 3

bindkey -s "^[Oq" "1"

bindkey -s "^[Or" "2"

bindkey -s "^[Os" "3"

# 4 5 6

bindkey -s "^[Ot" "4"

bindkey -s "^[Ou" "5"

bindkey -s "^[Ov" "6"

# 7 8 9

bindkey -s "^[Ow" "7"

bindkey -s "^[Ox" "8"

bindkey -s "^[Oy" "9"

# + - * /

bindkey -s "^[Ol" "+"

bindkey -s "^[Om" "-"

bindkey -s "^[Oj" "*"

安装自动完成插件

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

编辑 .zshrc

plugins 加入 zsh-autosuggestions

后面再加上

source $ZSH_CUSTOM/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh

保存退出vim

让配置生效 source ~/.zshrc

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值