Emacs 应将单词的第二个字符设置为小写
在大多数情况下,我正在写德语文本。大多数单词以大写字母开头,后跟小写字母。有时我打字太快,而且单词的第二个字母也大写。为了解决这个问题,我问自己是否可以编写一个自动更改第二个字母大小写的函数。可选,仅当第三个及以下字母为小写时才会发生这种情况。您知道这是否可行吗?您有什么建议吗?
In most cases I'm writing german texts. Most words start with an uppercase letter followed by lower case letters. Sometimes I'm typing too fast and also the second letter of a word is typed upper case. To work around this issue I asked myself if it is poosible to write a function which automatically changes the case of the second letter. Optional this should only happen if the third and following are in lower case. Do you know if this is possible and do you have any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是一个“永远在线”的版本,可以在您键入时进行修复。它会让您输入所有大写单词,但一旦检测到大小写混合,它就会大写。
Here's an 'always on' version that fixes as you type. It will let you type all uppercase words, but as soon as it detects mixed case it will capitalize.
如果单词中的第一个字母为大写且所有其他字母均为小写,则以下命令将把每个单词的第二个字母转换为小写:
该命令将作用于从当前光标位置到单词末尾(可见)的所有单词。缓冲。
Here's a command that will convert to lowercase the second letter of each word if the first letter is uppercase and all other letters in the word are lowercase:
The command will work on all words from the current cursor position to the (visible) end of the buffer.
您可以设置一个次要模式,将所有大写字符映射到特殊输入功能。
请参阅:
http://gist.github.com/516242
You could setup a minor mode mapping all upcase characters to special input function.
See:
http://gist.github.com/516242