Sublime Text2 Phptidy plug-in assembly and bug fix

Source: Internet
Author: User
Tags coding standards
Sublime Text2 Phptidy plug-in installation and bug fixes

The Phptidy plugin for the sublime Text2 Editor is a tool for formatting PHP code.

PS: Originally wanted to use Phpbeautifier, but it is too troublesome to install.

Installation:

The first step is to install the package control

Click the Sublime menu bar view->show Console, now open the console, this console has two columns, the above column will show real-time sublime executed what plug-in, output execution results, if you install a plug-in does not work properly, Should be here first to see if there is an error. The following column is an input box that allows you to run Python code. We enter the following code click Enter to run, you can install the package control.

After the run is finished, remember to restart the editor to see the package control in the preferences



?

Installing Phptidy



?

Waiting for a response

And then enter

Phptidy

Enter

Installation Complete

?

BUG:



?

When you format PHP with Phptidy, you are prompted with a bug

Cannot format when there is Chinese in file

Cause Analysis: Character issues.

Solve:

Find php_tidy.py This file (\sublime Text 2\packages\phptidy\php_tidy.py)

Edit the file to add the top

Import Sys

Reload (SYS)

?

Sys.setdefaultencoding (' Utf-8 ')



? Save >> restart? Sublime Text2?

?

Okay, the problem is fixed.

Attached 1:

Can be viewed at the following URL? Sublime Text 2 has those plugins

Http://wbond.net/sublime_packages/community#sort-installs

Attached 2:

Common plugins

Zen Coding

EMMET?7/18/13 v2013.07.18.09.23.04?588124 installs (28%)

Emmet (Ex-zen Coding) for Sublime Text?

?

Format JS Code

JSFORMAT?7/10/13 v2013.07.10.20.36.57?169961 installs (8%)

Javascript formatting for Sublime Text 2??

?

GBK Encoding Package

CONVERTTOUTF8?7/24/13 v1.2.2?58626 installs (3%)

For editing and saving files encoded in GBK, BIG5, Euc-kr, EUC-JP, Shift_JIS, etc.

?

Grammar test

Sublimelinter? Unknown v1.7.0?301033 installs (14%)

Inline Lint highlighting for the Sublime Text 2 editor

?

Highlight "" [] {} and so on

BRACKETHIGHLIGHTER?7/16/13 v2013.07.16.23.30.30?288886 installs (14%)

Bracket and tag highlighter for Sublime Text 2

?

formatting HTML code

HTMLTIDY?4/17/13 v2013.04.17.11.33.31?31973 installs (2%)

Tidy, clean and prettify your HTML code with this plugin for Sublime Text 2

?

Formatting PHP code

PHPTIDY?6/9/13 v2013.06.09.08.26.10?25952 installs (1%)

Plugin for Sublime Text 2 to format PHP code to meet the WordPress Coding standards using a modified version of Phptidy

?

Formatting sql

Format? SQL?2/5/12 v1.0.1?13547 installs (1%)

Formatting? Sql?statement to a more readable form by using Python-sqlparse Library

?

Getting an HTTP request in sublime

Http? requester? 6/26/13 v2013.06.26.04.30.38? 13997 installs (1)

HTTP Client Plugin for Sublime Text 2

?

Comment Block

Doc Blockr? 6/18/13 v2013.06.18.11.58.38? 138951 installs (7)

Simplifies writing? Doc Block comments in Javascript, PHP, Coffeescript, Actionscript, C & C + +

?

Cross-page lookup function definition and auto-completion

SublimeCodeintel? 7/19/13 v2.0.1? 226341 installs (11%)

Full-featured code Intelligence and Smart AutoComplete engine

?

?

?

?

?

?


?

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.