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.