码迷,mamicode.com
首页 > 其他好文 > 详细

zsh下 home end 失效的解决办法

时间:2015-07-23 13:46:49      阅读:244      评论:0      收藏:0      [点我收藏+]

标签:

我的环境是 centos 6.5 x64

安装 oh my zsh 后,home end 键失效,解决办法为在 .zshrc 里添加设置如下 

#Rebind HOME and END to do the decent thing:
bindkey \e[1~ beginning-of-line
bindkey \e[4~ end-of-line
case $TERM in (xterm*)
bindkey \eOH beginning-of-line
bindkey \eOF end-of-line
esac

#To discover what keycode is being sent, hit ^v
#and then the key you want to test.

#And DEL too, as well as PGDN and insert:
bindkey \e[3~ delete-char
bindkey \e[6~ end-of-history
bindkey \e[2~ redisplay

#Now bind pgup to paste the last word of the last command,
bindkey \e[5~ insert-last-word

 来源参考:https://github.com/robbyrussell/oh-my-zsh/issues/3733

也可以直接在shell 使用 ctrl+a 和 ctrl+e 进行句头句尾转跳。

zsh下 home end 失效的解决办法

标签:

原文地址:http://www.cnblogs.com/volqiu/p/4670157.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!