zsh下 home end 失效的解决办法

我的环境是 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 进行句头句尾转跳。

时间: 2024-08-24 17:28:32

zsh下 home end 失效的解决办法的相关文章

前端问题——png图片在IE6下透明失效,解决办法

今天,一位同事问我问题,png 图片在IE6下透明背景失效. 解决办法,在网上查了很多,最后还是采用两种方案来解决这个问题 1.把这个网页的png格式图片变更为gif格式的图片.问题解决 2.就是让这个网页引用一段JS代码,如下: 1 if (!window.XMLHttpRequest) { 2 window.attachEvent("onload", enableAlphaImages); 3 } 4 5 function enableAlphaImages(){ 6 for (v

IE6/IE7下margin-bottom失效兼容解决办法及双倍边距问题

(从已经死了一次又一次终于挂掉的百度空间人工抢救出来的,发表日期 2014-04-08) 一.IE6/IE7下margin-bottom失效兼容解决办法 1.用padding-bottom代替:2.在父标签中加入overflow:hidden:或zoom:100%示例代码: 不正常显示 ul{} li{ list-style:none; float:left; margin:10px;} 1. 你会发现左边10px 变成20px了, 解决办法:在li的CSS中加入:display:inline

Error 56: The Cisco Systems, Inc. VPN Service has not been started(Cisco VPN在Vista下出现Error 56的解决办法)

Error 56: The Cisco Systems, Inc. VPN Service has not been started(Cisco VPN在Vista下出现Error 56的解决办法) 似乎,自从我的Vista自动升级安装了SP1后,我的Cisco VPN就出现问题了,根本就无法运行.总是提示Error 56: The Cisco Systems, Inc. VPN Service has not been started. Please start this service an

Linux 下WordPress FTP帐号解决办法

自己用Ubuntu搭建WordPress后在更换主题时提示需要输入FTP帐号和密码,解决办法主要是把WordPress主目录的权限所有者弄为Apache: 找到apache服务所使用的用户名和用户组 ps -aux 找到 /usr/sbin/apach 的用户名,它就是apache的所有者,我这里是 www-data sudo chown www-data:www-data -R /var/www/html/ 因为我的WordPress的主目录是 /var/www/html/ 然后刷新WordP

浏览器禁用Cookie,基于Cookie的会话跟踪机制失效的解决办法

当浏览器禁用Cookies时,基于Cookie的会话跟踪机制就会失效,解决办法是利用URL重写机制跟踪用户会话. 在使用URL重写机制的时候需要注意,为了保证会话跟踪的正确性,所有的链接和重定向语句中的URL都需要调用encodeURL()或encodeRedirectURL()方法进行编码.另外,由于附加在URL中的SessionID是动态产生的,对于每一个用户都是不同的,所欲对于静态页面的相互跳转,URL重写机制就无能为力了,但是,我们也可以通过将静态页面转换为动态页面来解决这个问题. 在w

FreeBSD 下sac101.6a编译失败解决办法

由于FreeBSD和Linux下C的定义有些不同,可下载下面补丁修复编译问题. http://www.iris.washington.edu/pipermail/sac-help/attachments/20130910/7f30ed61/attachment.obj FreeBSD 下sac101.6a编译失败解决办法,布布扣,bubuko.com

Ubuntu下su:authentication failure的解决办法

$ su - rootPassword: su: Authentication failureSorry. 这时候输入 $ sudo passwd rootEnter new UNIX password: Retype new UNIX password: passwd: password updated successfully 这时候就可以进入根目录了. Ubuntu下su:authentication failure的解决办法,布布扣,bubuko.com

Eclipse下BASE64Decoder提示错误的解决办法

解决方案1(推荐): 只需要在project build path中先移除JRE System Library,再添加库JRE System Library,重新编译后就一切正常了 解决方案2: Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and trstricted API -> Forbidden reference (access rules): ->

[转]iOS Safari 中click点击事件失效的解决办法

iOS Safari 中click点击事件失效的解决办法 问题起因: 在微信公众号开发(微站)过程中用jquery的live方法绑定的click事件点击无效(不能执行) 问题描述 当使用委托给一个元素添加click事件时,如果事件是委托到 document 或 body 上,并且委托的元素是默认不可点击的(如 div, span 等),此时 click 事件会失效. 解决办法 解决办法有 4 种可供选择: ?将 click 事件直接绑定到目标?元素(??即 .target)上 将目标?元素换成