VI - Lower-case to Upper-case

VI - Lower-case to Upper-case

Post by Terry Lu » Fri, 12 Apr 1996 04:00:00



I seem to remember that when using VI, you could easily change words from
lower-case to upper-case and vice versa, just by typing in a single key
repeatedly, but I can't remember how to do it.

Is this possible or am I just imagining that I used to be able to do it?

  ||  ||    Terry Lung
  \\()//

 ||    ||   http://ftn.net/~tlung

 
 
 

VI - Lower-case to Upper-case

Post by Anthony J. Terlec » Sat, 13 Apr 1996 04:00:00



>I seem to remember that when using VI, you could easily change words from
>lower-case to upper-case and vice versa, just by typing in a single key
>repeatedly, but I can't remember how to do it.
>Is this possible or am I just imagining that I used to be able to do it?
>  ||  ||    Terry Lung
>  \\()//

> ||    ||   http://ftn.net/~tlung

In command mode, the tilda (~) character will change case.
Anthony Terlecki


 
 
 

VI - Lower-case to Upper-case

Post by James A. Mumpe » Sat, 13 Apr 1996 04:00:00



> I seem to remember that when using VI, you could easily change words from
> lower-case to upper-case and vice versa, just by typing in a single key
> repeatedly, but I can't remember how to do it.

> Is this possible or am I just imagining that I used to be able to do it?

Use the tilde(~) key. Place the cursor over the letter that you want
changed and press the tilde key. The case changes to it's opposite.

Jim

 
 
 

VI - Lower-case to Upper-case

Post by Jon LaBad » Mon, 15 Apr 1996 04:00:00



|> >
|> > I seem to remember that when using VI, you could easily change words from
|> > lower-case to upper-case and vice versa, just by typing in a single key
|> > repeatedly, but I can't remember how to do it.
|> >
|> > Is this possible or am I just imagining that I used to be able to do it?
|>
|> Use the tilde(~) key. Place the cursor over the letter that you want
|> changed and press the tilde key. The case changes to it's opposite.

Not directly what was asked, but if you need to do many characters,
a regular expression and the substitute command might be useful.
For example, to make an entire line uppercase:

   :s/.*/\U&/

and of course \L for lowercase.

jon
--


 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

 
 
 

VI - Lower-case to Upper-case

Post by Terry Lu » Tue, 16 Apr 1996 04:00:00




: |> >
: |> > I seem to remember that when using VI, you could easily change words from
: |> > lower-case to upper-case and vice versa, just by typing in a single key
: |> > repeatedly, but I can't remember how to do it.
: |> >
: |> > Is this possible or am I just imagining that I used to be able to do it?
: |>
: |> Use the tilde(~) key. Place the cursor over the letter that you want
: |> changed and press the tilde key. The case changes to it's opposite.

: Not directly what was asked, but if you need to do many characters,
: a regular expression and the substitute command might be useful.
: For example, to make an entire line uppercase:

:    :s/.*/\U&/

: and of course \L for lowercase.

: jon

Oh, so it was the tilde key, eh?  I knew it existed, but I thought
I had tried every key on the keyboard and couldn't find it!  Thanks
for the answer...

  ||  ||    Terry Lung
  \\()//

 ||    ||   http://ftn.net/~tlung

 
 
 

VI - Lower-case to Upper-case

Post by Cary Coult » Tue, 16 Apr 1996 04:00:00



>>I seem to remember that when using VI, you could easily change words from
>>lower-case to upper-case and vice versa, just by typing in a single key
>>repeatedly, but I can't remember how to do it.
>>Is this possible or am I just imagining that I used to be able to do it?
>>  ||  ||    Terry Lung
>>  \\()//

>> ||    ||   http://ftn.net/~tlung

Use tilde ~ to toggle case.
 
 
 

VI - Lower-case to Upper-case

Post by Alain Sarr » Sat, 20 Apr 1996 04:00:00



: Not directly what was asked, but if you need to do many characters,
: a regular expression and the substitute command might be useful.
: For example, to make an entire line uppercase:

:    :s/.*/\U&/

: and of course \L for lowercase.

: jon

I missed the original post so forgive me if I'm misquoting the original
poster. I just wanted to add that you could take this \L and \U idea one
step further. One can also change the case of only the first character
of the regular expression using \u and \l.

eg.

:s/foo/\u&/g

will change the case of the f in every occurence of the word foo in the
current line.

the line:

This is a foo sentence foo.

will look like

This is a Foo sentence Foo.

Regards,
Alain

--
           .x           #I                                   V
   .r.,   .x    .r.,  ..x  .x. .x.   |/            _____     |
 jP` jP   dT  jP` jP   dT   #|/:M'  /| []T[]_|_   |.....|  |\|/\
jP  ,M'  jM  jP  ,M'  jM   jM' jP    |  _|_==|   |#o###o#| \ = /
q#,/qMr  +|r q#,/qMr  +|r  +|  M;.   | /   \ |   |#######| / = \
 '            '                     /|\\___//|\  |#o###o#| \_R_/

 
 
 

1. CONVERTING lower-case to upper-case filenames?

        I'm transfering >50 megs of files from my flakey DOS machine to my
Linux machine over a serial line using zmodem. The flakey DOS machine crashes
every so often, so I need to use the crash-recovery features of zmodem.

        Unfortunately, DSZ on the DOS machine only sends upper-case
filenames, while RZ on the Linux machine writes lower-case filenames.
This means that when DSZ checks to see what files are already written, it
only looks for upper-case filenames, and because it doesn't see anything
it re-writes the files that were uploaded previously.

        I imagine that there's a way to rename all of the files on the Linux
machine (about 1000 of them) using a script. Anyone know how to do this?
"sed" seems like the proper tool, but I can't find any good
documentation on it.

        Much thanks to anyone who can help.

--
------------------------------------------------------------------------------
| Mark A. Pitcher |                                
------------------------------------------------------------------------------
                                                            "GUH!" - Bill Leeb

2. cdrecord don't eject

3. upper case vs lower case ****newbie*****

4. strange TCP stack behiviour with write()es in pieces

5. lower case <-> upper case

6. RH5+lilo

7. upper case vs lower case account names

8. SCO/Novell/HP Announcement Overview

9. Script to Convert Upper Case Filenames to Lower Case

10. change lower case word to upper case using sed?

11. Convert upper case to lower case

12. Converting from lower case to upper case using sed

13. Help: how to convert lower case to upper case?