Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editing PHP files in VFP 1

Status
Not open for further replies.

Mike Lewis

Programmer
Jan 10, 2003
17,516
Scotland

Well, not so much a "helpful tip" ... just another example of the utility of VFP.

My present project involves maintaining another programmer's PHP code. When I opened his source files in Notepad, the code was unreadable, mainly because it all appeared on one long line, without any proper breaks.

Presumably the reason was that the text contained line-feeds (ASCII 10) but no carriage-returns (ASCII 13). So I started looking for a specialist PHP editing tool that would display the code properly.

Then it occurred to me to try opening the files in VFP's program editor. Needless to say, they displayed beautifully. Not only were all the line breaks in place, I could navigate the functions using the Document View window, and I can use Intellisense for things like parenthesis matching.

Also, the colour syntax highlighting works (up to a point), as does Bookmarks, Beautify and Text Scraps. I've even started to use Code References with these files.

VFP really makes life easy, even when you're not doing VFP programming.

Mike






__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
VFP really makes life easy, even when you're not doing VFP programming.

I do all mey web work in VFP because Intellisense makes it even easier. If I type:

[TT]pp[/TT]

then Intellisense pads it out for me:

[TT]
<p>
~
</p>
[/TT]

The tilde ("~") in Intellisense means "put the cursor here" so if I just bash pp and carry on typing then I am immediately putting text between two paragraph tags.

I also use VFP for the Search page on our web site. I've a VFP program which scans the metatags of all the HTML pages and writes them into a JavaScript program.

Geoff Franklin
 
In addition, the VFP editor adds the missing <cr> to the file when it is saved, so you can subsequently edit the file with notepad if you so desire.

Geoff, that tilde trick is cool - I didn't know that. Have a star!

Mike Krausnick
Dublin, California
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top