====================================================
vi commands
====================================================
------------------------
Issue
------------------------
I have an indexfile from Oracle that has some really long lines in it that I need to break into several lines. Whenever I see ", PARTITION" in a line, I need to break the line there.
For example:
BEFORE:
characters words, PARTITION characters words, PARTITION characters words, PARTITION
AFTER:
characters words
, PARTITION characters words
, PARTITION characters words
, PARTITION
------------------------------
vi Solution
------------------------------
:%s/, PARTITION/^M, PARTITION/g
(NOTE: I got the ^M by holding down Ctrl-v and pressing 'm'. This will insert the newline.)
---
I'll meet you further on up the road.
Jim
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment