如何在 Vim 中将所有文本转换为小写 [英] How to convert all text to lowercase in Vim

查看:36
本文介绍了如何在 Vim 中将所有文本转换为小写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将 Vim 中的所有文本转换为小写?甚至有可能吗?

How do you convert all text in Vim to lowercase? Is it even possible?

推荐答案

  1. 如果您的意思是小型大写字母,那么不,这是不可能的——就像在任何文本中都无法将文本转换为粗体或斜体一样编辑器(相对于文字处理器).如果要将文本转换为小写,请创建一个可视块并按u(或U 转换为大写).命令模式下的波浪号 (~) 反转光标下字符的大小写.

  1. 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 (or U 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆