[Gambas-user] Ouch, TextEditor just ruined my script :(
Jussi Lahtinen
jussi.lahtinen at gmail.com
Thu Oct 22 21:21:31 CEST 2020
OK, now I understand. And I agree, that behavior is not consistent with
what is usually meant by highlighting.
I guess that has been an easy place to put the action. When you type
something in the IDE, the text is highlighted and thus at the same time
corrected for proper formatting.
I don't know how it is implemented, but if the "gambas" style is in a
separated data file, I think you might want to copy and modify it to do a
"bash" version for it.
Jussi
On Thu, Oct 22, 2020 at 10:01 PM Bruce Steers <bsteers4 at gmail.com> wrote:
> I mean completely changing LOTS of text,
>
> I've attached a zip.
> I contains 2 files.
> One is a working bash script.
> the other has been RUINED by simply selecting the "gambas" highlight
> option.
>
> it does WAY more than just indent.
> is capitalised all the If , then, else, while, etc commands, moved
> text/spaces around a lot , added quotes on strings split over various lines.
> changed for example cat /home/user/myfile.txt to cat / home / user /
> myfile.txt
>
> Scrunched stuff like if [ $spacin = "matters" ]; then
> to if [$spacin = "matters"]; then
> moved EVERY dash arg like echo -e "text" became echo - e "text" (dash
> moved)
>
> the list goes on.
> The attached file is the one that took me over 4 hours to re-do and debug
> after the Text editor i made saved my changes on exit.
>
> Look at the 2 files to see what i'm saying.
> one is messed right up and all i did was view gambas highlight mode.
> Waaaay more than indenting.
> BruceS
>
>
> On Thu, 22 Oct 2020 at 19:47, Jussi Lahtinen <jussi.lahtinen at gmail.com>
> wrote:
>
>> Not sure I understand what you mean by re-formatting. Just adding
>> indentations..? But that shouldn't ruin anything..?
>>
>>
>> Jussi
>>
>> On Thu, Oct 22, 2020 at 9:23 PM Bruce Steers <bsteers4 at gmail.com> wrote:
>>
>>> I've added a warning on the wiki about it.
>>>
>>> Benoít rejected it as a bug, asked why would i set highlighting to
>>> gambas and expect no gambas highlighting?
>>> Simple answer being that i *did* expect gambas highlighting but didn't
>>> expect "highlighting" to do "text re-formatting"
>>> I didn't expect to spend 4.5 hours fixing a bash script that the so
>>> called "highlighting" ruined either.
>>>
>>> as far as i'm concerned for my Text Editor app the "Highlight" option
>>> "gambas" has to be removed as it's dangerous.
>>>
>>> BruceS
>>>
>>>
>>> On Thu, 22 Oct 2020 at 17:50, Christof Thalhofer <chrisml at deganius.de>
>>> wrote:
>>>
>>>> Am 22.10.20 um 18:14 schrieb Bruce Steers:
>>>>
>>>> > Then it suddenly became horribly "BAD" for scripting :'(
>>>> > Horribly, terribly, awfully bad.
>>>> >
>>>> > I may have even cussed ;) lol
>>>>
>>>> Yes sure such shit happens sometimes. Maybe you should implement also a
>>>> Ctrl-Z/Ctrl-Y function into your editor.
>>>>
>>>> Alles Gute
>>>>
>>>> Christof Thalhofer
>>>>
>>>> --
>>>> [x] nail here for new monitor
>>>>
>>>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>>>
>>>
>>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>>
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201022/8f79f6fb/attachment.htm>
More information about the User
mailing list