image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Software Programming & Web Scripting

Reply
 
LinkBack Thread Tools
  #1  
Old January 24th, 2009, 04:10 PM
Registered User
 
Join Date: Jan 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
lupinloben is on a distinguished road
Exclamation Textedit deleted half a .php file

Hi everyone- I'm having a bit of a problem... It seems that somehow the first half of a .php file I had been working on has gone missing. When I open it in textedit it opens with formatting and everything, and it appears that all the linebreaks have been removed, along with about the first half of the code. The strange thing is, when I run it in firefox it processes normally as if it is reading the code and I just can't see it.

So, I'm hoping this means that somewhere on my computer is a chunk of this file that I can retrieve, because it would really suck to try to rewrite it all.


Let me know if this has happened to anyone else, or if you have any questions that might help troubleshoot this!

Thanks
Reply With Quote
  #2  
Old January 24th, 2009, 04:31 PM
Registered User
 
Join Date: Jan 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
lupinloben is on a distinguished road
Nevermind, I found out that opening it through the terminal using vim allows me to read the entire contents of the .php file. So, if anyone else has this problem, I suggest trying that.

Oh also, I'm running OSX Leopard 10.5.6
Reply With Quote
  #3  
Old January 24th, 2009, 04:40 PM
ora's Avatar
ora ora is online now
free electron
 
Join Date: Nov 2003
Location: London
Posts: 2,279
Thanks: 44
Thanked 63 Times in 62 Posts
ora is on a distinguished road
There are a bunch of coding text editors that are recommended for things like editing php files. I use TextMate - which si excellent if a bit pricey. I picked it up as part of a MacHeist bundle.
__________________
How to ask questions sensibly
--Macbook unibody 2.4ghz, 4gb ram, 500gb HD, glossy, OS 10.6.1
--Homebrew PC, iPhone, many hard drives, Nikon D200
Reply With Quote
  #4  
Old January 24th, 2009, 08:49 PM
icemanjc's Avatar
I'm Cool, I have a Mac.
 
Join Date: Jan 2007
Location: Ft. Lauderdale, FL
Posts: 1,046
Thanks: 2
Thanked 29 Times in 27 Posts
icemanjc has a spectacular aura abouticemanjc has a spectacular aura about
Taco HTML Edit is also good.
__________________
Be sure to thank the person that helps you!
MacBook 2.1 GHz , 250 GB, 2 GB, OS 10.6.1
PowerMac G5 Dual 2.3 GHz, 750 GB, 1 GB, OS 10.5.8 Server
PowerMac G4 Dual 1.25 GHz, 120 GB, 100 GB RAID, 1.5 GB, OS 10.5.8 Server
iPod Classic Black 120 GB

Favorite Bands: Anberlin, Five Iron Frenzy
My Site
Reply With Quote
  #5  
Old January 24th, 2009, 09:34 PM
Mikuro's Avatar
Crotchety UI Nitpicker
 
Join Date: Mar 2005
Posts: 2,682
Thanks: 6
Thanked 53 Times in 48 Posts
Mikuro will become famous soon enough
I'm a fan of TextWrangler myself. It's free.

I'll bet the problem with TextEdit is that it was parsing the file as HTML. TextEdit can open and edit HTML files, too, and this sometimes leads to strange and annoying results.
__________________
Mac mini — 1.25GHz G4, 1GB RAM — OS 10.5.8

Useful programs: Privoxy, Butler, ffmpegX, VLC, Perian, Tofu, Wcalc
Reply With Quote
  #6  
Old January 25th, 2009, 09:48 AM
ElDiabloConCaca's Avatar
Registered User
 
Join Date: Aug 2001
Location: San Antonio, Texas
Posts: 12,678
Thanks: 7
Thanked 388 Times in 370 Posts
ElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of light
I concur with Mikuro. I like TextEdit, but trying to open an html file results in TextEdit actually trying to render the HTML as Safari would instead of showing the raw text.

I second the motion for TextWrangler (and its big brother, BBEdit).
__________________
Mac mini 2.0GHz 10.6.2 • 4GB • 320GB • Superdrive • 4 x 1TB USB 2.0 • LED Cinema Display
MacBook 2.0GHz Core 2 Duo - White 10.6.2 • 4GB • 250GB • CD-RW/DVD-ROM
iPhone 3G 8GB • iPod Touch 8GB • iPod Photo 60GB • iPod nano 1GB • AT&T U-Verse 18Mb/2Mb
http://www.jeffhoppe.com
Reply With Quote
  #7  
Old January 25th, 2009, 10:30 AM
Giaguara's Avatar
Chmod 760
 
Join Date: Nov 2002
Location: ~
Posts: 8,621
Thanks: 7
Thanked 99 Times in 98 Posts
Giaguara is a jewel in the roughGiaguara is a jewel in the roughGiaguara is a jewel in the rough
Or Smultron - also a nice and free editor - I've been using that as my main plain editor for quite a while now.
Or SubEthaEdit - older versions are free.
__________________
MacBook Pro | Dell Mini Inspiron 9 | Mac Mini | Newton 2000 | iPhone | @Work : Dell D620 & 2x20" + a lot of Macs | Workstation, VC & Fusion
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do.
~ Samuel Clemens | Rants | Photos
Reply With Quote
  #8  
Old January 30th, 2009, 07:31 PM
arri's Avatar
Registered User
 
Join Date: Mar 2003
Posts: 269
Thanks: 0
Thanked 0 Times in 0 Posts
arri is on a distinguished road
although i usually prefer using some fullblown editor for coding, i'm using textedit all the time for quick previewing of files, among other things.

just turn off the html-parsing feature in TextEdits' prefs:
(that is, turn ON the 'igonre rich text commands...' option)
Reply With Quote
Reply

Bookmarks

Tags
.php, delete, format, missing, textedit

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 07:46 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.