\u means make the following character upper case \l means make the following character lower case \U means make the rest of the replacement upper case \L means make the rest of the replacement lower case Make the first letter of every word from line 18 to 43 uppercase.:18,43s/\<./\u&/g Change "uPPeR" and "LoweR" in any mixture of cases to lowercase.:s/[[UuLl]][[PpOo]][[PpWw]][[Ee]][[Rr]]/\L&/ Make the whole file uppercase.:%s/.*/\U&/ Make the region from line m to line n all uppercase.:'m,'ns/.*/\U&/