简体   繁体   中英

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". 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. But it's not global and rather limited.

It appears that defaults write -g NSRepeatCountBinding -string "^u" can achieve what I was asking for. Not yet tested.

Tested on Note.app, TextEdit, and safari on macOS. It's working. However, it seems that it is not working on Sublime Text or Chrome. It's probably been overwritten by these apps. I guess it would be better to use a dedicated application to achieve this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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