1. Simple question

Hello all,

Which editor/syntaxfile-combo is used on the forum?
FYI I work under Ubuntu 16.04.3 and also Mint 18.02 XFCE andd really like the looks of the files I see.
The coloring gives you a good structural view, but I tried a number of the editor I found, without finding the right one.

THX on beforehand for helping me out.

Antoine/Netherlands

new topic     » topic index » view message » categorize

2. Re: Simple question

Ekhnat0n said...

Which editor/syntaxfile-combo is used on the forum?
FYI I work under Ubuntu 16.04.3 and also Mint 18.02 XFCE andd really like the looks of the files I see.
The coloring gives you a good structural view, but I tried a number of the editor I found, without finding the right one.

I'm running Linux Mint 18 KDE. I use Nano with the .nanorc from the Editors page.

https://www.dropbox.com/s/0oyercvic7okpk5/Screenshot_20171201_203109.png

-Greg

new topic     » goto parent     » topic index » view message » categorize

3. Re: Simple question

I use WEE, which can match the forum color coding easily. A number of programming editors for Linux use the gedit-syntax scheme, including gedit, xed, and others using GtkSourceView (e.g. my BEAR editor). The gedit files are pretty easy to modify to get the exact color coding you want. I'd start with the "classic" theme, which is already close.

The advantage of using gedit-syntax is that adding the syntax file also gives the editors a "Euphoria" option on the "Highlight Mode" menu.

WEE doesn't need a syntax file, since it is Eu-aware only, you just choose the colors from a drop-down menu.

Here's an example of the "classic" theme: https://sites.google.com/site/euphoriagtk/Screenshot%20from%202017-12-01%2022-24-52.png

new topic     » goto parent     » topic index » view message » categorize

4. Re: Simple question

@greg & irv:

Thanks for your quick response.Both screenprints have their own merits,
so I guess I will be playing around a bit next week with both options,
maybe even set a more intricate color-scheme for the 'flow-controls' in such way
that it will be utterly clear where each construction starts & ends
(different colors for if..elsif..else endif/ switch... case... endswitch etc
with the fallltroughs, breaks and exits in a "fluorescent" orange
( ;) being the color of our royal family ever since the 16th century after all).

Kind regards

Antoine.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Simple question

What would really be helpful, (if it's possible) would be to color nested statements differently:

if a = 1 then  (red) 
  -- some stuff 
  if b = 2 then (green) 
   -- do something 
  end if  (green) 
  -- other stuff 
end if  (red) 
Because often there's a lot of "do something" and "stuff" code in between, and if you aren't really careful about indenting properly, it's hard to find the matching end.

new topic     » goto parent     » topic index » view message » categorize

6. Re: Simple question

You mean handling nested loops in the same way like balancing parenthesis/curly brackets etc, I suppose.
That could be handled by some type of macro that adds an endif on that level immediatly after you type an if and in the mean time ´shift' one position in a "color-structure" for the next time you need
It would take some 'book-keeping' inside the editor ofc, but IMHO it might be do-able. But OTOH, if you have to nest the if-constructs too deeply, you could intermittently use if..elsif..else..endif and switch..case..endswitch OR maybe add 4 new keywords: when... elsewhen..... finally.... endwhen.
The same way in fact you would try to avoid using the same words in an intelligent conversation.
An enticing puzzle for the long winter-evenings. OR ELSE one might consider going back to the drawingboard and find a cleverer solution in such an iffy situation. Who knows my old grey cells find something, but I guess they won't BEFORE I turn 72 next saturday ;P

new topic     » goto parent     » topic index » view message » categorize

7. Re: Simple question

irv said...

What would really be helpful, (if it's possible) would be to color nested statements differently:

if a = 1 then  (red) 
  -- some stuff 
  if b = 2 then (green) 
   -- do something 
  end if  (green) 
  -- other stuff 
end if  (red) 
Because often there's a lot of "do something" and "stuff" code in between, and if you aren't really careful about indenting properly, it's hard to find the matching end.

Theoretically possible - certainly. Edita, and now its planned cross-platform replacement Edix, has a "bCfwd" thing that handles brackets just like that, probably not that hard to adapt, but...

Edita/Edix also have Tools/Reindent, which certainly helps, and I would say that approach is better.

However, even better, Ctrl [ and Ctrl ] jump from the end if to the if and back - and in fact I just finished that in Edix only a couple of days ago.

As to when or indeed whether Edix will ever be finished, well...

Pete

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu