I am using cygwin on a windows 7 machine. I am having a great deal of trouble formatting a text file created in windows notepad in Cygwin vim . So I hit the :set list in vim command mode, and it shows the hidden delimiters. It is a dollar sign. However I cannot delete these dollar signs in VIM
$
$
What do web servers do ?; "Web servers store and serve Web pages,$
which are created from HTML and CSS."$
$
What do browsers do ?;"Browsers retrieve pages and render their$
content based on the HTML and CSS."$
$
What is html do ?; "HTML is an abbreviation for HyperText$
Markup Language and is used to structure$
your web page."$
$
What does CSS do ?;"CSS is an abbreviation for Cascading$
Style Sheets, and is used to control the$
presentation of your HTML."$
$
$
I want to get rid of the end of line markers so the text is fluid. For some reason the text will not import into an excel file. Excel is reading the end of line markers - the only real delimiter I want is at the ";" semicolon. I want two distinct columns in excel.
What do web servers do ?; "Web servers store and serve Web pages, which are created from HTML and CSS."$
What do browsers do ?;"Browsers retrieve pages and render their content based on the HTML and CSS."$
What is html do ?; "HTML is an abbreviation for HyperText Markup Language and is used to structure your web page."$
If you :set list
, Vim will display otherwise invisible characters with special sequences, for example a Tab character displays as ^I
, and the newline is represented by $
. :help 'list'
explains this in detail.
In particular, you cannot delete the $
representation of the newline. Instead, join the lines with the built-in J
(Shift+J) command.
In your case, the discrepancy to Notepad may be that Vim is able to detect the used line endings, whereas Notepad insists on the Windows-specific CR-LF sequence. So what appears to be one long single line in Notepad actually is a LF-delimited text file with Unix-style line endings. You can check in Vim with
:setlocal fileformat?
unix
In that case, you may want to convert to Windows-style line endings (in addition to any line joining):
:setlocal ff=dos | write