[php-editor] USE PHP_Beautifier in Notepad++

This is the way to use PHP_Beautifier to formate php in notepad++ and output to clipboard

  • Install PHP_Beautifier via http://pear.php.net/package/PHP_Beautifier
  • Make sure your notepad++ have NPPExec
  • Add Execute like this

    <%php_beautifier path%>\php_beautifier.bat  $(FULL_CURRENT_PATH) | clip

    the formate output will save to clipboard

  • IF your php file is utf-8 ,edit your php_beautifier.bat like below
    ps,chcp 65001 force output encode utf-8
  • @ECHO OFF
    chcp 65001
    SET PHP="\xampp\php\php.exe"
    SET BEAUTIFY="\xampp\php"\php_beautifier
    %PHP% -d output_buffering=1 -f %BEAUTIFY% -- %1 %2 %3 %4 %5 %6 %7 %8 %9
    @ECHO ON
    

Relate article form web

  • http://weblogs.asp.net/owscott/archive/2006/12/15/clip-saving-command-line-and-powershell-output-directly-to-the-clipboard.aspx
  • http://jdev.tw/blog/1651/dos-tips-clip-exe
  • http://php.apsique.com/PHP_Beautifier/PHP_Beautifier/tutorial_PHP_Beautifier.howtouse.commandline.pkg.html
Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*