Mail Archives: cygwin/2006/10/03/10:44:17
On Tue, 3 Oct 2006, Larry Hall (Cygwin) wrote:
> On 10/03/2006, DePriest, Jason R. wrote:
>
> <snip>
>
> > vi did not show any unusual line endings (CR/LF) in /etc/profile
> > before I sent my message in
>
> vi/vim will only show you the CR/LF if you tell it to. So if you're
> not looking for them, vi/vim may have hidden them from you. You may
> want to try 'od -c' on the file(s) in question.
Since many people mentioned that they opened the files in question in vim
and did not see unusual line endings, here's some non-Cygwin-specific, but
relevant, vim info:
By default, when vim loads the file in which *all* line endings are CR/LF,
it will display the file normally, but show "[dos]" in the status line.
It's easy to miss if you're not watching for it. That property can also
be queried using "set fileformat?".
This behavior can be turned off globally by "set fileformats=unix".
Alternatively, "vi -b myfile" will open myfile in binary mode, and will
display all CR/LF line endings.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -