emacs摆脱了C-x [英] emacs get rid of C-x

查看:95
本文介绍了emacs摆脱了C-x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



另外,如果可能的话,这可能会有什么不利之处?有吗?



我正在寻找一种更简单的使用GNU Emacs的方法,但不知道是否可以找到一个。

解决方案

(这太长了评论)



我知道有些人憎恨Emacs中的Cx任何东西不仅仅是因为你必须键入很多键,而且也是因为从触摸打印的角度来看,Cx em>并不那么有意义。



但是当然,在Emacs中,一切都是可配置的。我正在使用C - 而不是Cx,我真的很容易找到这种方式。



我用我的左小指点击CTRL,这是QWERTY键盘上物理位于a左侧的键: ie 以前是CTRL的键,但现在经常被标记为CAPS-Lock [您可以重映射然后按CTRL]。



然后用右手触摸式。

结束我把它添加到我的配置:

 (define-key global-map [(control,)] ctl-x-map )

你不会有更少的键来键入,比如说,一个Cx Cc (您现在可以通过执行 Cx Cc 或者通过执行 C,Cc 来实现),但是至少你不会扭曲你的手指很多)



另请注意,如这里所述(请参阅用户scottfrazer的+40+ upvoted和接受的答案)可能会更好为所有键映射创建一个次模式,而不是直接定义全局映射:



全局覆盖Emacs中的键绑定


Is there a way I can stop needing C-X before any shortcut and, for example, just use C-c to leave?

Also, if possible, what disadvantages could this have?

I'm looking for a simpler way of using GNU Emacs, but not sure if I can find one.

解决方案

(this is too long for a comment)

Not really an answer but I know that some people hate the "C-x anything" in Emacs not just because you have to "type a lot of keys" but also because from a touch-typing point of view C-x doesn't make that much sense.

But of course in Emacs everything is configurable. I'm using "C-," instead of C-x and I honestly find it much easier this way.

I use my left pinky to hit CTRL, which is the key physically located at the left of 'a' on a QWERTY keyboard: i.e. the key that used to be CTRL but that now often is labelled CAPS-Lock [and you can remap it to CTRL].

I then touch-type ',' with my right hand.

To this end I added this to my config:

(define-key global-map [(control ,)] ctl-x-map)

You won't have less keys to type to do, say, a C-x C-c (which you can now do both by doing C-x C-c or by doing C-, C-c), but at least you won't be distorting your fingers as much ; )

Also note that as explained here (see user "scottfrazer"'s +40+ upvoted and accepted answer) it may be better to create a minor mode for all your key mappings instead of directly define a global mapping:

Globally override key binding in Emacs

这篇关于emacs摆脱了C-x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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