1. Geany setup for Euphoria?

Happy New Year!

Are there any Euforiya community fans editor geany ? http://www.geany.org/ Given the prevalence of ( http://www.geany.org/Download/ThirdPartyPackages ) it should be presented in ( http://openeuphoria.org/wiki/view/Editors.wc ) to my mind

Sorry Google, for his English :)

new topic     » topic index » view message » categorize

2. Re: Geany setup for Euphoria?

If there is no ready-made settings, ask for help from English-speaking colleagues to freely read the documentation geany. In consequence of my poor English have difficulty understanding the details

Sorry Google, for his English :)

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

3. Re: Geany setup for Euphoria?

I use Geany all the time, and like it. It would be nice if there were Euphoria syntax highlighting, but adding that seems like far too much work, so I haven't bothered. Pretending your euphoria program is a Lua program works reasonably well, as it colorizes the common constructs such as if.. then, function, return, and comments.

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

4. Re: Geany setup for Euphoria?

I'm also a big fan of Geany, and here is my attempt to add some Euphoria support. I don't think it has all the correct syntax coloring, but it works well for me. Here are the steps I used to get it working in Geany 0.19.2 on Ubuntu (I'm not sure if this will work on older versions of Geany...)

1) Make a file "filetypes.Eu.conf" and place it in "~/.config/geany/filedefs/" The contents of the file are listed below.
2) Edit "filetype_extensions.conf" located in "~/.config/geany/" to include an Eu reference, such as:

... 
D=*.d;*.di; 
# Eu filetypes  
Eu=*.ex;*.exw;*.e; 
F77=*.f;*for;*.ftn;*.f77; 
... 

That should do it. Also, you could make these changes globally in the Geany install directory instead of the the user path.

Hope this helps,
Ira



filetypes.Eu.conf

# For complete documentation of this file, please see Geany's main documentation 
[styling] 
# foreground;background;bold;italic 
default=default 
comment=comment 
commentline=comment 
commentdoc=commentdoc 
number=number 
word=word 
word2=word2 
string=string 
character=string 
uuid=0x404080 
preprocessor=preprocessor 
operator=operator 
identifier=default 
stringeol=stringeol 
# @"verbatim" 
verbatim=0x101030 
# (/regex/) 
regex=0x105090 
commentlinedoc=commentdoc,bold 
commentdockeyword=commentdoc,bold,italic 
commentdockeyworderror=commentdoc 
globalclass=type 
 
[keywords] 
# all items must be in one line 
primary=and as break by case constant continue do else elsif elsifdef end entry enum exit export fallthru for function global goto if ifdef include label loop namespace not or override procedure public retry return routine switch then to type until while witch without xor 
secondary=abort and_bits append arctan atom c_func c_proc call call_func call_proc clear_screen close command_line compare cos date delete delete_routine equal find find_from floor get_bytes get_key get_pixel getc getenv gets hash head include_paths insert integer length log machine_func machine_proc match match_from mem_copy mem_set not_bits object open option_switches or_Bits peek peek2s peek2u peek4s peek4u peek_string peeks pixel platform poke poke2 poke4 position power prepend print printf profile profile_time puts rand remainder remove repeat replace routine_id sequence sin splice sprintf sqrt string system system_exec tail tan task_clock_start task_clock_stop task_create task_list task_schedule task_self task_status task_suspend task_yield time trace value warning xor_bits xpcall 
# these are some doxygen keywords (incomplete) 
docComment=warning 
 
[settings] 
lexer_filetype=C 
tag_parser=Python 
 
# default extension used when saving files 
extension=gs 
 
# the following characters are these which a "word" can contains, see documentation 
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 
 
# if only single comment char is supported like # in this file, leave comment_close blank 
#comment_open=// 
#comment_close= 
# this is an alternative way, so multiline comments are used 
comment_open=/* 
comment_close=*/ 
 
[build-menu] 
FT_00_LB=_Compile 
FT_00_CM=euc "%f" 
FT_00_WD= 
FT_01_LB=_Build 
FT_01_CM=eubind "%f" 
FT_01_WD= 
FT_00_LB=_Run 
FT_00_CM=eui "%f" 
FT_00_WD= 

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

5. Re: Geany setup for Euphoria?

I am very interested in this. It did allow me to see my Euphoria color coded and to run it directly from geany. However, it does not recognize Euphoria comments --

It does recognize / and ' and # which are not even part of Euphoria. So I was wondering if you got it to work for Euphoria comments.

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

6. Re: Geany setup for Euphoria?

penpal0andrew said...

It does recognize / and ' and # which are not even part of Euphoria. So I was wondering if you got it to work for Euphoria comments.

I don't think I ever had any luck getting '--' recognized as comments. The color definitions are explained here: http://www.geany.org/manual/current/index.html#filetype-definition-files. I think I tried editing comment_open and comment_close, but it didn't like '--' for some reason!

Thanks,
Ira

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

7. Re: Geany setup for Euphoria?

Thanks for acknowledging this. I spent a whole day compiling Geany with a Euphoria lexer I found on the net but I have not had any success. I am also looking into other editors. The editors written in Euphoria are simply not powerful enough yet (lack line numbers); and scintilla seems really complicated to me, and I started looking into gedit, since it uses a different scheme, but I do not have the Gnome desktop (on Linux there are various desktops which are packages of packages). Over time, I will probably learn to live with the comments not being highlighted correctly, since Geany is so great.

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

8. Re: Geany setup for Euphoria?

Actually I change my recommendation - VIM is the best editor! The color syntax is almost a non issue. The commands are a bit to get used to, but that is okay.

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

9. Re: Geany setup for Euphoria?

penpal0andrew said...

The editors written in Euphoria are simply not powerful enough yet (lack line numbers);

Thanks for reminding me about this. If you grab wxIDE from svn, I've added line numbers to the editor. (I know you've apparently settled on vim, but thought I should mention this).

https://wxeuphoria.svn.sourceforge.net/svnroot/wxeuphoria/ide/trunk

Matt

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

10. Re: Geany setup for Euphoria?

Yes, Vim is probably the most awesome editor.

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

11. Re: Geany setup for Euphoria?

jaygade said...

Yes, Vim is probably the most awesome editor.

ed is the standard text editor.

Matt

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

12. Re: Geany setup for Euphoria?

Matt -

Thanks for the sense of humor.

Which files from trunk should I grab?

Thanks.

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

13. Re: Geany setup for Euphoria?

penpal0andrew said...

Matt -

Thanks for the sense of humor.

Which files from trunk should I grab?

Thanks.

All of them! Actually, to get the changes to wxIDE since v0.6.0, only wxide.exw and wxIDE_Syntax.e have changed. And I think the wxide.exw changes were updating the change log.

Matt

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

14. Re: Geany setup for Euphoria?

A rose by any other name is a rose just the same...

As far as I can tell, I have gained full Geany support for Euphoria. The only hitch is that you can't call it "Euphoria". I basically rewrote all the lua files for Euphoria. I suppose you could do it with any of the other fully supported files located in /usr/share/Geany/ just as well. I was never able to get color support to work using custom file types.

Geany has 7+ user defined sections in it's "Build" menu which can be configured to compile, Shroud, Bind, probably even to gather files for distribution using "eudist". It also has a configurable context command which can be assigned to a key.

The syntax color support looks very complicated at first blush, but there is a color chooser available in the tools menu which makes it a snap to configure the colors to your preference.

# filetypes.lua edited to support the Euphoria Programming Language 
# The lua filetype extensions in the global filetype_extensions file should be changed to Euphoria extensions 
# Lua=*.e;*.ex;*.eu;*.ew;*.exw; 
 
 
[styling] 
# foreground;background;bold;italic 
default=0x000000;0xffffff;false;false 
comment=0xd00000;0xffffff;false;false 
commentline=0xd00000;0xffffff;false;false 
# commentdoc=0x3f5fbf;0xffffff;true;false 
number=0x007f00;0xffffff;false;false 
word=0x00007f;0xffffff;true;false 
string=0xff901e;0xffffff;false;false 
character=0x008000;0xffffff;false;false 
literalstring=0x008020;0xffffff;false;false 
preprocessor=0x007f7f;0xffffff;false;false 
operator=0x301010;0xffffff;false;false 
identifier=0x000000;0xffffff;false;false 
stringeol=0x000000;0xe0c0e0;false;false 
keywords=0x0000FF;0xffffff;true;false 
function_other=0xCC99CC;0xffffff;false;false 
# extra could be used for 3rd party libraries: 
extra=0x#404080 
 
[keywords] 
# all items must be in one line 
 
keywords=and as break by case constant continue do else elsedef elsif elsifdef end entry export fallthru for function global goto if ifdef include label loop namespace not or override procedure public retry return routine switch then to type until while with without xor 
 
function_other=? abort and_bits append arctan atom c_func c_proc call call_func call_proc clear_screen close command_line compare cos date delete delete_routine equal find floor get_key getc getenv gets hash head include_paths insert integerlength log machine_func machine_proc match mem_copy mem_set not_bits object open option_switches or_bits peek peek2s peek2u peek4s peek4u peek_string peeks pixel platform poke poke2 poke4 position power prepend print printf puts rand remainder remove repeat replace routine_id sequence sin splice sprintf sqrt system system_exec tail tan task_clock_start task_clock_stop task_create task_list task_schedule task_self task_status task_suspend task_yield time trace xor_bits 
 
[settings] 
lexer_filetype=C 
tag_parser=c 
# default extension used when saving files 
extension=ex 
 
# the following characters are these which a "word" can contains, see documentation 
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 
 
# if only single comment char is supported like # in this file, leave comment_close blank 
comment_open=-- 
comment_close= 
# this is an alternative way, so multiline comments are used 
#comment_open=--[[ 
#comment_close=]]-- 
 
# set to false if a comment character/string should start at column 0 of a line, true uses any 
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d 
#	#command_example(); 
# setting to false would generate this 
#	command_example(); 
# This setting works only for single line comments 
comment_use_indent=true 
 
# context action command (please see Geany's main documentation for details) 
context_action_cmd=epiphany http://openeuphoria.org/search/results.wc?manual=1&s="%s" 
 
[build_settings] 
# %f will be replaced by the complete filename 
# %e will be replaced by the filename without extension 
# (use only one of it at one time) 
compiler= 
run_cmd=eui ./"%f" 
 
[build-menu] 
EX_00_LB=_Execute 
EX_00_CM=eui ./%e 
EX_00_WD= 
 
FT_00_LB=Compile 
FT_00_CM=euc  "%f" 
FT_00_WD= 
FT_01_LB=Bind 
FT_01_CM=eubind  "%f" 
FT_01_WD= 
FT_02_LB=Shroud 
FT_02_CM=eushroud  "%f" 
FT_02_WD= 

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

15. Re: Geany setup for Euphoria?

K_D_R said...

Geany has 7+ user defined sections in it's "Build" menu which can be configured to compile, Shroud, Bind, probably even to gather files for distribution using "edudist".

Good post overall, but I just wanted to say that it's actually named 'eudist'.

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

16. Re: Geany setup for Euphoria?

Thanks - I corrected my post.

I do hope more people will give Geany a trial run. It is really a fantastic editor.

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

17. Re: Geany setup for Euphoria?

I submitted a request to the Geany developers to add Euphoria support to the next release.

3429244 Euphoria filetype support- Open -2011-10-27 -nobody https://www.google.com/accounts 5

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

18. Re: Geany setup for Euphoria?

K_D_R said...

I submitted a request to the Geany developers to add Euphoria support to the next release.

Thanks for the work! Geany is one of my favorite editors as well.

Ira

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

19. Euphoria Code Auto-completions using "snippets"

Geany supports code completion based upon settings in a file called "snippets.conf". As I have reported earlier in this thread, I have edited various files and sections of files for the language "lua" to support Euphoria. Inserting the following section in the file "snippets.conf" enables auto-completion of various Euphoria statements as illustrated below, provided "snippet completions" has been selected in the Preferences/Editor/Completions" menu found under Geany's edit menu.

[Lua] 
procedure=procedure %cursor%(%cursor%)\n\t%cursor%\nend\sprocedure\n\n%cursor% 
function=function%cursor%%cursor%)\n\t%cursor%\nreturn%cursor%\nend\sfunction\n\n%cursor% 
if=if %cursor% then\n\t%cursor%\nend\sif\n\n%cursor% 
ifdef=ifdef %cursor% then\n\t%cursor%\nend\sifdef\n\n%cursor% 
while=while %cursor% do\n\t%cursor%\nend\swhile\n\n%cursor% 
loop=loop %cursor% do\n\t%cursor%\nend\sloop\n\n%cursor% 
for=for %cursor% =  %cursor% to %cursor% do\n\t%cursor%\nend\sfor\n\n%cursor% 
switch=switch %cursor% do\n\t%cursor%\nend\sswitch\n\n%cursor% 
type=type %cursor%(%cursor%)\n\treturn %cursor%\nend\stype\n\n%cursor% 

Once the initial "word" of one of the statements has been completed, pressing the tab key will complete the insertion of the code snippet.

Typing "procedure"+tab inserts the code snippet as follows:

procedure *(*) 
    * 
end procedure 
 
* 
-- the first asterisk after procedure represents the initial placement of  
-- the cursor upon insertion of the code snippet. By pressing <alt>t the  
-- cursor advances to the next cursor position. The configurable keyboard 
-- short cut is assigned to "move cursor in snippet" in the Keybindings  
-- section of the Preference menu. 
 
function *(*) 
    * 
return * 
end function 
 
* 
-- and so on. Of course you do not have to set all the cursor position 
-- markers. I like finishing up with the cursor positioned a couple of 
-- spaces below the end of the last word of the statement. One is enough 
-- though.  
 
-- without cursor placement markers, this is what is produced by the rest 
-- of the code snippets. 
 
ifdef  then 
 
end ifdef 
 
while  do 
 
end while 
 
loop  do 
 
end loop 
 
for  =   to  do 
 
end for 
  
new topic     » goto parent     » topic index » view message » categorize

20. filetypes.lua edited to support Euphoria

Well, I have learned a bit since my last few posts. One, the filetypes.language file which you choose to edit to support Euphoria does not have to reside in /usr/share/geany/ so root or superuser privileges are not required. Two, the filetypes.language files are extremely sensitive. I edited the filetypes.lua file which I was using with instructions contained in comments and uploaded the file to the RDS User Contributions page. After I upgraded from Geany 20 to Geany 20.1, I downloaded the file and was never able to get it to work properly.

Suffice it to say, you can copy the particular language filetypes file which you wish to use to /home/.config/geany/fildefs and edit it to support Euphoria. My current set up is as follows, using /home/.config/geany/filedefs/filetypes.lua:

# For complete documentation of this file, please see Geany's main documentation 
 
[styling] 
# foreground;background;bold;italic 
default=0x000000;0xffffff;false;false 
comment=0xd00000;0xffffff;false;false 
commentline=0xd00000;0xffffff;false;false 
commentdoc=0x3f5fbf;0xffffff;true;false 
number=0x007f00;0xffffff;false;false 
word=0x00007f;0xffffff;true;false 
string=0xff901e;0xffffff;false;false 
character=0x008000;0xffffff;false;false 
literalstring=0x008020;0xffffff;false;false 
preprocessor=0x007f7f;0xffffff;false;false 
operator=0x301010;0xffffff;false;false 
identifier=0x000000;0xffffff;false;false 
stringeol=0x000000;0xe0c0e0;false;false 
keywords=0x0000FF;0xffffff;true;false 
function_basic=0x991111;0xffffff;false;false 
function_other=0xA52A2A;0xffffff;false;false 
 
[keywords] 
# all items must be in one line 
#keywords=and break do else elseif end false for function if in local nil not or repeat return then true until while 
keywords=and as break by case constant continue do else elsedef elsif elsifdef end entry export fallthru for function global goto if ifdef include label loop namespace not or override procedure public retry return routine switch then to type until while with without xor 
# Basic functions 
function_basic=? abort and_bits append arctan atom c_func c_proc call call_func call_proc clear_screen close command_line compare cos date delete delete_routine equal find floor get_key getc getenv gets hash head include_paths insert integerlength log machine_func machine_proc match mem_copy mem_set not_bits object open option_switches or_bits peek peek2s peek2u peek4s peek4u peek_string peeks pixel platform poke poke2 poke4 position power prepend print printf puts rand remainder remove repeat replace routine_id sequence sin splice sprintf sqrt system system_exec tail tan task_clock_start task_clock_stop task_create task_list task_schedule task_self task_status task_suspend task_yield time trace xor_bits 
function_other=check_free_list db_close db_compress db_create db_create_table db_delete_record db_delete_table db_dump db_fatal_id db_find_key db_insert DB_LOCK_NO DB_OK db_open db_record_data db_record_key db_rename_table db_replace_data db_select db_select_table db_table_list db_table_size 
 
[settings] 
# default extension used when saving files 
extension=ex 
 
# if only single comment char is supported like # in this file, leave comment_close blank 
comment_open=-- 
comment_close= 
# this is an alternative way, so multiline comments are used 
#comment_open=/* 
#comment_close=*/ 
 
# set to false if a comment character/string should start at column 0 of a line, true uses any 
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d 
	#command_example(); 
# setting to false would generate this 
#	command_example(); 
# This setting works only for single line comments 
comment_use_indent=true 
 
# context action command (please see Geany's main documentation for details) 
context_action_cmd=epiphany http://openeuphoria.org/search/results.wc?manual=1&s="%s" 
 
[build_settings] 
# %f will be replaced by the complete filename 
# %e will be replaced by the filename without extension 
# (use only one of it at one time) 
 
[build-menu] 
EX_00_LB=Run Source File with Euphoria Interpreter 
EX_00_CM=\seui ./%f 
EX_00_WD= 
FT_00_LB=Translate source to C code & Compile 
FT_00_CM=euc "%e" 
FT_00_WD= 
FT_01_LB=Bind source code with interpreter 
FT_01_CM=eubind "%e" 
FT_01_WD= 
FT_02_LB=Gather files into Eudist directory 
FT_02_CM=eudist "%f" 
FT_02_WD= 
EX_01_LB=Execute Compiled or Bound Code File 
EX_01_CM=\s./%e 
EX_01_WD= 
 

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

Search



Quick Links

User menu

Not signed in.

Misc Menu