<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Keep your code readable with smart indenting</title>
	<atom:link href="http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/</link>
	<description>Mike works on the MATLAB Desktop team</description>
	<lastBuildDate>Fri, 10 Feb 2012 16:17:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Mike</title>
		<link>http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-8040</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 31 Aug 2011 18:49:29 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-8040</guid>
		<description>@Forrest,

  We tried to be consistent with the bulk of other IDEs with the comment action. Of course that doesn&#039;t necessarily mean it&#039;s the right thing to do, so I&#039;ll leave an enhancement for the editor team to consider the request. Thanks.</description>
		<content:encoded><![CDATA[<p>@Forrest,</p>
<p>  We tried to be consistent with the bulk of other IDEs with the comment action. Of course that doesn&#8217;t necessarily mean it&#8217;s the right thing to do, so I&#8217;ll leave an enhancement for the editor team to consider the request. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Forrest</title>
		<link>http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-8030</link>
		<dc:creator>Forrest</dc:creator>
		<pubDate>Sat, 27 Aug 2011 01:47:38 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-8030</guid>
		<description>Pardon my french on that last comment.  Copy/Paste=Fail... 

This was what I intended for the desired result.

&lt;pre&gt;
while istanked(theEcononmy)
    wakeup;
    network;
    interview;
    update(resume);
    % Definitely adding some code that helps me find time to smile
    sleep(6*3600);
end
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Pardon my french on that last comment.  Copy/Paste=Fail&#8230; </p>
<p>This was what I intended for the desired result.</p>
<pre>
while istanked(theEcononmy)
    wakeup;
    network;
    interview;
    update(resume);
    % Definitely adding some code that helps me find time to smile
    sleep(6*3600);
end
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Forrest</title>
		<link>http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-8029</link>
		<dc:creator>Forrest</dc:creator>
		<pubDate>Sat, 27 Aug 2011 01:44:19 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-8029</guid>
		<description>Is there any particular reason that auto-indented comments are always flush left?  It would make sense if indentation of the current line wasn&#039;t dependent upon the previous line.  

When I smack the comment keystroke or comment a section, I get a flush-left comment or comment block. I know the following example includes a single-line comment, but the situation is worse when I&#039;m editing code that is in early testing phase.  I tend to comment out sections for various reasons.  

&lt;pre&gt;
while istanked(theEcononmy)
    wakeup;
    network;
    interview;
    update(resume);
%     Maybe I should add some code that helps me find time to smile
sleep(6*3600);
end
&lt;/pre&gt;

Below is what I think should happen. If the comment is created at the current indentation level, then the context of the comment is upheld and so is the indentation levels that follow it.  

while istanked(theEcononmy)
    wakeup;
    network;
    interview;
    update(resume);
    % Definitely adding some code that helps me find time to smile
    sleep(6*3600);
end
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Is there any particular reason that auto-indented comments are always flush left?  It would make sense if indentation of the current line wasn&#8217;t dependent upon the previous line.  </p>
<p>When I smack the comment keystroke or comment a section, I get a flush-left comment or comment block. I know the following example includes a single-line comment, but the situation is worse when I&#8217;m editing code that is in early testing phase.  I tend to comment out sections for various reasons.  </p>
<pre>
while istanked(theEcononmy)
    wakeup;
    network;
    interview;
    update(resume);
%     Maybe I should add some code that helps me find time to smile
sleep(6*3600);
end
</pre>
<p>Below is what I think should happen. If the comment is created at the current indentation level, then the context of the comment is upheld and so is the indentation levels that follow it.  </p>
<p>while istanked(theEcononmy)<br />
    wakeup;<br />
    network;<br />
    interview;<br />
    update(resume);<br />
    % Definitely adding some code that helps me find time to smile<br />
    sleep(6*3600);<br />
end

</p>]]></content:encoded>
	</item>
	<item>
		<title>By: junziyang</title>
		<link>http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6248</link>
		<dc:creator>junziyang</dc:creator>
		<pubDate>Mon, 18 May 2009 13:28:12 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6248</guid>
		<description>Thanks, Mike. Greak symbols can be entered using a softkeyboard.I want to know how you enter the superscript 2?
Further more, It would be great if the Editor can translate LATEX symbols in the comments directly, just like when we enter &quot;\alpha&quot; etc. in a Figure&#039;s label.</description>
		<content:encoded><![CDATA[<p>Thanks, Mike. Greak symbols can be entered using a softkeyboard.I want to know how you enter the superscript 2?<br />
Further more, It would be great if the Editor can translate LATEX symbols in the comments directly, just like when we enter &#8220;\alpha&#8221; etc. in a Figure&#8217;s label.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6247</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 18 May 2009 11:41:35 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6247</guid>
		<description>Junziyang,

 You can put symbols in comments. The editor supports whatever you system character encoding is, and thus can display whatever your font supports for a particular char. For instance, this is from my windows xp R2009a MATLAB, using the windows-1252 encoding:

&lt;img src=&quot;http://blogs.mathworks.com/images/desktop/ken_orr_smart_indenting/symbols.png&quot;&gt;

Alternatively you can use LaTeX in a comment and publish the file, which is ideal for sharing your code with students: &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f6-30186.html#brrnpjv-1&quot; rel=&quot;nofollow&quot;&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f6-30186.html#brrnpjv-1&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Junziyang,</p>
<p> You can put symbols in comments. The editor supports whatever you system character encoding is, and thus can display whatever your font supports for a particular char. For instance, this is from my windows xp R2009a MATLAB, using the windows-1252 encoding:</p>
<p><img src="http://blogs.mathworks.com/images/desktop/ken_orr_smart_indenting/symbols.png"/></p>
<p>Alternatively you can use LaTeX in a comment and publish the file, which is ideal for sharing your code with students: <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f6-30186.html#brrnpjv-1" rel="nofollow">http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f6-30186.html#brrnpjv-1</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: junziyang</title>
		<link>http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6245</link>
		<dc:creator>junziyang</dc:creator>
		<pubDate>Sun, 17 May 2009 01:04:52 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6245</guid>
		<description>Indent can make the CODE more readable. The readbility of the comments is also very important, I think. For example,the ability to input equations with Greak symbols, make them look more like what we see on the textbook.</description>
		<content:encoded><![CDATA[<p>Indent can make the CODE more readable. The readbility of the comments is also very important, I think. For example,the ability to input equations with Greak symbols, make them look more like what we see on the textbook.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6244</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 15 May 2009 17:35:47 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6244</guid>
		<description>Eric, 

 Another interesting suggestion. I&#039;ll look into the pre thing.</description>
		<content:encoded><![CDATA[<p>Eric, </p>
<p> Another interesting suggestion. I&#8217;ll look into the pre thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6243</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Fri, 15 May 2009 14:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6243</guid>
		<description>Oops, my last line was meant to read &quot;As an aside, why is an empty line after the &#039;closing pre&#039; tag removed?&quot;</description>
		<content:encoded><![CDATA[<p>Oops, my last line was meant to read &#8220;As an aside, why is an empty line after the &#8216;closing pre&#8217; tag removed?&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6242</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Fri, 15 May 2009 14:56:39 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6242</guid>
		<description>Somewhat related, it would be nice for multiline array or cell definitions if the 2nd and following lines were aligned with the first character of the first element instead of the bracket.

Right now you get this:

&lt;pre&gt;
a = [ 1 2 3
____4 5 6
____7 8 9 ];
&lt;/pre&gt;

instead of this:
&lt;pre&gt;
a = [ 1 2 3
______4 5 6
______7 8 9 ];
&lt;/pre&gt;

Also, would it be possible to allow multiline array and cell definitions to fold? That would be great! As an aside, why is an empty line after the &lt;/pre&gt; tag removed?</description>
		<content:encoded><![CDATA[<p>Somewhat related, it would be nice for multiline array or cell definitions if the 2nd and following lines were aligned with the first character of the first element instead of the bracket.</p>
<p>Right now you get this:</p>
<pre>
a = [ 1 2 3
____4 5 6
____7 8 9 ];
</pre>
<p>instead of this:</p>
<pre>
a = [ 1 2 3
______4 5 6
______7 8 9 ];
</pre>
<p>Also, would it be possible to allow multiline array and cell definitions to fold? That would be great! As an aside, why is an empty line after the 
</p><p> tag removed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6238</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 13 May 2009 17:02:45 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/desktop/2009/05/11/keep-your-code-readable-with-smart-indenting/#comment-6238</guid>
		<description>V, 

 That is correct, this auto-aligning is not possible. We just added the &lt;code&gt;pre&lt;/code&gt; instructions a few minutes ago. :)</description>
		<content:encoded><![CDATA[<p>V, </p>
<p> That is correct, this auto-aligning is not possible. We just added the <code>pre</code> instructions a few minutes ago. :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

