Emacs 大写锁定次要模式?
Emacs 中是否有命令可以打开所谓的“大写锁定次要模式”?我想做一些类似 Mxtoggle-caps-mode
的事情,然后我在缓冲区中输入的每个字母都是大写字母,直到我执行 Mxtoggle-caps-mode
再次。
注意:我不是在寻找有关如何交换上限和控制的说明。事实上,这是因为我已经这样做了。我通常对此感到非常满意,但有时我正在编辑代码,其中有一堆全部大写的常量,并且按住 Shift 键会变得很紧张。我知道各种 upcase
转换函数;我不想输入单词,选择它,然后运行 upcase-region
。
如果重要的话,我正在使用 Aquamacs 2.2 和 Emacs 23.3.1。
Is there a command in Emacs to turn on what might be described as "caps lock minor mode"? I'm looking to do something like M-x toggle-caps-mode
, then every letter I type in the buffer is a capital letter until I do M-x toggle-caps-mode
again.
Note: I'm NOT looking for directions on how to swap caps and control. In reality this is because I have already done that. I am generally quite happy with it, but occasionally I'm editing code where there are a bunch of constants that are in all caps, and it gets to be a strain holding down the shift key. I'm aware of the various upcase
conversion functions; I'd rather not have to type the word, select it, then run upcase-region
.
If it matters, I'm using Aquamacs 2.2 w/ Emacs 23.3.1.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您不需要输入单词然后选择它。如果您想将最后一个单词大写,请按
Mb Mu
或ESC b u
。好的,如果是word_with_underscores
,您需要按几次b
。如果您确实想要大写锁定次要模式,请尝试 约翰·保罗·沃林顿 (John Paul Wallington) 的
lockcaps.el
。You don't need to type the word then select it. If you want to upcase the last word, press
M-b M-u
orESC b u
. Ok, you'll need to pressb
several times if it's aword_with_underscores
.If you really want a caps lock minor mode, try John Paul Wallington's
lockcaps.el
.你可以尝试这样的事情:
You can try something like this: