如何在 Vim 中将所有文本转换为小写 [英] How to convert all text to lowercase in Vim
问题描述
如何将 Vim 中的所有文本转换为小写?甚至有可能吗?
How do you convert all text in Vim to lowercase? Is it even possible?
推荐答案
如果您的意思是小型大写字母,那么不,这是不可能的——就像在任何文本中都无法将文本转换为粗体或斜体一样编辑器(相对于文字处理器).如果要将文本转换为小写,请创建一个可视块并按
u
(或U
转换为大写).命令模式下的波浪号 (~
) 反转光标下字符的大小写.
If you really mean small caps, then no, that is not possible – just as it isn’t possible to convert text to bold or italic in any text editor (as opposed to word processor). If you want to convert text to lowercase, create a visual block and press
u
(orU
to convert to uppercase). Tilde (~
) in command mode reverses case of the character under the cursor.
如果你想在 Vim 中以小写形式查看所有文本,你可能需要查看 guifont
选项,或者输入 :set guifont=*
如果您的 Vim 风格支持 GUI 字体选择器.
If you want to see all text in Vim in small caps, you might want to look at the guifont
option, or type :set guifont=*
if your Vim flavour supports GUI font chooser.
这篇关于如何在 Vim 中将所有文本转换为小写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!