vi 替换回车符

vim 大小写转换

xg posted @ 2012年11月14日 10:56 in vim with tags vim , 3548 阅读

整篇文章大写转化为小写

打开文件后,无须进入命令行模式。键入:ggguG

解释一下:ggguG分作三段gg gu G
gg=光标到文件第一个字符
gu=把选定范围全部小写
G=到文件结束

整篇文章小写转化为大写

打开文件后,无须进入命令行模式。键入:gggUG

解释一下:gggUG分作三段gg gU G
gg=光标到文件第一个字符
gU=把选定范围全部大写
G=到文件结束

只转化某个单词

guw 、gue
gUw、gUe
这样,光标后面的单词便会进行大小写转换
想转换5个单词的命令如下:
gu5w、gu5e
gU5w、gU5e

转换几行的大小写

将光标定位到想转换的行上键入:1gU 从光标所在行 往下一行都进行小写到大写的转换
10gU,则进行11行小写到大写的转换
以此类推,就出现其他的大小写转换命令
gU0        :从光标所在位置到行首,都变为大写
gU$        :从光标所在位置到行尾,都变为大写
gUG        :从光标所在位置到文章最后一个字符,都变为大写
gU1G      :从光标所在位置到文章第一个字符,都变为大写

Avatar_small
villa cleaning servi 说:
2019年9月17日 15:38

Before you decide to choose work cleaning you want to hire, ensure that you're coping with professionals who've the correct equipment as well as knowledge. Any agency that you simply contract should be flexible and in a position to offer a person the support when you require this. It would likely be far better if the actual services tend to be booked in advance, because this can allow the actual cleaning agency to create its personal preparations to suit your schedule.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter