newbie: use <CR> in RE?

Jez Hancock jez.hancock at
Sat Nov 22 05:29:52 PST 2003

On Sat, Nov 22, 2003 at 09:00:26PM +0800, Zhang Weiwu wrote:
> This is also a problem in vi(1). Besides <CR> I wish to manipulate 
> tabstops and line-feeds with RE too.
I'm not sure about vi, but in vim this works:


to remove all newlines throughout a document.  

To substitute all tabs in this text:

one	two	three

with newlines, one would do:


on that line - using '\r' instead of '\n'.  Not entirely sure why '\r'
is used in this context instead of '\n'.

Jez Hancock
 - System Administrator / PHP Developer

More information about the freebsd-questions mailing list