<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nutty Coder &#187; jsbeautifier</title>
	<atom:link href="http://blog.nuttycoder.com/tag/jsbeautifier/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nuttycoder.com</link>
	<description>tech articles</description>
	<lastBuildDate>Wed, 08 Dec 2010 13:26:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Javascript Beautifier &amp; JSLint Integration with Editplus</title>
		<link>http://blog.nuttycoder.com/2010/05/27/javascript-beautifier-jslint-integration-with-editplus/</link>
		<comments>http://blog.nuttycoder.com/2010/05/27/javascript-beautifier-jslint-integration-with-editplus/#comments</comments>
		<pubDate>Thu, 27 May 2010 03:35:55 +0000</pubDate>
		<dc:creator>Wang Xiaoxing</dc:creator>
				<category><![CDATA[Editplus]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jsbeautifier]]></category>
		<category><![CDATA[jslint]]></category>

		<guid isPermaLink="false">http://blog.nuttycoder.com/?p=148</guid>
		<description><![CDATA[This is for those who are using a IDE without js format feature by default like Editplus. First, I want to share you a javascript beautifier: http://jsbeautifier.org/, where you can paste your js code and then beautify with some customizable options. Also the format function is provided by various languages / library on the website. [...]]]></description>
			<content:encoded><![CDATA[<p>This is for those who are using a IDE without js format feature by default like Editplus.</p>
<p>First, I want to share you a javascript beautifier: http://jsbeautifier.org/, where you can paste your js code and then beautify with some customizable options.</p>
<p>Also the format function is provided by various languages / library on the website. We can integrate the js format function with IDE easily. Here are steps (take Editplus as an example):</p>
<p>1. save the attached file and rename to .js<br />
(1.5. view the js code in the file and customize it by your self)</p>
<p>2. Editplus -&gt; Tools -&gt; Configure User Tools<br />
<a href="http://blog.nuttycoder.com/wp-content/uploads/2010/05/1.jpg"><img src="http://blog.nuttycoder.com/wp-content/uploads/2010/05/1.jpg" alt="" width="640" height="480" class="alignnone size-full wp-image-145" /></a></p>
<p>3. Tools -&gt; User tools -&gt; select a group -&gt; Add Tool<br />
<a href="http://blog.nuttycoder.com/wp-content/uploads/2010/05/2.jpg"><img src="http://blog.nuttycoder.com/wp-content/uploads/2010/05/2.jpg" alt="" width="640" height="480" class="alignnone size-full wp-image-146" /></a></p>
<p>4. The command is &#8220;WScript.exe&#8221; + the path of beautify.js. In my example it&#8217;s WScript.ext &#8220;E:\Software\EditPlus\js_beautify.js&#8221;, Argument is &#8220;$(CurSel)&#8221;, which means current selected text. Don&#8217;t forget check &#8220;Run as text filter&#8221;. Click OK.</p>
<p>5. try it: select a code block, click &#8220;Ctrl + 1&#8243; (maybe different from groups), it&#8217;s done!</p>
<p>Tip: checking in a formatted code may make a huge diff. So please be careful on this at some time of the project like CCRB.</p>
<p>It&#8217;s almost the same to setup JSLint for your editplus, just look at the configure screen:<br />
<a href="http://blog.nuttycoder.com/wp-content/uploads/2010/05/3.jpg"><img src="http://blog.nuttycoder.com/wp-content/uploads/2010/05/3.jpg" alt="" width="640" height="480" class="alignnone size-full wp-image-147" /></a></p>
<p>The difference is you need check Capture output instead of &#8220;Run as text filter&#8221;, also you need setup a Ouput Pattern (for JSLint result display), the pattern I&#8217;m using is ^.+ &gt;&gt;&gt;in \[(.+)\] \[line\: ([0-9]+)\,character\: ([0-9]+)\], you can also change it as you prefer.<br />
After invoke this on a js file, JSLint results will display in the editplus console. Double click on the record will take you to the row.</p>
<p>More: you can actually create more extensions for you IDE and svn with javascript. This will obviously save your time and help ensure the code quality.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nuttycoder.com/2010/05/27/javascript-beautifier-jslint-integration-with-editplus/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

