LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-03-2004, 03:08 PM   #1
NOT_Skeletor
LQ Newbie
 
Registered: Mar 2003
Posts: 13

Rep: Reputation: 0
Dreamweaver file in vim


I got sent a PHP-file that was created in Dreamweaver on a PC. The line-breaks have a "^M" at the end, which vim does not understand and thus the entire file is one long line. I ran into this problem before, but cannot remeber for the life of me how to fix it. I guess I could replace all those literal carachters with a hard-return, but then all the formatting and indents are gone.
How do I convert this file to something vim can read?
 
Old 08-03-2004, 04:00 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You cna use dos2unix or in vi type:
:%!perl -pie 's/^M/\n/'

To get ^M type "Ctrl+V" then "Ctrl+M".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dreamweaver style checkin/checkout file locking nouse66 Linux - Software 0 11-13-2005 01:39 PM
Fail to creat new file in vim taureanyang Linux - Software 1 07-22-2005 12:32 AM
decrypting a vim file djgerbavore Linux - Newbie 1 06-07-2005 01:38 PM
vim file-explorer option seriesx4 Linux - Software 1 05-05-2005 09:09 PM
How do I make a template file in GIMP for Dreamweaver mx? arctic123 Linux - Software 2 01-27-2005 08:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration