Apr 23, 2003 #1 SirCharles Programmer Jun 10, 2002 212 US How do you translate characters to upper-case in vi?
Apr 23, 2003 1 #2 Ygor Programmer Feb 21, 2003 623 GB The tilde (~) switches the case of the character under the cursor. Upvote 0 Downvote
Apr 23, 2003 2 #3 CaKiwi Programmer Apr 8, 2001 1,294 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 Jun 10, 2002 212 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 Apr 8, 2001 1,294 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