简体   繁体   English

配置macOS以模仿Emacs Cu

[英]Configure macOS to mimic Emacs C-u

I previously saw a one-line "defaults write..." macOS configuration for setting up a prefix key that can mimic Emacs' universal argument (Cu) so that we can enter "prefix key + 3 + a" and output "aaa". 我之前看到过单行“ defaults write ...” macOS配置,用于设置可以模仿Emacs通用参数(Cu)的前缀密钥,以便我们可以输入“ prefix key + 3 + a”并输出“ aaa” 。 However, after hours searching..., I couldn't find it again... Any suggestions? 但是,经过数小时的搜索...,我再也找不到了...有什么建议吗? thanks! 谢谢!

Update: 更新:

It appears that defaults write -g NSRepeatCountBinding -string "^u" can achieve what I was asking for. 似乎defaults write -g NSRepeatCountBinding -string "^u"可以实现我想要的。 But it's not global and rather limited. 但这不是全球性的,而是有限的。

It appears that defaults write -g NSRepeatCountBinding -string "^u" can achieve what I was asking for. 似乎defaults write -g NSRepeatCountBinding -string "^u"可以实现我想要的。 Not yet tested. 尚未测试。

Tested on Note.app, TextEdit, and safari on macOS. 在macOS上的Note.app,TextEdit和safari上进行了测试。 It's working. 工作正常 However, it seems that it is not working on Sublime Text or Chrome. 但是,它似乎无法在Sublime Text或Chrome上运行。 It's probably been overwritten by these apps. 这些应用可能已将其覆盖。 I guess it would be better to use a dedicated application to achieve this. 我想最好使用专用的应用程序来实现这一目标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM