Re: Re: editor that typesets the php code

From: Date: Thu, 28 Apr 2005 17:33:31 +0000
Subject: Re: Re: editor that typesets the php code
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-214122@lists.php.net to get a copy of this message
well, i'm not sure what to do after your code is done, but as far as editors go, theres a free one out there that does syntax highlighting for a ton of languages (php included) called Vim... it comes with a graphical version called gvim that i do all of my coding on. no debugging features for php (afaik) but you can set up debuggers through vim (never tried though). http://www.vim.org
Open up the file in vim and type: gg=G Turns this: ------------------------------------------------------------------------------------------------ function str_pad_html($strInput = "", $intPadLength, $strPadString = "&nbsp;") { if (strlen(trim(strip_tags($strInput))) < intval($intPadLength)) { switch ($intPadType) { // STR_PAD_LEFT case 0: $offsetLeft = intval($intPadLength - strlen(trim(strip_tags($strInput)))); $offsetRight = 0; break; // STR_PAD_RIGHT case 1: $offsetLeft = 0; $offsetRight = intval($intPadLength - strlen(trim(strip_tags($strInput)))); break; } unset($strInput, $offsetLeft, $offsetRight); return $strPadded; } else { return $strInput; } } ------------------------------------------------------------------------------------------------ into this: ------------------------------------------------------------------------------------------------ function str_pad_html($strInput = "", $intPadLength, $strPadString = "&nbsp;") {
    if (strlen(trim(strip_tags($strInput))) < intval($intPadLength)) {
        switch ($intPadType) {
            // STR_PAD_LEFT
            case 0:
                $offsetLeft = intval($intPadLength - strlen(trim(strip_tags($strInput))));
                $offsetRight = 0;
                break;
                // STR_PAD_RIGHT
            case 1:
                $offsetLeft = 0;
                $offsetRight = intval($intPadLength - strlen(trim(strip_tags($strInput))));
                break;
        }
        unset($strInput, $offsetLeft, $offsetRight);
        return $strPadded;
    }
    else {
        return $strInput;
    }
} ------------------------------------------------------------------------------------------------ -philip

« previous php.general (#214122) next »