1. Carl White's editor request.
- Posted by Bernie Ryan <xotron at localnet.com> Dec 31, 2001
- 382 views
Carl: With the next release of the cs editor could you please add an option that allows the user to disable replacing TABs with SPACES. The editor should be able to edit using TABS or expanding them into spaces at the user's option. Bernie
2. Re: Carl White's editor request.
- Posted by "Carl R. White" <euphoria at carlw.legend.uk.com> Jan 02, 2002
- 378 views
"Bernie Ryan" wrote: > Carl: > With the next release of the cs editor > could you please add an option that allows > the user to disable replacing TABs with SPACES. > The editor should be able to edit using TABS or > expanding them into spaces at the user's option. A 'next' version of EE:CS is more an 'if' than a 'when' at the moment. The feature you request wouldn't be too difficult to implement, since space-to-tab compression is only done on Euphoria files, so other files are left alone. If you want to switch to using the source-based editor rather than the bound .EXE (which I admit is a bit of a pain), you can achieve what you want by changing: dump = (edited[fNum][READ_ONLY] >= isBinary) to: dump = 1 -- (edited[fNum][READ_ONLY] >= isBinary) ...on line 772 of EE.EX. This, of course, turns off *all* space-to-tab compression. I suspect that this is what you were after though. :) [ ED.EX does exactly the same thing to Euphoria source, and Mr. Cuny implemented the same thing in the original EE. I have a feeling it was deliberately crippled though, because I had to 'fix' it. :) ] Carl
3. Re: Carl White's editor request.
- Posted by "Carl R. White" <euphoria at carlw.legend.uk.com> Jan 02, 2002
- 383 views
Bernie Ryan wrote: > Carl R. White wrote: > > dump = 1 -- (edited[fNum][READ_ONLY] >= isBinary) > > > > Carl: > Thanks but that doesn't help. > What I want to be able to do is set the tab option for 4 > which embedded a '\t' in the text and move the displayed > text over the number of spaces that is set in the tab option. I don't understand this. Why would you want 'setting the tab option to 4 spaces' to cause the editor to embed a tab? > Whenever a file is loaded or written out I do not want > the editor to convert the '\t' to spaces. > The problem is if you load a file into the editor that was > created by another editor and make one change to the file, > the file is striped of '\t' which are replaced by spaces. This, I do understand - you want to keep all embedded tabs intact. I'm not sure whether it would be possible to do that without radically altering the code for MLEs. I'd have to take a good long look at the code. One problem I can see is having to work around all the code for compressing tabs I was talking about in my first reply. When a Euphoria-language file is loaded into EE, EE can't tell whether the file has been saved previously with EE or not, so it assumes that it has been. In assuming this, EE then converts every tab at the very beginning of a line to eight spaces for internal use, regardless of the tab setting. This is how it decompresses the space-to-tab compression that was done when it saved a file. When saving again, it will compress back to tabs again. I'll be honest and say I don't know (and can't test from here) what happens when an ordinary file with embedded tabs is loaded in. Is this what you're having problems with? > Typing a TAB KEY will not allow you to embedded a '\t' in a file. Not in EE, no. Why would anyone want to embed a tab in a text-file anyway? -- Carl R White - aka - Cyrek the Illogical E-mail...: cyrek at cyreksoft.yorks.com URL......: http://www.cyreksoft.yorks.com