Apr 23, 2003 #1 SirCharles Programmer Joined Jun 10, 2002 Messages 212 Location US How do you translate characters to upper-case in vi?
Apr 23, 2003 1 #2 Ygor Programmer Joined Feb 21, 2003 Messages 623 Location GB The tilde (~) switches the case of the character under the cursor. Upvote 0 Downvote
Apr 23, 2003 2 #3 CaKiwi Programmer Joined Apr 8, 2001 Messages 1,294 Location US Or to uppercase a large number of lines from, say, the current line to the end of the file, use .,$s/.*/\U&/ or all lines in the file %s/.*/\U&/ CaKiwi "I love mankind, it's people I can't stand" - Linus Van Pelt Upvote 0 Downvote
Or to uppercase a large number of lines from, say, the current line to the end of the file, use .,$s/.*/\U&/ or all lines in the file %s/.*/\U&/ CaKiwi "I love mankind, it's people I can't stand" - Linus Van Pelt
Apr 23, 2003 Thread starter #4 SirCharles Programmer Joined Jun 10, 2002 Messages 212 Location US Thanks guys. Great response. To just capitalize one word, it looks like this works: .s/[^ ]* /\U&/ Upvote 0 Downvote
Apr 23, 2003 #5 CaKiwi Programmer Joined Apr 8, 2001 Messages 1,294 Location US or, slightly simpler s/[^ ]*/\U&/ CaKiwi "I love mankind, it's people I can't stand" - Linus Van Pelt Upvote 0 Downvote
or, slightly simpler s/[^ ]*/\U&/ CaKiwi "I love mankind, it's people I can't stand" - Linus Van Pelt