I tell you what, vim is no doubts an awesome text editor! You can do tons of stuff with it very fast. This post is a quick note how to make some text uppercase in the search-replace command.
An example first. Suppose we have a list in markdown (and it’s much much longer):
123
* Item 1
* Awesome list item 2
* The end
and we need to uppercase the first word of each item’s title. As we have a lot of these lines, the manual job of uppercasing is very boring and monotonous. Besides, any true programmer/admin/geek strives to automate everything she can. Thus, typing :%s/^\* \(\w\+\)/* \U\1/g will do the trick:
123
* ITEM 1
* AWESOME list item 2
* THE end
The key part here is the usage of \U modifier in the replace string, which will uppercase all the text that’s followed to the end of line or until \E. To find out more type :h sub-replace-special.