The command for case conversion in Vim is
<blockquote>gu or gu</blockquote>
The explanation of the image is that small u means lowercase; big u means capitalization.
All that is left is the qualification of the two commands (the line, the letter, the word), etc.
<ol>
<li> whole article capitalization converted to lowercase
When you open a file, you do not need to enter command line mode.
<blockquote> type:gggug</blockquote>
Explain: Gggug divided into three sections gg gu G
<strong>gg</strong>= cursor to the first character of the file
<strong>gu</strong>= the selected range all lowercase
<strong>g</strong>= to file End </li>
<li> whole article lowercase converted to uppercase
When you open a file, you do not need to enter command line mode.
<blockquote> type:gggug</blockquote>
Explain: Gggug divided into three sections GG GU G
<strong>gg</strong>= cursor to the first character of the file
<strong>gu</strong>= all uppercase in the selected range
<strong>g</strong>= to file End </li>
<li> convert only one word
<blockquote>
GUW, GUE
GUW, GUE
</blockquote>
The words that follow the cursor are then converted to uppercase and lowercase.
The command to convert 5 words is as follows:
<blockquote>
gu5w, gu5e
gu5w, gu5e
</blockquote>
</li>
<li> converting a few lines of casing
Position the cursor on the line you want to convert,
<strong>1gU</strong> lowercase to uppercase conversions from the line down the cursor
<strong>10gu</strong>: 11 lines lowercase to uppercase conversions
And so on, there are other uppercase and lowercase conversion commands
<strong>gU0</strong>: From the position of the cursor to the beginning of the line, it becomes uppercase
<strong>gU$</strong>: From the cursor position to the end of the line, it becomes uppercase
<strong>gUG</strong>: From the cursor position to the last character of the article, all uppercase
<strong>gU1G</strong>: From the cursor position to the first character of the article, all uppercase
</li>
</ol>
Summary:
<blockquote>
~ Change the case of the letter under the cursor
3~ 3 letters starting at the cursor position to change their case
g~~ change the case of the current line letter
U Change the selected letter in visual mode to uppercase
U change the selected letter in visual mode to lowercase
GUU change the current line's letter to uppercase
Guu change the letter of the current line all to lowercase
3gUU starts from the cursor to the following 3 lines of letters to uppercase
Guw the word under the cursor to uppercase.
Guw Change the word below the cursor to lowercase.
</blockquote>
Vim Case Conversion Command