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
Both comments and pings are currently closed.

15 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.

  9. Projekty organizacji ruchu says:
    2/20/2011 at 8:55 am

    I am your frequent reader. Could you tell me how do you fight with comments spam on your own blog?

  10. spitydorthy says:
    8/1/2011 at 10:38 am

    you will like womens designer bags and get big save for less

  11. My website... says:
    11/26/2011 at 4:53 pm

    My website……

    [...]Editing PHP – Professional PHP[...]…

  12. Allegro Notebooki says:
    11/28/2011 at 6:54 am

    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!

  13. uggs cheap says:
    12/20/2011 at 12:54 am

    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

  14. Simple Allegro says:
    1/4/2012 at 1:25 pm

    Well I really liked reading it. This post provided by you is very helpful for good planning.

  15. Reverse Phone Lookup says:
    4/13/2012 at 10:22 pm

    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.

    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 (18)
    • Open Source (14)
    • PHP (99)
    • Software Design (29)
    • Usability (14)
    • Web Design (20)
  • Recent Comments

    • rsync to remote server via ssh  37
      Petr Halounek, Penni Tomasino, Rodney Kohnen [...]
    • WordPress BBCode Plugin  30
      wepniveth, Pamella Philipps, evakuat [...]
    • PEAR Templates  18
      Sang Bellotti, Kandice Sansing, car insurance estimates for teenagers [...]
    • Extreme Simplicity  15
      Gilbert Moatz, Roni Beauregard, Barb Geyer [...]
    • Manual Memory Management is Dead  6
      Grass Fed Filet Mignon, Kellie Carello, PAPANDOR [...]
    • Friendster wrapup: does MySQL scale  38
      Ollie Joya, nfl jersey on sale, selling scrap gold [...]
    • The Coding Apprentice  51
      fkawau, Annamae Mccane, Boca Raton Personal Injury [...]
    • The Legality of Republishing RSS Feeds  30
      dasfdsfsd, reebok authentic nfl jersey, Tory Rennemeyer [...]
    • Exceptional PHP  7
      Sports, The Click, Laraine Waterhouse [...]
    • PDO versus MDB2  42
      selling silver coins, Oliver Luongo, ddkoaorpa [...]
  • Recent Posts

    • Richard Thomas
    • 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
  • Site

    • Archives
    • Log in
  • Search