<?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>Huddled Masses &#187; Syntax Highlighting</title>
	<atom:link href="http://joelbennett.net/tag/syntax-highlighting/feed/" rel="self" type="application/rss+xml" />
	<link>http://joelbennett.net</link>
	<description>The internet home of Joel "Jaykul" Bennett...</description>
	<lastBuildDate>Fri, 27 Apr 2012 05:42:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<cloud domain='joelbennett.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Using Notepad++ For PowerShell Editing</title>
		<link>http://joelbennett.net/using-notepad-plus-plus-for-powershell-editing/</link>
		<comments>http://joelbennett.net/using-notepad-plus-plus-for-powershell-editing/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 02:09:08 +0000</pubDate>
		<dc:creator>Joel 'Jaykul' Bennett</dc:creator>
				<category><![CDATA[Huddled]]></category>
		<category><![CDATA[Notepad++]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Scintilla]]></category>
		<category><![CDATA[Syntax]]></category>
		<category><![CDATA[Syntax Highlighting]]></category>

		<guid isPermaLink="false">http://huddledmasses.org/?p=1337</guid>
		<description><![CDATA[A while back Thell Fowler (with a little help, and a lot of testing from me) wrote a very good PowerShell Lexer for Notepad++ 5.2 and later&#8230; it&#8217;s very thorough, has good code-folding, and full support for PowerShell 2.0 syntax highlighting. I mention this because Notepad++ 5.6 just released yesterday, and it has built-in support [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_1341" class="wp-caption alignright" style="width: 310px"><a href="http://huddledmasses.org/wordpress/wp-content/uploads/2009/12/PowerShell_Lexer_Notepad++.png"><img src="http://huddledmasses.org/wordpress/wp-content/uploads/2009/12/PowerShell_Lexer_Notepad++-300x271.png" alt="The style I use has a nice black background..." title="PowerShell_Lexer_Notepad++" class="size-medium wp-image-1341" height="271" width="300" /></a><p class="wp-caption-text">The style I use has a nice black background...</p></div>

	<p>A while back Thell Fowler (with a little help, and a lot of testing from me) wrote a <strong>very</strong> good <a href="http://poshcode.org/notepad++lexer">PowerShell Lexer</a> for <a href="http://notepad-plus.sourceforge.net/uk/site.htm">Notepad++</a> 5.2 and later&#8230; it&#8217;s very thorough, has good <a class="zem_slink" href="http://en.wikipedia.org/wiki/Code_folding" title="Code folding" rel="wikipedia">code-folding</a>, and full support for PowerShell 2.0 syntax highlighting.</p>

	<p>I mention this because Notepad++ 5.6 just released yesterday, and it has built-in support for PowerShell syntax courtesy of <a class="zem_slink" href="http://www.scintilla.org/" title="Scintilla (editing component)" rel="homepage">Scintilla</a> ... but it&#8217;s <strong>very,</strong> <strong>very</strong> bad. The scintilla PowerShell lexer is probably the most minimal PowerShell lexer I&#8217;ve seen (it&#8217;s worse than the old &#8220;user style&#8221; I had created for Notepad++) and has no support for:</p>

	<p>	<ul>
		<li>The ` <a class="zem_slink" href="http://en.wikipedia.org/wiki/Escape_character" title="Escape character" rel="wikipedia">escape character</a> </li>
		<li>Here-strings (which can contain quotes, etc)</li>
		<li>The difference between strings and literal strings and literal here-strings</li>
		<li>The begin/process/end block keywords and Param() </li>
		<li>PowerShell operators (like -is or -gt or -notcontains)</li>
		<li>[System.Namespace.Class]::Method() syntaxes</li>
		<li>Nested $variables inside strings</li>
		<li>Nested $( code blocks ) inside strings (with strings inside those, and &#8230;)
		<li>Any of the new PowerShell 2 syntax like:
	<ul>
		<li>multi-line comments</li>
		<li>[Parameter()] and [Alias()] and [Validate &#8230;. ]</li>
	</ul></li>
	</ul>
	<ul>
		<li>[CmdletBinding()]</li>
	</ul></li></p>

	<p>There&#8217;s probably more, but I couldn&#8217;t be bothered to spend more than a couple of minutes with it. As you can probably guess &#8230; <strong>all of those features</strong> are supported by the external PowerShell Lexer plugin that Thell wrote, so if you&#8217;re a PowerShell and Notepad++ user, I apologize for not drawing your attention to our <a href="http://poshcode.org/notepad++lexer">PowerShell Lexer for Notepad++</a> before  <img src='http://joelbennett.net/wordpress/wp-includes/' alt=':)' class='wp-smiley' /> .</p>

	<p>Incidentally, I stuck a screenshot in this post so you can see how <strong>I</strong> use it, but there&#8217;s one a more complete example of the <a href="http://poshcode.org/notepad++lexer">PowerShell Syntax Highlighting</a> on that lexer download page.  <img src='http://joelbennett.net/wordpress/wp-includes/' alt=';-)' class='wp-smiley' /> </p>

<div class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/fdf36a60-04ff-42dc-9722-b30ccfb8d28b/" title="Reblog this post [with Zemanta]"><img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=fdf36a60-04ff-42dc-9722-b30ccfb8d28b" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>]]></content:encoded>
			<wfw:commentRss>http://joelbennett.net/using-notepad-plus-plus-for-powershell-editing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

