Professional PHP

PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.
« Expert and Novice Programmers
Changes to my blog (and feeds) »

Editing PHP

May 21st, 2005

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?

Filed Under

  • PHP

Related Posts

  • Zend PHP Framework not a rumor
  • A WordPress bug fix
  • Upgraded to WordPress 1.2
  • PHP Coding Standards
  • Knocked off the internet, a story of Windows and Macintosh
You can leave a response, or trackback from your own site.

8 Responses to “Editing PHP”

  1. Christian says:
    5/21/2005 at 8:52 am

    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.

  2. RubenV says:
    5/21/2005 at 9:46 am

    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 :-)

  3. Darkside says:
    5/21/2005 at 10:36 am

    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.

  4. Toby says:
    5/21/2005 at 10:53 am

    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. :)

  5. admin says:
    5/22/2005 at 5:28 pm

    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.

  6. Ace Macleod says:
    6/17/2005 at 11:04 am

    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.

  7. Toby says:
    9/20/2005 at 11:47 am

    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.

  8. Ben says:
    10/17/2005 at 11:04 am

    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.

Leave a Reply

Click here to cancel reply.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

code: use [code=php][/code].

Comment Preview

    Subscribe Feed
    Share Subscribe to this blog…
    Share Bookmark or share this page…
  • About

    My name is Jeff Moore. I'm a PHP programmer living in San Francico and working for a startup.

    More about me…

  • Categories (Home)

    • Agile Methods (14)
    • Mac (14)
    • Misc (17)
    • Open Source (14)
    • PHP (98)
    • Software Design (29)
    • Usability (14)
    • Web Design (20)
  • Recent Comments

    • Looking Towards the Cloud  23
      Betty Saletta, Driver License, Jamel Sawyer [...]
    • Benchmarking PHP's Magic Methods  12
      Article Marketing Strategy, Magento Development, Vance Lucas [...]
    • Improved Error Messages in PHP 5  32
      Terry Nessel, css, Amsterdam [...]
    • Keywords and Language Simplicity  11
      kim kardashian sex tape price, nokia, per Rechnung bestellen [...]
    • flickr case study  3
      bookmarking demon software, php-trivandrum.org, Harry Fuecks
    • rsync to remote server via ssh  7
      Burton Haynes, James, Mike [...]
    • Yahoo YUI wins JavaScript Library Wars  10
      Lera Bride, Scott, Jeff [...]
    • OOP is Mature, not Dead  15
      Avery Depew, Fernando, deltawing [...]
    • Ruby versus PHP or There and Back Again  10
      Solar Pumps, Amsterdam, Hari K T [...]
    • ZendCon: Writing Maintainable PHP Code  8
      IT Ninja, nicopico, Arif [...]
  • Recent Posts

    • ZendCon: Writing Maintainable PHP Code
    • Looking Towards the Cloud
    • Holiday Tech Support
    • Closures are coming to PHP
    • php | tek Wrapup
    • php | tek 2008
    • Sarah Snow Stever
    • Benchmarking PHP’s Magic Methods
    • The Endpoints of the Scale of Stupidity on Video
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)
  • Site

    • Archives
    • Log in
  • Search