在 Vim 中更改大小写 [英] Changing case in Vim

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

问题描述

Vim 中是否有更改所选文本大小写的命令?

Is there a command in Vim that changes the case of the selected text?

推荐答案

视觉选择文本,然后 U 为大写或 u 为小写.要在视觉选择中交换所有大小写,请按 ~(波浪号).

Visual select the text, then U for uppercase or u for lowercase. To swap all casing in a visual selection, press ~ (tilde).

不使用视觉选择,gU 将使 motion 中的字符大写,或使用 gu 小写.

Without using a visual selection, gU<motion> will make the characters in motion uppercase, or use gu<motion> for lowercase.

有关更多内容,请参阅 Vim 的 change.txt 帮助文件中的第 3 节.

For more of these, see Section 3 in Vim's change.txt help file.

这篇关于在 Vim 中更改大小写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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