[olug] Unix Tip: CONVERTING CAPS IN VI
Unix Guru Universe
listserv at ugu.com
Wed May 21 01:06:47 UTC 2003
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 1966 - May 20, 2003
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CONVERTING CAPS IN VI
To convert:
THE CAT SAT ON THE MAT
to
The Cat Sat On The Mat
in vim, add the following to .vimrc:
map #1 :s/\([A-Z]\)\([A-Z][A-Z]*\)/\1\L\2/g
It maps a suitable regular-expression based search and replace to the F1 function key.
This tip generously supported by: evans.c at emstechnologies.ca
--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today
==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.
Unix Guru Universe - www.ugu.com - tips at ugu.com - Copyright 1994-2001
==========================================================================
More information about the OLUG
mailing list