Tobias Schlitt has a post on Comfortable PHP Editing in VIM.
I’ll have to look at integrating phpm with TextWrangler, which is what I am using right now to edit php. (see mac mini and php) Being able to look up parameters in my editor would be a big bonus for me. I’ve been programming PHP for almost 5 years now and there are still alot of things I have to look up on a regular basis.
I have a theory about editors. People who use a GUI editor pad their operators and commas with spaces and are generous with their horizontal whitespace, while people who use a console editor conserve their horizontal whitespace. So, you can divine the editor that someone uses by looking at their code.
Crackpot or Not?
I am using a console editor rather often, however since I write quite a bit, I am used to padding, because then code is more readable. But generally, I think you are right; when using a console editor you try to conserve space.
As far as I’m concerned, it’s crackpot
I’m a big vim adept, yet still my code looks like this:
$var = function(”a string”, 32);
Even at 80 chars wrapping, you shouldn’t sacrifice readability.
But then again, my ideas might be crackpot too
Not. I have a lot of padding in my code, and I’m using BBEdit. Thank goodness that when I got really serious editing php in BBEdit, they came out with document drawers. Otherwise I’d be going crazy.
Hmmm… difficult to say. I’m using only VIM since more than a year now. Since I got a widescreen display (which sucks in a way) I think I don’t save horizontal whitespaces.
Btw. a trackback would have been nice.
Toby, I’m embarrassed to say that the BBCode plugin i use doesn’t work for trackbacks, so I don’t usually use them. Hope to change that soon.
I was setting up a new server this week and I noticed that vi on this new server had PHP syntax highlighting, as well as syntax highlighting for httpd.conf. A pleasant surprise.
I’ve been an Xemacs bigot for over 10 years, and yes I pad my commas and operands religiously.
here’s an example of my code:
———————-
if (preg_match(”%^operand%i”, $action)) {
print “operand is true\n”;
}
else if (isset($query['action'])) {
print “action is set\n”;
}
else {
$counter = $numRounds + 3;
print “This isn’t real code…I’m just doing it for fun $counter\n”;
}
——————
Readability every time.
Just a little hint on something new I made for PHP and VIM: http://www.vim.org/scripts/script.php?script_id=1355 Hope that’s helpful.
I use TextWrangler when coding PHP on my PowerBook, and I couldn’t live without BBAutoComplete (http://c-command.com/bbautocomplete/). It’s a free app that provides autocompletion for a number of Mac apps.
I am your frequent reader. Could you tell me how do you fight with comments spam on your own blog?
you will like womens designer bags and get big save for less
My website……
[...]Editing PHP – Professional PHP[...]…
My wife and i felt thankful Edward could deal with his web research through the entire precious recommendations he was given using your web site. It’s not at all simplistic to just continually be freely giving helpful hints that the others may have been trying to sell. And we also recognize we have got the writer to be grateful to because of that. Those illustrations you’ve made, the straightforward web site navigation, the friendships you give support to create – it is many astonishing, and it’s facilitating our son in addition to the family reckon that that content is awesome, which is incredibly important. Many thanks for all!
e quickest way to lose body fat was a combination of the two. Make a program for yourself involving both weights and cardio, and you’ll be on your way to sh http://motomodders.socialgo.com/my_profile/blog-view/blog_1620.htm ,edding those pounds.The best kind of exercise program won’t have you hitti
Well I really liked reading it. This post provided by you is very helpful for good planning.
Hello There. I found your blog using msn. This is an extremely well written article. I will make sure to bookmark it and come back to read more of 301 Moved Permanently . Thanks for the post. I’ll certainly comeback.