1. Now is the time to give Geany a try!
- Posted by K_D_R Feb 04, 2013
- 2450 views
I have uploaded an upgraded Geany support file, as well as the latest version of EuHelp, to the RDS user contributions page: http://www.rapideuphoria.com/contrib.htm. ( Keep an eye on the page, it should show up there soon! )
If you like GUI editors, you'll love Geany! It is configurable seven ways to sundown and provides an IDE, projects, programmable "code snippets": http://openeuphoria.org/forum/m/116804.wc, Context Sensitive Help for Euphoria 4.1, and much, much more. You can even select auto-complete for "symbols" - functions, procedures, constants, etc., defined earlier in the current document, and/or in any document currently open!
I dare say that Geany is available in your favorite Linux Distro's package management system, but you can also download and compile yourself from: http://www.geany.org/Download/Releases, where Windows users can also find a version of Geany for their platform.
WOW!
Ken Rhodes
2. Re: Now is the time to give Geany a try!
- Posted by euphoric (admin) Feb 05, 2013
- 2353 views
I have uploaded an upgraded Geany support file, as well as the latest version of EuHelp, to the RDS user contributions page: http://www.rapideuphoria.com/contrib.htm. ( Keep an eye on the page, it should show up there soon! )
What do I do with the help files you provided?
Also, what do I do with filetypes.lua? Do I completely replace the current filetypes.lua file with yours, or add/append yours to the current filetypes.lua?
If you like GUI editors, you'll love Geany! It is configurable seven ways to sundown and provides an IDE, projects, programmable "code snippets": http://openeuphoria.org/forum/m/116804.wc, Context Sensitive Help for Euphoria 4.1, and much, much more. You can even select auto-complete for "symbols" - functions, procedures, constants, etc., defined earlier in the current document, and/or in any document currently open!
Sounds awesome! But I smirked when its "Open File" dialog couldn't follow a short cut link on my desktop. tsk tsk.
I dare say that Geany is available in your favorite Linux Distro's package management system, but you can also download and compile yourself from: http://www.geany.org/Download/Releases, where Windows users can also find a version of Geany for their platform.
Thank you! I've been looking for a replacement for Crimson Editor... It's showing its age.
EDIT: Oops. Just read the description. "Docs in file." I'll be back?!
3. Re: Now is the time to give Geany a try!
- Posted by euphoric (admin) Feb 05, 2013
- 2272 views
OK, Geany refuses to colorfy my Euphoria source. Can I get a step-by-step?
Thanks!
4. Re: Now is the time to give Geany a try!
- Posted by K_D_R Feb 05, 2013
- 2291 views
- Last edited Feb 06, 2013
OK, Geany refuses to colorfy my Euphoria source. Can I get a step-by-step?
Thanks
Are you using Geany under Linux or Windows?
Under Linux:
- Edit the file type extensions for Lua in filetype_extensions.conf, located in the directory,
~/.config/geany/filetype_extensions.conf
Substitue Euphoria file extensions for those assigned to Lua, like so:
Lua=*.e;*.edx;*.eu;*.exu;*.exw;*.ex;
- Backup the file, filetypes.lua, located in the hidden directory
~/.config/geany/filedefs/filetypes.lua
- Copy the Euphoria version of filetypes.lua to
~/.config/geany/filedefs/filetypes.lua
- From the Geany menu, Tools, click on Reload Configuration.
As I recall, there must be no extra spaces at the end of lines in the configuration files. Geany also has a menu selection under the Document heading to Strip trailing spaces.
Hope this helps.
Edit: fixed your formatting because it was breaking the page. -Greg
5. Re: Now is the time to give Geany a try!
- Posted by euphoric (admin) Feb 06, 2013
- 2242 views
Are you using Geany under Linux or Windows?
Windows.
I'll try to get it fixed up again later today.
Thank you!
6. Re: Now is the time to give Geany a try!
- Posted by euphoric (admin) Feb 06, 2013
- 2229 views
Substitue Euphoria file extensions for those assigned to Lua, like so:
Lua=*.e;*.edx;*.eu;*.exu;*.exw;*.ex;
Why don't you create a whole new Euphoria entry (Euphoria=...) and use filetypes.exw instead of piggy-backing on Lua?
7. Re: Now is the time to give Geany a try!
- Posted by K_D_R Feb 06, 2013
- 2217 views
As I recall my efforts to create a specific Euphoria entry either didn't work well, or failed completely. I think Irv Mullins may have had a similar experience. Indeed, it was Irv's comments about using the Lua filetype and extensions that motivated me to look closer at Geany. Irv provides the two filetypes.lua and filetype_extensions.conf, also edited to support Euphoria.
I am very interested in your experience with Geany under Windows. Please keep me posted.
Substitue Euphoria file extensions for those assigned to Lua, like so:
Lua=*.e;*.edx;*.eu;*.exu;*.exw;*.ex;
Why don't you create a whole new Euphoria entry (Euphoria=...) and use filetypes.exw instead of piggy-backing on Lua?
8. Re: Now is the time to give Geany a try!
- Posted by euphoric (admin) Feb 06, 2013
- 2264 views
As I recall my efforts to create a specific Euphoria entry either didn't work well, or failed completely.
Doesn't seem very smart to set up your expansion-ability like that... having to modify a *.h file?!
Anyway, that's what I found after a brief looksee, so cheating with the *.lua stuff seems to definitely be the way to go.
Edit: This is not true, at least for Windows installations. I'm not having to replace the *lua references.
9. Re: Now is the time to give Geany a try!
- Posted by euphoric (admin) Feb 06, 2013
- 2190 views
I am very interested in your experience with Geany under Windows. Please keep me posted.
Progress, here! WE HAVE PROGRESS!
OK, my Geany for Windows proggie is coloring comments, strings, func/proc/end, if/else/not/and, and naked numbers.
Other keywords are not being highlighted, however.
On Windows, you have to put the customized stuff in the user's AppData folder, NOT in the programs installed folder (where the default files reside).
I'm also able to use a filetype.Euphoria and Euphoria=*.e;... paradigm, not having to replace Lua. Which is good, since I'll probably continue doing Lua development as well.
I hope that's clear.
10. Re: Now is the time to give Geany a try!
- Posted by K_D_R Feb 06, 2013
- 2211 views
I am very interested in your experience with Geany under Windows. Please keep me posted.
Progress, here! WE HAVE PROGRESS!
OK, my Geany for Windows proggie is coloring comments, strings, func/proc/end, if/else/not/and, and naked numbers.
Other keywords are not being highlighted, however.
On Windows, you have to put the customized stuff in the user's AppData folder, NOT in the programs installed folder (where the default files reside).
I'm also able to use a filetype.Euphoria and Euphoria=*.e;... paradigm, not having to replace Lua. Which is good, since I'll probably continue doing Lua development as well.
I hope that's clear.
I am surprised that you have any highlighting at all using a filetype.Euphoria, considering this statement in the reference you provided: "You can add a filetype without syntax highlighting or tag parsing, but check to see if those features have been written in other projects first."
But I wonder how difficult it would be for a C-programmer to cobble together full Euphoria Support by editing the Lua support files. Under Linux the only Geany feature that doesn't seem to work properly is code folding.
This is interesting: " It may be possible to use an existing Scintilla lexer in the scintilla/ subdirectory - if not, you will need to find (or write) one, LexFoo.cxx. Try the official Scintilla project first." Perhaps something in Mike Duffy's Scintilla Edit Control files can be used? http://rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=scintilla
11. Re: Now is the time to give Geany a try!
- Posted by euphoric (admin) Feb 06, 2013
- 2262 views
I am surprised that you have any highlighting at all using a filetype.Euphoria, considering this statement in the reference you provided: "You can add a filetype without syntax highlighting or tag parsing, but check to see if those features have been written in other projects first."
I know. I am surprised too. But they apparently did it somewhat right in allowing new definitions to be supported with definition files and not have to be built-in.
This is interesting: " It may be possible to use an existing Scintilla lexer in the scintilla/ subdirectory - if not, you will need to find (or write) one, LexFoo.cxx. Try the official Scintilla project first." Perhaps something in Mike Duffy's Scintilla Edit Control files can be used? http://rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=scintilla
I might try the Scintilla files here shortly. From what I understand, they will work without modification with Geany?
12. Re: Now is the time to give Geany a try!
- Posted by K_D_R Feb 06, 2013
- 2203 views
I might try the Scintilla files here shortly. From what I understand, they will work without modification with Geany?
I haven't a clue.
13. Re: Now is the time to give Geany a try!
- Posted by euphoric (admin) Feb 06, 2013
- 2193 views
I am surprised that you have any highlighting at all using a filetype.Euphoria...
I came back later to modify the same file and now there is no syntax highlighting. LOL.
I give up on Geany.
14. Re: Now is the time to give Geany a try!
- Posted by K_D_R Feb 06, 2013
- 2148 views
I am surprised that you have any highlighting at all using a filetype.Euphoria...
I came back later to modify the same file and now there is no syntax highlighting. LOL.
I give up on Geany.
I do understand your frustration, but consider this - if you are about to give up on Geany, then you might as well as try using the euphoria enabled enabled filetypes.lua file and the filetype_extensions.conf file with the Euphoria extensions assigned to lua. No need to throw the baby out with the bath water.
But, I do understand your frustrations...
15. Re: Now is the time to give Geany a try!
- Posted by jimcbrown (admin) Feb 06, 2013
- 2207 views
I am surprised that you have any highlighting at all using a filetype.Euphoria...
I came back later to modify the same file and now there is no syntax highlighting. LOL.
I give up on Geany.
I do understand your frustration, but consider this - if you are about to give up on Geany, then you might as well as try using the euphoria enabled enabled filetypes.lua file and the filetype_extensions.conf file with the Euphoria extensions assigned to lua. No need to throw the baby out with the bath water.
But, I do understand your frustrations...
You might even be able to get away with copying the euphoria enabled filestypes.lua over some other Geany supported file type (filestypes.c ? filetypes.basic ? filetypes.java ?) and modifying the appropriate language entry in filetype_extensions.conf - then you could have syntax hilighting for both Lua and Euphoria in Geany.
16. Re: Now is the time to give Geany a try!
- Posted by euphoric (admin) Feb 06, 2013
- 2209 views
...you might as well as try using the euphoria enabled enabled filetypes.lua file and the filetype_extensions.conf file with the Euphoria extensions assigned to lua.
I think I tried that, and the success from that was residual when I tried using the *.Euphoria definitions.
I will try it again (and do what Jim said, instead of replacing a Lua def, replace something else), although Notepad++ has now caught my eye. And I'm still trying to get Edita to work.
Thanks, Ken!
17. Geany: Swapping support for Euphoria/Lua
- Posted by K_D_R Feb 13, 2013
- 2164 views
This little utility program allows switching back and forth between the original files which support lua and the lua files which have been edited to support euphoria.
The euphoria support files will be snippets.euphoria, filetypes.euphoria, and filetype_extensions.euphoria. A program called gny.ex can easily be executed from Geany's Terminal Window "Pane". The program accepts three command line switches - "i", "l", or "e": "i" will backup the original lua enabled files and install the new euphoria enabled files. The backup-installation option should be executed only once. Subsequently, the user may select euphoria support by executing "eui gny.ex e" or "eui gny.ex l" to select the original lua enabled support files. After switching filetype support the user should select "Reload Configuration" from the Tools menu.
Any suggestions for improvement will be greatly appreciated.
-- -- -- Gny.ex, a program to automate Geany editor support for euphoria -- by swapping Lua/Euphoria filetypes at will -- -- include std/filesys.e include std/console.e include std/io.e include std/text.e constant BACKUP_INSTALL = 1 -- <<<------ change to 0 after initial install/backup -- the backup_install routine should only be executed once! -- edit paths to your directories containing: constant FILEDEF_DIR = "/home/ken/.config/geany/filedefs/" -- filetypes.lua constant FILETYPE_EXT_DIR = "/home/ken/.config/geany/" -- filetype_extensions.conf" constant SNIPPETS_DIR = "/home/ken/.config/geany/" -- snippets.conf -- backup original lua files and install euphoria support files -- copy filetypes.lua to filetypes.lua~ -- copy filetype_extensions.lua to filetype_extensions.conf~ -- copy snippets.conf to snippets.conf~ -- "l" for lua support -- "e" for euphoria support -- "i" to initialize backup origninal files procedure gny(sequence cl) -- lua if equal(cl, "l") then -- restore/install original files with support for the lua programing language. -- the current files will be overwritten: if copy_file( FILEDEF_DIR & "filetypes.lua~", FILEDEF_DIR & "filetypes.lua", 1) then puts(SCREEN, "\n\tfiletype support for the language lua restored!\n\t") else puts(SCREEN, "\n\t Failed to restore the original filetypes.lua file!\n\t") end if any_key() if copy_file( FILETYPE_EXT_DIR & "filetype_extensions.lua~", FILETYPE_EXT_DIR & "filetype_extensions.conf", 1) then puts(SCREEN, "\n\tfiletype_extensions.conf now supports the lua programming language!\n\t") else puts(SCREEN, "\n\t Failed to restore filetype_extensions.conf file!\n\t") end if any_key() if copy_file( SNIPPETS_DIR & "snippets.lua~", SNIPPETS_DIR & "snippets.conf", 1) then puts(SCREEN, "\n\tsnippets.conf now supports the lua programming language!\n\t") else puts(SCREEN, "\n\t Failed to restore the original snippets.conf file with lua support!\n\t") end if any_key() -- euphoria elsif equal(cl,"e") then -- restore/install euphoria support files: overwrite the current files: if copy_file( FILEDEF_DIR & "filetypes.euphoria~", FILEDEF_DIR & "filetypes.lua", 1) then puts(SCREEN, "\n\tfiletypes.lua now supports the Euphoria Programming Language!\n\t") else puts(SCREEN, "\n\tFAILED to install filetypes.lua, " & "\n\t with support for the Euphoria Programming Language\n\t") end if any_key() if copy_file( FILETYPE_EXT_DIR & "filetype_extensions.euphoria~", FILETYPE_EXT_DIR & "filetype_extensions.conf", 1) then puts(SCREEN, "\n\tfiletype_extensions.conf now supports the Euphoria Programming Language!\n\t") else puts(SCREEN, "\n\tFAILED to install filetypes.lua, " & "\n\t with support for the Euphoria Programming Language\n\t") end if any_key() if copy_file(SNIPPETS_DIR & "snippets.euphoria~", SNIPPETS_DIR & "snippets.conf", 1) then puts(SCREEN, "\n\tsnippets.conf now supports the Euphoria Programming Language!\n\t") else puts(SCREEN, "\n\tFAILED to install snippets.conf, " & "\n\t with support for the Euphoria Programming Language\n\t") end if any_key() elsif equal(cl,"i") then if BACKUP_INSTALL then -- backup the original files which support the lua programming language: -- backup original filetypes.lua file to filetypes.lua~ if copy_file( FILEDEF_DIR & "filetypes.lua", FILEDEF_DIR & "~", 0) then puts(SCREEN, "\n\tfiletypes.lua backed up as filetypes.lua~\n\t") else puts(SCREEN, "\n\tfiletypes.lua back up as filetypes.lua~ FAILED!\n\t") end if any_key() -- backup original filetype_extensions.conf to filetype_extensions.conf~ if copy_file( FILETYPE_EXT_DIR & "filetype_extensions.conf", FILETYPE_EXT_DIR & "filetype_extensions.lua~", 0) then puts(SCREEN, "\n\n\tfiletype_extensions.conf backed up as filetype_extensions.lua~\n\t") else puts(SCREEN, "\n\tfiletype_extensions.conf back up as filetype_extensions.lua~ FAILED\n\t") end if any_key() -- backup original "snippets.conf" to "snippets.conf~" if copy_file( SNIPPETS_DIR & "snippets.conf", SNIPPETS_DIR & "snippets.lua~", 0) then puts(SCREEN, "\n\n\tsnippets.conf backed up as snippets.conf.~\n\t") else puts(SCREEN, "\n\tFAILED to back up file snippets.conf as snippets.lua~ FAILED\n\t") end if any_key() -- now, install euphoria support files: -- copy filetypes.euphoria as filetypes.euphoria~ if copy_file( "filetypes.euphoria", FILEDEF_DIR & "filetypes.euphoria~", 0) then puts(SCREEN, "\n\tfiletypes.euphoria installed as filetypes.euphoria~\n\t") else puts(SCREEN, "\n\tFAILED to install filetypes.euphoria~!\n\t") end if any_key() -- copy "filetype_extensions.euphoria" to "filetype_extensions.euphoria~" if copy_file( "filetype_extensions.euphoria", FILETYPE_EXT_DIR & "filetype_extensions.euphoria~", 0) then puts(SCREEN, "\n\n\tfiletype_extensions.euphoria installed as filetype_extensions.euphoria~\n\t") else puts(SCREEN, "\n\tFAILED to install back filetype_extensions.euphoria~ FAILED\n\t") end if any_key() -- copy "snippets.euphoria" to "snippets.euphoria~" if copy_file( "snippets.euphoria", SNIPPETS_DIR & "snippets.euphoria~", 0) then puts(SCREEN, "\n\n\tsnippets.euphoria installed as snippets.euphoria~") else puts(SCREEN, "\n\tFAILED to install snippets.euphoria~ FAILED\n\t") end if any_key() end if end if end procedure integer MENU = 1 integer n sequence options = { "i", "e", "l", "q" } object cl = command_line() if length(cl)<3 then puts(1,"\n\tEnter \"i\" - initial backup/install. ONLY EXECUTE ONCE!") puts(1,"\n\tEnter \"e\" - install euphoria support ( as lua )") puts(1,"\n\tEnter \"l\" - install/restore original lua support files") puts(1,"\n\tEnter \"q\" - exit\n\t") while MENU do n = get_key() if find(n, { 113, 108, 105, 101 }) then MENU = 0 end if end while if n = 113 then abort(1) elsif n = 108 then cl = "l" elsif n = 101 then cl = "e" elsif n = 105 then cl = "i" end if else cl=cl[3] for i = 1 to length(options) do if find(options[i], cl) then gny(options[i]) end if end for cl = lower(cl) end if gny(cl)
18. EuGeany: Swapping support for Euphoria/Lua
- Posted by K_D_R Feb 23, 2013
- 2012 views
I have posted my latest version of Geany support files and utility programs on the RDS User contribution page: http://www.rapideuphoria.com/eugeany.tar.gz . The Context Sensitive Help Program EuHelp is included with the support files, together with a utility program called "gny.ex", which is used to backup the original lua support files and restore them, if desired. A "euphoria enabled" snippets file is also included.
All the support files and utility programs are contained in the directory "EuGeany". Once you decompress the EuGeany folder, all you have to do is run the program gny.ex to install and set the system up so you can swap lua/euphoria support whenever you wish.
IMPORTANT: you will need to edit the constants which reference FILEDEF_DIR, FILETYPE_EXT_DIR, and SNIPPETS_DIR before running gny.ex! The latest version of gny.ex is included below, but everything you need is contained in the EuGeany download files.
Gny.ex is set up to translate/compile EuHelp.ex and gny.ex and then copy those programs to EUDIR/bin/ by default, but you can install those programs manually by setting the value of the constant COMPILE_INSTALL_EUHELP_GNY to FALSE. The path to EUDIR is set without using an environment variable
Comments, suggestions for improvements, etc. will be appreciated.
-- -- gny.ex -- A program to automate Geany editor support for euphoria. -- Configuration files for the programming language lua are used to support euphoria. -- Lua or Euphoria file support can be swapped at will by executing this program -- from Geany's Terminal interface, as described below. -- -- IMPORTANT: before running this program, you must edit the three constants: -- to reference the respective directories as illustrated below: -- FILEDEF_DIR -- FILETYPE_EXT_DIR -- SNIPPETS_DIR -- -- usage:-- FILEDEF_DIR -- FILETYPE_EXT_DIR -- SNIPPETS_DIR -- eui gny.ex i to initialize & backup origninal files -- eui gny.ex l to enable support for lua -- eui gny.ex e to enable support for euphoria -- This program (gny.ex) will automatically compile and install itself EUDIR/bin/, -- if the COMPILE_INSTALL_EUHELP_GNY constant is set to TRUE. include std/filesys.e include std/console.e include std/io.e include std/text.e include EuDir.e -- provides the path to the directory "euphoria" assigned to the -- public constant, EUDIR, without using an environment variable, as suggested by -- SDPRINGLE integer TRUE = 1, FALSE = 0 constant BACKUP_INSTALL = TRUE -- <<<------ change to FALSE after initial install/backup -- the backup_install routine should only be executed once! constant COMPILE_INSTALL_EUHELP_GNY = TRUE -- EuHelp.ex & gny.ex will be translated to C-code -- compiled and the EuHelp and gny binaries will be copied to EUDIR/bin or EUDIR\bin. -- Insert [EuHelp.ex %s] Geany's Preferences/Tools/Commands/Context action box and -- assign a key and you will have context sensitive help available for std library functions -- at the press of a key. From Geany's Terminal, execute gny with the commandline option i -- to install the original lua files or install euphoria support files. -- -- The original lua support files will remain in effect until you execute "gny e" which will select your -- euphoria support enabled files in the place of the original files which support the lua language. -- File support for euphoria will remain in effect until you restore support for lua -- by executing "gny l" from Geany's Terminal window. -- edit paths to your directories containing: constant FILEDEF_DIR = "/home/ken/.config/geany/filedefs/" -- filetypes.lua constant FILETYPE_EXT_DIR = "/home/ken/.config/geany/" -- filetype_extensions.conf" constant SNIPPETS_DIR = "/home/ken/.config/geany/" -- snippets.conf constant EUBIN = EUDIR & "bin" & SLASH procedure gny(object cl) -- lua if equal(cl, "l") then -- restore original files with support for the lua programing language. -- the current files will be overwritten: if copy_file( FILEDEF_DIR & "filetypes.lua~", FILEDEF_DIR & "filetypes.lua", 1) then puts(SCREEN, "\n\tfiletypes.lua now supports the lua programming language!\n\t") else puts(SCREEN, "\n\t Failed to restore the original filetypes.lua file!\n\t") end if any_key() if copy_file( FILETYPE_EXT_DIR & "filetype_extensions.lua~", FILETYPE_EXT_DIR & "filetype_extensions.conf", 1) then puts(SCREEN, "\n\tfiletype_extensions.conf now supports the lua programming language!\n\t") else puts(SCREEN, "\n\t Failed to restore filetype_extensions.conf file!\n\t") end if any_key() if copy_file( SNIPPETS_DIR & "snippets.lua~", SNIPPETS_DIR & "snippets.conf", 1) then puts(SCREEN, "\n\tsnippets.conf now supports the lua programming language!\n\t") else puts(SCREEN, "\n\t Failed to restore the original snippets.conf file with lua support!\n\t") end if any_key() -- euphoria elsif equal(cl,"e") then -- restore/install euphoria support files by overwriting the current files wich support -- the lua programming language with the files edited to support the euphoria programming language: if copy_file( FILEDEF_DIR & "filetypes.euphoria~", FILEDEF_DIR & "filetypes.lua", 1) then puts(SCREEN, "\n\tfiletypes.lua now supports the Euphoria Programming Language!\n\t") else puts(SCREEN, "\n\tFAILED to install filetypes.lua, " & "\n\t with support for the Euphoria Programming Language\n\t") end if any_key() if copy_file( FILETYPE_EXT_DIR & "filetype_extensions.euphoria~", FILETYPE_EXT_DIR & "filetype_extensions.conf", 1) then puts(SCREEN, "\n\tfiletype_extensions.conf now supports the Euphoria Programming Language!\n\t") else puts(SCREEN, "\n\tFAILED to install filetypes.lua, " & "\n\t with support for the Euphoria Programming Language\n\t") end if any_key() if copy_file(SNIPPETS_DIR & "snippets.euphoria~", SNIPPETS_DIR & "snippets.conf", 1) then puts(SCREEN, "\n\tsnippets.conf now supports the Euphoria Programming Language!\n\t") else puts(SCREEN, "\n\tFAILED to install snippets.conf, " & "\n\t with support for the Euphoria Programming Language\n\t") end if any_key() elsif equal(cl,"i") then -- backup original lua files and install euphoria support files -- copy filetypes.lua to filetypes.lua~ -- copy filetype_extensions.lua to filetype_extensions.lua~ -- copy snippets.conf to snippets.lua~ if BACKUP_INSTALL then -- backup the original files which support the lua programming language: -- backup/copy original filetypes.lua file to filetypes.lua~ if copy_file( FILEDEF_DIR & "filetypes.lua", FILEDEF_DIR & "~", 1) then puts(SCREEN, "\n\tfiletypes.lua backed up as filetypes.lua~\n\t") else puts(SCREEN, "\n\tfiletypes.lua back up as filetypes.lua~ FAILED!\n\t") end if any_key() -- backup/copy original filetype_extensions.conf to filetype_extensions.lua~ if copy_file( FILETYPE_EXT_DIR & "filetype_extensions.conf", FILETYPE_EXT_DIR & "filetype_extensions.lua~", 1) then puts(SCREEN, "\n\n\tfiletype_extensions.conf backed up as filetype_extensions.lua~\n\t") else puts(SCREEN, "\n\tfiletype_extensions.conf back up as filetype_extensions.lua~ FAILED\n\t") end if any_key() -- backup/copy original "snippets.conf" to "snippets.lua~" if copy_file( SNIPPETS_DIR & "snippets.conf", SNIPPETS_DIR & "snippets.lua~", 1) then puts(SCREEN, "\n\n\tsnippets.conf backed up as snippets.lua.~\n\t") else puts(SCREEN, "\n\tFAILED to back up file snippets.conf as snippets.lua~ FAILED\n\t") end if any_key() -- now, install euphoria support files: -- copy filetypes.euphoria to filetypes.euphoria~ if copy_file( "filetypes.euphoria", FILEDEF_DIR & "filetypes.euphoria~", 1) then puts(SCREEN, "\n\tfiletypes.euphoria installed to:") puts(SCREEN, "\n\t" & FILEDEF_DIR & "filetypes.euphoria~\n\t") else puts(SCREEN, "\n\tFAILED to install filetypes.euphoria~ to:") puts(SCREEN, "\n\t" & FILEDEF_DIR & "filetypes.euphoria~\n\t") end if any_key() -- copy "filetype_extensions.euphoria" to "filetype_extensions.euphoria~" if copy_file( "filetype_extensions.euphoria", FILETYPE_EXT_DIR & "filetype_extensions.euphoria~", 1) then puts(SCREEN, "\n\n\tfiletype_extensions.euphoria installed to:") puts(SCREEN, "\n\t" & FILETYPE_EXT_DIR & "filetype_extensions.euphoria~\n\t") else puts(SCREEN, "\n\tFAILED to install filetype_extensions.euphoria~ to:") puts(SCREEN, "\n\t" & FILETYPE_EXT_DIR & "filetype_extensions.euphoria~\n\t") end if any_key() -- copy "snippets.euphoria" to "snippets.euphoria~" if copy_file( "snippets.euphoria", SNIPPETS_DIR & "snippets.euphoria~", 1) then puts(SCREEN, "\n\n\tsnippets.euphoria installed to:") puts(SCREEN, "\n\t" & SNIPPETS_DIR & "snippets.euphoria~\n\t") else puts(SCREEN, "\n\tFAILED to install snippets.euphoria~ FAILED\n\t") end if any_key() -- compile EuHelp.ex and gny.ex and copy to EUDIR/bin/ if COMPILE_INSTALL_EUHELP_GNY then system("euc gny.ex", 1) if copy_file("gny", EUBIN & "gny",1) then puts(SCREEN, "\n\tgny.ex copied to " & EUBIN & "gny\n") else puts(SCREEN, "Failed to copy gny to " & EUBIN) end if system("euc EuHelp.ex", 1) if copy_file("EuHelp", EUBIN & "EuHelp\n",1) then puts(SCREEN, "\n\tEuHelp copied to " & EUBIN & "EuHelp") else puts(SCREEN, "Failed to copy EuHelp to " & EUBIN) end if end if end if end if end procedure integer MENU = TRUE sequence options = { "i", "e", "l", "q" } object cl = command_line() if length(cl)<3 then puts(1,"\n\tEnter \"i\" - initial backup/install. ONLY EXECUTE ONCE!") puts(1,"\n\tEnter \"e\" - install euphoria support ( as lua )") puts(1,"\n\tEnter \"l\" - install/restore original lua support files") puts(1,"\n\tEnter \"q\" - exit\n\t") while MENU do cl = prompt_string("\n\t") cl = lower(cl) if find(cl, options) then MENU = FALSE if equal(cl,"q") then abort(1) end if end if end while else cl=cl[3] cl = lower(cl) end if gny(cl)
19. SUCCESS: filetypes.Euphoria.conf version 1.0
- Posted by K_D_R Feb 24, 2013
- 1967 views
Good news! Incorporating suggestions from the Geany mailing list, we now have syntax color support for Euphoria, selectable from Geany's menu: /document/Set Filetypes/Scripting Languages/Euphoria source code.
- Copy your version of filetypes.lua which has been edited to support euphoria to: /.config/geany/filedefs/filetypes.Euphoria.conf (If you have downloaded the EuGeany help files from the rds site, you can just rename the file, filetypes.euphoria to filetypes.Euphoria.conf)
- If you like, you can "inherit" lua styling simply by replacing the whole [styling] section with styling=Lua
- Add the assignments of lexer_filetype=Lua and tag_parser=Lua to the section [settings]
[settings] # default extension used when saving files extension=ex lexer_filetype=Lua tag_parser=Lua
- Backup /.config/geany/filetype_extensions.conf and then edit the file as follows:
- In the section [extensions], insert the following assignment of "extensions" for Euphoria:
Euphoria=*.e;*.eu;*.exu;*.exw;*.ex;
- At the end of the file, in the section [Groups], assign Euphoria to Script:
Script=Euphoria;
- edit the file /.config/geany/snippets.conf by inserting the following section
[Euphoria] 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%
Restart all instances of Geany.
Regards, Ken Rhodes
20. Geany: global tags std.euphoria-4.1.e.tags (pipe separated format)
- Posted by K_D_R Feb 24, 2013
- 1959 views
Save the following file in /.config/geany/tags/std.euphoria-4.1.e.tags
After you load the file from the tools menu, you will be able to auto-complete a word by selecting from a pop-up pick list, if you have enabled completions in the preferences menu.
# format=pipe ADDRESS_LENGTH||| A_READ||| BAD_FILE||| BAD_RECNO||| BAD_SEEK||| BLINKING||| BYTES_PER_CHAR||| CMD_SWITCHES||| CONNECTION||| CONNECT_FREE||| CONNECT_LOCK||| CONNECT_TABLE||| DB_BAD_NAME||| DB_EXISTS_ALREADY||| DB_FATAL_FAIL||| DB_LOCK_EXCLUSIVE||| DB_LOCK_FAIL||| DB_LOCK_NO||| DB_LOCK_READ_ONLY||| DB_LOCK_SHARED||| DB_OK||| DB_OPEN_FAIL||| DEP_on||| DISCONNECT||| DOS32||| DUP_TABLE||| EOF||| EOL||| EOLSEP||| ERR_ACCESS||| ERR_ADDRINUSE||| ERR_ADDRNOTAVAIL||| ERR_AFNOSUPPORT||| ERR_AGAIN||| ERR_ALREADY||| ERR_CONNABORTED||| ERR_CONNREFUSED||| ERR_CONNRESET||| ERR_DESTADDRREQ||| ERR_FAULT||| ERR_HOSTUNREACH||| ERR_INPROGRESS||| ERR_INTR||| ERR_INVAL||| ERR_IO||| ERR_ISCONN||| ERR_ISDIR||| ERR_LOOP||| ERR_MFILE||| ERR_MSGSIZE||| ERR_NAMETOOLONG||| ERR_NETDOWN||| ERR_NETRESET||| ERR_NETUNREACH||| ERR_NFILE||| ERR_NOBUFS||| ERR_NOENT||| ERR_NOTCONN||| ERR_NOTDIR||| ERR_NOTINITIALISED||| ERR_NOTSOCK||| ERR_OPNOTSUPP||| ERR_PROTONOSUPPORT||| ERR_PROTOTYPE||| ERR_ROFS||| ERR_SHUTDOWN||| ERR_SOCKTNOSUPPORT||| ERR_TIMEDOUT||| ERR_WOULDBLOCK||| IDABORT||| INIT_FREE||| INIT_TABLES||| INSERT_FAILED||| LARGEMAP||| LAST_ERROR_CODE||| LEFT_DOWN||| LEFT_UP||| LOCK_EXCLUSIVE||| LOCK_METHOD||| LOCK_SHARED||| MB_ABORTRETRYIGNORE||| MISSING_END||| MOVE||| NESTED_ANY||| NO_DATABASE||| NO_TABLE||| NULL||| NULLDEVICE||| OK||| PAGE_EXECUTE||| PAGE_EXECUTE_READ||| PAGE_EXECUTE_READWRITE||| PAGE_EXECUTE_WRITECOPY||| PAGE_NOACCESS||| PAGE_NONE||| PAGE_READ||| PAGE_READONLY||| PAGE_READWRITE||| PAGE_READ_EXECUTE||| PAGE_READ_WRITE||| PAGE_READ_WRITE_EXECUTE||| PAGE_SIZE||| PAGE_WRITECOPY||| PAGE_WRITE_COPY||| PAGE_WRITE_EXECUTE_COPY||| PATHSEP||| PI||| RIGHT_DOWN||| RIGHT_UP||| SCREEN||| SEQ_NOALT||| SHARED_LIB_EXT||| SLASH||| SLASHES||| SMALLMAP||| STDERR||| STDFLTR_ALPHA||| STDIN||| STDOUT||| W_BAD_PATH||| abbreviate_path||| abs||| absolute_path||| accept||| add||| add_item||| all_matches||| allocate||| allocate_code||| allocate_data||| allocate_pointer_array||| allocate_protect||| allocate_string||| allocate_string_pointer_array||| allocate_wstring||| allow_break||| ampm||| any_key||| append_lines||| apply||| approx||| arccos||| arccosh||| arcsin||| arcsinh||| arctanh||| assert||| at||| atan2||| atom_to_float32||| atom_to_float64||| attr_to_colors||| begins||| bfind||| binary_search||| bind||| binop_ok||| bits_to_int||| bk_color||| breakup||| build_commandline||| build_list||| byte_range||| bytes_to_int||| calc_hash||| calc_primes||| call_back||| canon2win||| canonical||| canonical_path||| case_flagset_type||| ceil||| chance||| chdir||| check_all_blocks||| check_break||| check_calls||| check_free_list||| checksum||| clear||| clear_directory||| close||| cmd_parse||| color||| colors_to_attr||| columnize||| combine||| compare||| connect||| console_colors||| copy||| copy_file||| cosh||| crash||| crash_file||| crash_message||| crash_routine||| create||| create_directory||| create_file||| curdir||| current_dir||| cursor||| custom_sort||| datetime||| day_abbrs||| day_names||| days_in_month||| days_in_year||| db_cache_clear||| db_clear_table||| db_close||| db_compress||| db_connect||| db_create||| db_create_table||| db_current||| db_current_table||| db_delete_record||| db_delete_table||| db_dump||| db_fatal_id||| db_fetch_record||| db_find_key||| db_get_errors||| db_get_recid||| db_insert||| db_open||| db_record_data||| db_record_key||| db_record_recid||| db_rename_table||| db_replace_data||| db_replace_recid||| db_select||| db_select_table||| db_set_caching||| db_table_list||| db_table_size||| decanonical||| decode||| defaulted_value||| defaultext||| define_c_func||| define_c_proc||| define_c_var||| deg2rad||| delete_file||| deserialize||| diff||| dir||| dir_size||| dirname||| disk_metrics||| disk_size||| display||| display_text_image||| driveid||| dump||| dup||| edges_only||| encode||| ends||| ensure_in_list||| ensure_in_range||| error_code||| error_message||| error_names||| error_no||| error_to_string||| escape||| exec||| exp||| extract||| fetch||| fib||| file_exists||| file_length||| file_number||| file_position||| file_timestamp||| file_type||| filebase||| fileext||| filename||| filter||| find||| find_all||| find_all_but||| find_any||| find_each||| find_nested||| find_replace||| find_replace_callback||| find_replace_limit||| flags_to_string||| flatten||| float32_to_atom||| float64_to_atom||| flush||| for_each||| format||| frac||| free||| free_code||| free_console||| free_pointer_array||| from_date||| from_unix||| gcd||| get||| get_bytes||| get_def_lang||| get_dstring||| get_integer16||| get_integer32||| get_lang_path||| get_lcid||| get_mouse||| get_option||| get_ovector_size||| get_pid||| get_position||| get_rand||| get_screen_char||| get_text||| graphics_mode||| graphics_point||| has||| has_console||| has_match||| hex_text||| iff||| info||| init_curdir||| insertion_sort||| instance||| int_to_bits||| int_to_bytes||| intdiv||| is_DEP_supported||| is_empty||| is_even||| is_even_obj||| is_in_list||| is_in_range||| is_leap_year||| is_match||| is_using_DEP||| is_win_nt||| join||| join_path||| keys||| kill||| lang_load||| larger_of||| last||| lcid||| listen||| load||| load_map||| locale_canonical||| locate_file||| lock_file||| lock_type||| log10||| lookup||| machine_addr||| map||| mapping||| match_all||| match_any||| match_replace||| matches||| max||| maybe_any_key||| merge||| message_box||| mid||| min||| minsize||| mixture||| mod||| money||| month_abbrs||| month_names||| mouse_events||| mouse_pointer||| move_file||| my_dir||| nested_get||| nested_put||| new||| new_extra||| new_from_kvpairs||| new_from_string||| new_time||| next_prime||| now||| now_gmt||| number||| open_dll||| optimize||| option_spec||| option_spec_to_string||| or_all||| pad_head||| pad_tail||| page_aligned_address||| pairs||| parse||| parse_commandline||| patch||| pathinfo||| pathname||| peek_end||| peek_top||| peek_wstring||| pivot||| platform_locale||| poke_string||| poke_wstring||| pop||| positive_int||| posix_names||| powof2||| pretty_print||| prime_list||| process||| process_lines||| product||| project||| prompt_number||| prompt_string||| push||| put||| put_integer16||| put_integer32||| put_screen_char||| rad2deg||| rand_range||| read||| read_bitmap||| read_file||| read_lines||| receive||| receive_from||| regex||| register_block||| rehash||| remove||| remove_all||| remove_directory||| remove_dups||| remove_item||| remove_subseq||| rename_file||| repeat_pattern||| retain_all||| reverse||| rfind||| rmatch||| rnd||| rnd_1||| roll||| rotate||| rotate_bits||| round||| safe_address||| safe_address_list||| sample||| save_bitmap||| save_map||| save_text_image||| scroll||| seek||| select||| send||| send_to||| serialize||| series||| service_by_name||| service_by_port||| set||| set_accumulate_summary||| set_decimal_mark||| set_def_lang||| set_lang_path||| set_option||| set_rand||| set_test_abort||| set_test_verbosity||| set_wait_on_summary||| setenv||| shift_bits||| show_block||| show_help||| shuffle||| shutdown||| sign||| sim_index||| sinh||| size||| sleep||| slice||| smaller_of||| socket||| sort||| sort_columns||| split||| split_any||| split_limit||| split_path||| sprint||| stack||| statistics||| std||| std_library_address||| store||| subtract||| sum||| swap||| tanh||| task_delay||| temp_file||| test_equal||| test_fail||| test_false||| test_not_equal||| test_pass||| test_report||| test_true||| text_color||| text_rows||| threshold||| to_integer||| to_number||| to_string||| to_unix||| top||| transform||| translate||| transmute||| trsprintf||| trunc||| type_of||| uname||| unlock_file||| unregister_block||| unsetenv||| valid_index||| valid_memory_protection_constant||| value||| values||| video_config||| vlookup||| vslice||| w32_name_canonical||| w32_names||| wait_key||| walk_dir||| warning_file||| weeks_day||| where||| which_bit||| wrap||| write||| write_file||| write_lines||| writef||| years_day|||