A darker Background editor ! Or more colors to the existing one.

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

bogs
Posts: 2073
Joined: Sat Feb 25, 2017 10:45 pm

Re: A darker Background editor ! Or more colors to the existing one.

Post by bogs » Wed Jan 24, 2018 9:27 pm

Speaking of carrying on, it looks like my previous attempt *does* work to a degree :shock:
Image
Initially, I was coding for a blank stack, and it did not appear to work, but I see that it was actually my dummy code that was the mistake.

So, now at least there is a way to use sublime text with Lc, apparently without issue, and a lexer that really colors things up nicely. The syntax coloring can be set to come up each time by going to "View /> Syntax /> Open all with current extension as... /> Livecode" (or whatever coloring you prefer).

The code above should work with Mac (not tested, this is an assumption), but may need to be modified some for Windows. Works flawlessly in Linux.

Enjoy ! :mrgreen:

*Edit - I seem to remember someone asking about the script editor and split screening it, but I can't remember 'who'. Well, now you have a solution, apparently that is a big feature of sublime.

*Edit 2 - Trevor suggests turning off auto-complete, I could go either way on that. It doesn't seem to auto-complete the way I would think it would, but I'm sure that can be edited for functionality, depending on what kind of project your poking around with.
Image

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2666
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: A darker Background editor ! Or more colors to the existing one.

Post by richmond62 » Wed Jan 24, 2018 9:46 pm

The script editor can be split into as many script editors as you want:
scriptEds.png
AND, as far as I am concerned the built-in scriptEditor suffices except
for its lack of an option to turn the script white.

bogs
Posts: 2073
Joined: Sat Feb 25, 2017 10:45 pm

Re: A darker Background editor ! Or more colors to the existing one.

Post by bogs » Wed Jan 24, 2018 10:24 pm

I really wish I could remember who asked about it, but I don't think they meant splitting tabs off into other windows, I think they were looking for more like this -
Image
As for me, as I mentioned earlier, the default editor really does ok by me with few problems. I like at this stage being able to look up documentation on something right from it, having the debugger, and many other features.

That isn't to say it is perfect in my mind, but it is good enough for me not to need to monkey with other solutions.

As to turning the script white, if you look earlier into this discussion, what Bernd said -hh did works great, a real 'chalk board' look. After setting the back color to whatever lighter color you like (the line sent is almost an opposite darker color), set the script editor colorization to 'none'. Works great.
Image

*Edit - You just know I couldn't pass up the testing sublime in Mc, works beautifully.
Image

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 629
Joined: Fri Jun 27, 2008 9:00 pm

Re: A darker Background editor ! Or more colors to the existing one.

Post by Mikey » Thu Jan 25, 2018 2:52 pm

@bogs
Trevor has instructions on how to get ST to update LC so that it reloads the SOS after you’ve saved it in ST. There are numerous dark themes in ST. I don’t like Trevor’s so I’m using Boxy, for example.

Atom is definitely more refined than ST (and hacking it is similar to hacking ST), but as of the last time I checked, a couple of months ago, we could not get it to send a signal to LC to reload an SOS after it was saved, which is a severe drawback IMHO.

bogs
Posts: 2073
Joined: Sat Feb 25, 2017 10:45 pm

Re: A darker Background editor ! Or more colors to the existing one.

Post by bogs » Thu Jan 25, 2018 5:42 pm

@ Mikey,
I think I get some of the abbreviations, but not all of em.
ST - sublime text (?)
SOS - ? script only stack ? something else?? you need help??? :D

All of my testing here, strangely enough, is mostly for people like our friend that started this thread, I targeted Sublime Text only because he posted he really liked it (as others have in previous threads on the topic).

I find the built in script editor for Lc more than sufficient for my own use, although I prefer the one from RR 2.2.1 actually with its primitive autocomplete.

The IDE I find this testing most helpful for is actually Mc, which I'm playing around with in a revival sort of way. Now that editor was pretty bare bones, I often find myself using a similar technique to pop out to very basic alternate editors, like Pluma, Mousepad, or in this case Sublime Text (really wish I could get Geany to work, but so far no luck).

While I found the contributions to Atom done well, I myself didn't care for it much. I'm a simple guy I guess, since beyond getting this to work, I probably will never touch Sublime again either :)

I read through all of Trevors instructions while I was looking for the lexer bits, but I don't think I'm advanced enough to have understood them, and I am not sure they applied in this case, which is just trying to get the default IDE to have a specifically formatted editor (at least that was my goal) that can provide a dark theme.
Image

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 629
Joined: Fri Jun 27, 2008 9:00 pm

Re: A darker Background editor ! Or more colors to the existing one.

Post by Mikey » Thu Jan 25, 2018 6:21 pm

SE script editor
SOS script-only stack
ST sublime text

Sorry, these three have been talked about so much together that I’ve started abbreviating them by default.

I have always thought the topic of breaking scripts into behavior SOS’s, and using external text editors and frameworks and git are more advanced topics, especially since there is nothing preventing one from migrating later, or going backwards (HEY GEOFF, HOW ABOUT A REVERSE-SOS IN NAVIGATOR?), similar to moving to DBMS’s instead of using the built-in card metaphor. Sure, it’s easy enough but I think n00bs should have an idea of how the universe works before they attempt warping.

bogs
Posts: 2073
Joined: Sat Feb 25, 2017 10:45 pm

Re: A darker Background editor ! Or more colors to the existing one.

Post by bogs » Thu Jan 25, 2018 8:47 pm

Good points all, but I'm not sure I agree with this one -
[1] Sure, it’s easy enough [2] but I think n00bs should have an idea of how the universe works before they attempt warping.
[1] I think this is something that is highly subjective, what may be easy for me, or easy for you and I, or even easy to a large group, may not necessarily be 'easy' for someone else without a common frame of reference.

[2] Anecdotal only, but I actually had someone say something very much like this to me when I first started looking into Mc and was asking a question about * editing a stack you couldn't reliably open. If I had listened to the advice, which in fairness was given in the best intention I am sure, I still would not be any further along in my efforts on that front since there is a distinct lack of information available pertaining to it.

In a vacuum like that, sometimes you have to make a leap of faith (or several) into a void that you don't have enough knowledge about to obtain your goals. Of course, when I come up to a wall I'm not technically ready to cross, I often batter my way through it with much wasted effort until I get what I need to know, but if I don't attempt it I haven't learned anything from failure either.

It is a tough call, but my belief is that the information should be out there whether it is an advanced topic or not. It should be up to the person looking at that information to decide whether they can implement it, even if they don't fully comprehend it at the time.

* In this case, the stack was the mcTools stack, I couldn't edit it in Mc since it included passwords not allowed in the community engine which threw errors causing the script editor to not work, and I couldn't do anything with it in Lc as well as of course Lc throws a fit when working on stacks the IDE has the same internal names for (I understand the reasoning behind this, but Mc really did make this much easier to deal with at the risk of blowing it up completely, which I did many times Image).

Of course, I finally figured out a way around these limitations, but not from any documented material on how to do this, or by progression in knowledge to suffice knowing how, but instead by making a lot of guesses and accidentally finding correct keywords.

Once someone told me it was possible (but not how), process of elimination took over.
Image

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1736
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: A darker Background editor ! Or more colors to the existing one.

Post by [-hh] » Fri Feb 02, 2018 2:39 pm

Yet another option.

SELights.livecode.zip (Dark/Light-Theme switcher)
runs on Mac/Win/Linux using LC 6/7/8/9, and on RaspberryPi.

http://forums.livecode.com/viewtopic.ph ... 02#p150402
shiftLock happens

bogs
Posts: 2073
Joined: Sat Feb 25, 2017 10:45 pm

Re: A darker Background editor ! Or more colors to the existing one.

Post by bogs » Fri Feb 02, 2018 4:13 pm

Very nice -hh Image
Image

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: A darker Background editor ! Or more colors to the existing one.

Post by teriibi » Sun Feb 25, 2018 3:51 am

Image

Image :roll: :roll: :mrgreen:
Attachments
stacks list.png
darker IDE background.png

bogs
Posts: 2073
Joined: Sat Feb 25, 2017 10:45 pm

Re: A darker Background editor ! Or more colors to the existing one.

Post by bogs » Sun Feb 25, 2018 6:45 am

Well, we told you a bunch of ways to get a dark background and readable text, you said you weren't interested in trying as I recall.

Bernd gave you the easiest solution of all, you only had to copy and paste into a message box. It doesn't let you change the text to *any* color, but it gives you the exact opposite color to what is there.

In other words, white becomes black, etc etc.
Selection_003.png
Selection_003.png (13.04 KiB) Viewed 1164 times
Just in case you wanted to try that method, and didn't for whatever reason want to code it into a stack, I did it for you :D
revscriptEditorReversoColorizer.zip
(558 Bytes) Downloaded 33 times
Now, all you need to do is unzip this into your plugins folder, start up Lc, go to the 'development' menu -> plugins -> plugin settings, find the one that says scriptEditorReversoColorizer, set it to start when you start Lc, and your script editor will be full on black (provided it is set to 'white' in the preferences) with very readable text in 3 color variations, chalkboard white, and whatever the 2 colored ones look like (one shown above).

*Edit, I probably should have just pointed you to -hh's stack which does the same thing.
Last edited by bogs on Sun Feb 25, 2018 3:41 pm, edited 1 time in total.
Image

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: A darker Background editor ! Or more colors to the existing one.

Post by teriibi » Sun Feb 25, 2018 12:32 pm

Hmmm, got lost in the ton of replies I did get a that moment - I ll test it and let you know how it workked for me, tkx ! :roll:

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: A darker Background editor ! Or more colors to the existing one.

Post by teriibi » Sun Feb 25, 2018 9:25 pm

Image
:mrgreen: :mrgreen: :mrgreen:
Attachments
Sans titre.png

bogs
Posts: 2073
Joined: Sat Feb 25, 2017 10:45 pm

Re: A darker Background editor ! Or more colors to the existing one.

Post by bogs » Sun Feb 25, 2018 11:06 pm

So...I take it Herman's miracle mystery cure is good enough...for now? :D

Also, what do you mean you couldn't figure out how to automate it? If you went to the plugins menu, and set it to open at startup, lc automates it for you.

*Edit, just to make sure, here are the steps.
Selection_008.png
Go to plugins -> plugin settings
Selection_009.png
Go to the plugin drop down, choose this plugin
Selection_010.png
Choose 'Open plugin when: Livecode starts up' & 'Open as: invisible' (unless you like staring at a blank stack).
Image

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: A darker Background editor ! Or more colors to the existing one.

Post by teriibi » Mon Feb 26, 2018 4:56 am

Finaly !!!!!!!!
a Dark and selfstarting Background ! (well almost self..I had to sweat myself too)
:wink:
but I m confident it ll be included strait from Lc Version 10.0.0 ! :arrow: ..just pray and see...!

Post Reply

Return to “Feature Requests”