I have a gigantic file (millions of lines long), and I want to make it all
one line.  There is ONE \n at the end of every line.

The way I have been removing these line breaks is:

1,$s/\n//

This takes extremely long when $ becomes larger than 15000.  In fact my
computer runs out of memory.  

I think the problem is that it's searching through thousands of characters
of "\n"

What might make the situation easier for me is the fact that i KNOW where
the \n 's are located, so I don't really need to "search" for them. 
However, I don't know a vim command to remove \n from the end of every line
(other than the command above).

I should also be able to highlight the \n 's using the visual block (they
show up yellow on my screen), and remove them by pressing x ... but pressing
x doesn't seem to do anything to the \n 's ... it only removes non-special
characters.

Any help is greatly appreciated. Thanks.
-- 
View this message in context: 
http://www.nabble.com/better-way-to-remove-%5Cn-tp24688299p24688299.html
Sent from the Vim - General mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to