<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Auto-correct 'non-conforming tab characters']]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=394&amp;type=atom" />
	<updated>2014-11-28T20:58:02Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=394</id>
		<entry>
			<title type="html"><![CDATA[Re: Auto-correct 'non-conforming tab characters']]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1649#p1649" />
			<content type="html"><![CDATA[<p>Oh, I hadn&#039;t realized that SF was smart enough to not use spaces instead of tabs in Makefiles...that&#039;s very good. </p><p>A bit more testing and I noticed that Option &quot;remove excess white space&quot; does take effect even if the file hadn&#039;t been modified...which helps John.&nbsp; As John already said, one can do &quot;File -&gt; Save&quot; on a <strong>single opened file</strong> and this Option removes excess white space.&nbsp; Nevertheless, one would need to open each file and click &quot;File -&gt; Save&quot;...because...</p><p>...one cannot simply open a project and click on &quot;File -&gt; Save All&quot; and expect white space removal on all files just because...even after opening ALL files and clicking on &quot;Save All&quot;, excess white space is not removed; which seems to indicate a difference in behavior between &quot;Save&quot; and &quot;Save All&quot;...</p><p>...which brings us back to John&#039;s high level macro abilities and the possibly of new menu options like &quot;File -&gt; Open All&quot;...&nbsp; </p><p>...Or a change in behavior of the &quot;Save All&quot; command to take effect even on un-opened files...I am not sure if this starts getting dangerous. </p><p>Of course, I would just go to my (Linux) command line and do:<br /></p><div class="codebox"><pre><code>for f in *.f90; do sed &#039;s/\t/    /&#039; $f &gt; $f.notabs; mv $f.notabs $f; done</code></pre></div><p><img src="https://forums.approximatrix.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[gsal]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3588</uri>
			</author>
			<updated>2014-11-28T20:58:02Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1649#p1649</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto-correct 'non-conforming tab characters']]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1648#p1648" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>gsal wrote:</cite><blockquote><p>I would like to split these features into <em>behaviors</em> and <em>actions</em> and say that:<br /></p><ul><li><p><em>behaviours</em> can be permanent settings under &quot;Options-&gt; Editor&quot;, for as long as they only affect the manner in which <strong>current</strong> session edits are done and do not change other <strong>preexisting conditions</strong> of the file; and</p></li><li><p><em>actions</em> can (should) be under &quot;Edit&quot; menu and should be on-demand activities that can potentially change the existing or preexisting contents of the file.</p></li></ul></blockquote></div><p>I like the clarity of this way of looking at edit options and menu actions.<br />All I was suggesting was that what I hadn&#039;t realised was already available as an edit menu action, might usefully be added under file options as an optional behaviour.</p><p>My suggestion doesn&#039;t preclude the possibility that users might prefer this option switched off, which should therefore be the default.<br />-- <br />John</p>]]></content>
			<author>
				<name><![CDATA[JohnWasilewski]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=102</uri>
			</author>
			<updated>2014-11-28T19:12:58Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1648#p1648</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto-correct 'non-conforming tab characters']]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1647#p1647" />
			<content type="html"><![CDATA[<p>Thanks Jeff, I simply hadn&#039;t noticed the edit menu tabs-to-spaces action.&nbsp; I&#039;d been looking only in the edit options list.&nbsp; SF therefore already does what I need.</p><p>Nonetheless, it would be quite good if this facility could also be added to the edit options.</p><p>At present, it seems I need to open each source file, select the edit action, then save.<br />If it were an edit option then an entire project might be tidied up just by doing a clean and rebuild.<br />--- <br />J.</p>]]></content>
			<author>
				<name><![CDATA[JohnWasilewski]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=102</uri>
			</author>
			<updated>2014-11-28T18:56:33Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1647#p1647</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto-correct 'non-conforming tab characters']]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1645#p1645" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>- Use spaces when new tabs are entered.<br />- Substitute spaces for existing tabs on Save.<br />- Remove excess whitespace on Save</p></blockquote></div><p>There isn&#039;t an option to all three things above automatically.&nbsp; However, all three exist as options alone.&nbsp; Obviously &quot;Use spaces when new tabs are entered&quot; is available in the Editor Options window.</p><p>&quot;Substitute spaces for existing tabs&quot; is already in the Edit menu as &quot;Convert Tabs to Spaces.&quot;&nbsp; Doing this automatically seems like overkill simply because you&#039;d only actually want to do this action once per file.&nbsp; It might be nice for a large code base, I suppose, but you&#039;d still have to load each file into the editor and re-save it even if it were automatic.</p><p>&quot;Remove excess whitespace on save&quot; is also already present in the Editor Options window.&nbsp; </p><p>Was there a different feature you were looking for?</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2014-11-28T16:37:04Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1645#p1645</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto-correct 'non-conforming tab characters']]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1644#p1644" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Never mind that having &quot;Options-&gt;Editor-&gt;Use-spaces-instead-of-tabs&quot; keeps you from creating make files from scratch, in the first place...that is a different matter.</p></blockquote></div><p>Just as a minor point, this option does not actually apply to Makefiles.&nbsp; If Simply Fortran thinks you are editing a Makefile, it will always use actual tabs regardless of that editor setting.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2014-11-28T16:32:02Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1644#p1644</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Auto-correct 'non-conforming tab characters']]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1643#p1643" />
			<content type="html"><![CDATA[<p>Hhhmmm...I don&#039;t quite agree with that.&nbsp; I think things are just fine the way they are. </p><p>On the one hand, I would like to split these features into <em>behaviors</em> and <em>actions</em> and say that:<br /></p><ul><li><p><em>behaviours</em> can be permanent settings under &quot;Options-&gt; Editor&quot;, for as long as they only affect the manner in which <strong>current</strong> session edits are done and do not change other <strong>preexisting conditions</strong> of the file; and</p></li><li><p><em>actions</em> can (should) be under &quot;Edit&quot; menu and should be on-demand activities that can potentially change the existing or preexisting contents of the file.</p></li></ul><p>The slight discrepancy, here, is that Option &quot;remove excess white space on save&quot; <em>can</em> (potentially) change the preexisting condition of the file...but it does not do so in any significant manner that would change the interpretation of the source.</p><p>In particular, I am thinking make files. If I create a project, add files, generate make file, compile and then I find myself wanting to tweak the make file, as soon as I save my Makefile, the Options-&gt;Editor-&gt;Replace-Tabs would remove significant tabs that are required for the correct interpretation of the source.&nbsp; </p><p>Never mind that having &quot;Options-&gt;Editor-&gt;Use-spaces-instead-of-tabs&quot; keeps you from creating make files from scratch, in the first place...that is a different matter.</p><p>My 2 cents.</p>]]></content>
			<author>
				<name><![CDATA[gsal]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3588</uri>
			</author>
			<updated>2014-11-28T14:58:08Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1643#p1643</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Auto-correct 'non-conforming tab characters']]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1642#p1642" />
			<content type="html"><![CDATA[<p>The editor settings already include options to <br /> - Use spaces for tabs, and<br /> - Remove excess whitespace on Save.</p><p>Unless I am mistaken, this appears not to substitute spaces for tab characters, because, although I have noth of the above selected, I am finding that all my code is riddled with compiler warnings about illegal tab characters, especially at character position 1.&nbsp; I have tried to understand why this might be, and I can only assume that it must&nbsp; be that, selecting the &quot;Use spaces for tabs&quot; option must causes the editor to enter spaces when the user enters tab characters, but does NOT mean that it makes the editor substitute spaces for tab characters already in a source file.</p><p>If I am correct then could a further option be added, to make these the three Edit options:<br /> - Use spaces when new tabs are entered.<br /> - Substitute spaces for existing tabs on Save.<br /> - Remove excess whitespace on Save</p><p>--- <br />John</p>]]></content>
			<author>
				<name><![CDATA[JohnWasilewski]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=102</uri>
			</author>
			<updated>2014-11-28T11:56:09Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1642#p1642</id>
		</entry>
</feed>
