bindkey兼容Mac的zsh [英] bindkey with zsh on Mac

查看:303
本文介绍了bindkey兼容Mac的zsh的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直想在Mac上ZZH结合键,但我遇到了一些麻烦。我知道我应该被谷歌搜索这一点,但无法找到我需要的...

I've been trying to bind keys in zzh on a Mac but am having some trouble. I know I should be Googling this but couldn't find what I need...

我一直在试图绑定CTRL-退格键是CTRL-W的相同,即删除一个字。但我不能找到问题的关键code吧。没有显示出来,当我和'读'做到这一点。我找不到图表网上无论是。

I've been trying to bind ctrl-backspace to be an equivalent of ctrl-w, ie delete one word. But I can't find the key code for it. Nothing shows up when I do it with 'read'. I can't find a chart online either.

另外,我无法把家庭/结束键(即FN左,FN-右)不知何故。它不是在终端的键盘分配或.zshrc约束,但它仍然在做怪异的东西,当我preSS它。网页上下似乎表现得不太奇怪。任何帮助吗?

Also, I couldn't bind home/end keys (ie fn-left, fn-right) somehow. It is not bound in Terminal's keyboard assignments or .zshrc but it's still doing weird stuff when I press it. Page up and down seem to behave less strangely. Any help?

感谢

推荐答案

打开shell并尝试pressing CTRL-V,然后你想要的键绑定(比如首页)
这是你应该bindkey使用按键顺序。

Open a shell and try pressing Ctrl-v and then the key you want to bind (eg. Home) This is the key sequence you should use with bindkey.

我绑定在Snow Leopard上Home / End键(行开始/结束):

My bindings for Home/End (start/end of line) on Snow Leopard:

bindkey '^[[H' beginning-of-line
bindkey '^[[F' end-of-line

还是试图绑定CMD左虽然...

Still trying to bind cmd-left though ...

这篇关于bindkey兼容Mac的zsh的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆