Hi, folks.
I took a look through the plugin wishlist recently, and it seems to me that a fair number of them could be solved quickly and easily using Lua scripting. Advanced interaction with Geany's chrome is out, but for text wrangling and integration with external tools, Lua scripts are effective, and they're extremely quick and easy to do.
I'm going to upload a 'delete duplicate lines' script to the Geany wiki soon, and then I plan to take a look at jumping to external functions in files that aren't open. FTP integration might be feasible too.
I could use GeanyPy, I suppose, and it's capable of more advanced stuff, but it's not available as a precompiled package, and the build process wanted to install over 100MB of python-dev dependencies...not really keen, nor would I want to impose that burden on end-users. I'll just pick the low-hanging fruit with Lua.
Thrawn
On 5 June 2013 13:19, Thrawn shell_layer-geany@yahoo.com.au wrote:
Hi, folks.
I took a look through the plugin wishlist recently, and it seems to me that a fair number of them could be solved quickly and easily using Lua scripting. Advanced interaction with Geany's chrome is out, but for text wrangling and integration with external tools, Lua scripts are effective, and they're extremely quick and easy to do.
I'm going to upload a 'delete duplicate lines' script to the Geany wiki soon, and then I plan to take a look at jumping to external functions in files that aren't open. FTP integration might be feasible too.
I could use GeanyPy, I suppose, and it's capable of more advanced stuff, but it's not available as a precompiled package, and the build process wanted to install over 100MB of python-dev dependencies...not really keen, nor would I want to impose that burden on end-users. I'll just pick the low-hanging fruit with Lua.
Hi,
Before you get too carried away, are you aware that the Lua plugin is orphaned and will be removed in the next release unless someone becomes maintainer?
Perhaps you should organise that first, if you want to be maintainer yourself then you need reasonable C skills and the time and interest to keep the plugin up to date, for example it currently does not work with GTK3. (I don't know how much is involved in that).
Cheers Lex
Thrawn _______________________________________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
On 5 June 2013 14:34, Lex Trotman elextr@gmail.com wrote:
On 5 June 2013 13:19, Thrawn shell_layer-geany@yahoo.com.au wrote:
Hi, folks.
I took a look through the plugin wishlist recently, and it seems to me that a fair number of them could be solved quickly and easily using Lua scripting. Advanced interaction with Geany's chrome is out, but for text wrangling and integration with external tools, Lua scripts are effective, and they're extremely quick and easy to do.
I'm going to upload a 'delete duplicate lines' script to the Geany wiki soon, and then I plan to take a look at jumping to external functions in files that aren't open. FTP integration might be feasible too.
I could use GeanyPy, I suppose, and it's capable of more advanced stuff, but it's not available as a precompiled package, and the build process wanted to install over 100MB of python-dev dependencies...not really keen, nor would I want to impose that burden on end-users. I'll just pick the low-hanging fruit with Lua.
Hi,
Before you get too carried away, are you aware that the Lua plugin is orphaned and will be removed in the next release unless someone becomes maintainer?
Perhaps you should organise that first, if you want to be maintainer yourself then you need reasonable C skills and the time and interest to keep the plugin up to date, for example it currently does not work with GTK3. (I don't know how much is involved in that).
Actually the gtk3 problem was fixed by the Geany maintainer, but thats not his job, he's got an IDE to maintain :)
Cheers Lex
Cheers Lex
Thrawn _______________________________________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Am 05.06.2013 06:34, schrieb Lex Trotman:
On 5 June 2013 13:19, Thrawn <shell_layer-geany@yahoo.com.au mailto:shell_layer-geany@yahoo.com.au> wrote:
Hi, folks. I took a look through the plugin wishlist recently, and it seems to me that a fair number of them could be solved quickly and easily using Lua scripting. Advanced interaction with Geany's chrome is out, but for text wrangling and integration with external tools, Lua scripts are effective, and they're extremely quick and easy to do. I'm going to upload a 'delete duplicate lines' script to the Geany wiki soon, and then I plan to take a look at jumping to external functions in files that aren't open. FTP integration might be feasible too. I could use GeanyPy, I suppose, and it's capable of more advanced stuff, but it's not available as a precompiled package, and the build process wanted to install over 100MB of python-dev dependencies...not really keen, nor would I want to impose that burden on end-users. I'll just pick the low-hanging fruit with Lua.
Hi,
Before you get too carried away, are you aware that the Lua plugin is orphaned and will be removed in the next release unless someone becomes maintainer?
Perhaps you should organise that first, if you want to be maintainer yourself then you need reasonable C skills and the time and interest to keep the plugin up to date, for example it currently does not work with GTK3. (I don't know how much is involved in that).
Cheers Lex
As I noted in the other thread, I still disagree that a plugin that seems to be working fine for a number of users should be removed from the release (until a severe bug occurs).
Best regards
Hi, folks.
Lex, thanks for your comments. I have heard before about GeanyLua's future being uncertain, and I did email the list suggesting that I would be willing to be an emergency backup maintainer. Ie I don't generally have the time, but given a choice between fixing a severe problem and losing the plugin, I'd step up.
Just tonight I've uploaded another script to the Geany Wiki, for surrounding the current selection with brackets, tags, etc. That fulfils another item from the plugin wishlist. It took about 40 lines (including comments and debug lines) and 15 minutes.
I strongly urge that GeanyLua be retained. I think that it and GeanyPy are the way of the future for plugin development, and since GeanyPy isn't available precompiled, GeanyLua is the only out-of-the-box candidate for developing a useful feature (that would normally involve a plugin) in an hour or less. The documentation is clear; the API is simple but effective; there's no boilerplate (no import statements, no class declarations, no metadata, just code); deployment is just a matter of copying the script into the geanylua directory and restarting/rescanning; and it integrates nicely with the keybinding system.
Anyone who wants to develop a plugin, or wishes for a feature that some other editor has, should consider GeanyLua. It might not do what they need, but if it does, they'll be able to do it within an afternoon. I'm already maintaining 6 different Lua-powered features (some of which involve multiple scripts), with a 7th to be uploaded soon, and it's easy.
Thrawn
--- On Wed, 5/6/13, Thomas Martitz thomas.martitz@student.htw-berlin.de wrote:
From: Thomas Martitz thomas.martitz@student.htw-berlin.de Subject: Re: [Geany-Devel] Lua script vs the plugin wishlist To: "Geany development list" devel@lists.geany.org Cc: "Lex Trotman" elextr@gmail.com, shell_layer-geany@yahoo.com.au Received: Wednesday, 5 June, 2013, 7:13 PM
Am 05.06.2013 06:34, schrieb Lex Trotman:
On 5 June 2013 13:19, Thrawn shell_layer-geany@yahoo.com.au wrote:
Hi, folks.
I took a look through the plugin wishlist recently, and it seems to me that a fair number of them could be solved quickly and easily using Lua scripting. Advanced interaction with Geany's chrome is out, but for text wrangling and integration with external tools, Lua scripts are effective, and they're extremely quick and easy to do.
I'm going to upload a 'delete duplicate lines' script to the Geany wiki soon, and then I plan to take a look at jumping to external functions in files that aren't open. FTP integration might be feasible too.
I could use GeanyPy, I suppose, and it's capable of more advanced stuff, but it's not available as a precompiled package, and the build process wanted to install over 100MB of python-dev dependencies...not really keen, nor would I want to impose that burden on end-users. I'll just pick the low-hanging fruit with Lua.
Hi,
Before you get too carried away, are you aware that the Lua plugin is orphaned and will be removed in the next release unless someone becomes maintainer?
Perhaps you should organise that first, if you want to be maintainer yourself then you need reasonable C skills and the time and interest to keep the plugin up to date, for example it currently does not work with GTK3. (I don't know how much is involved in that).
Cheers Lex
As I noted in the other thread, I still disagree that a plugin that seems to be working fine for a number of users should be removed from the release (until a severe bug occurs).
Best regards
Am 05.06.2013 13:46, schrieb Thrawn:
Hi, folks.
Lex, thanks for your comments. I have heard before about GeanyLua's future being uncertain, and I did email the list suggesting that I would be willing to be an emergency backup maintainer. Ie I don't generally have the time, but given a choice between fixing a severe problem and losing the plugin, I'd step up.
Just tonight I've uploaded another script to the Geany Wiki, for surrounding the current selection with brackets, tags, etc. That fulfils another item from the plugin wishlist. It took about 40 lines (including comments and debug lines) and 15 minutes.
I strongly urge that GeanyLua be retained. I think that it and GeanyPy are the way of the future for plugin development, and since GeanyPy isn't available precompiled, GeanyLua is the only out-of-the-box candidate for developing a useful feature (that would normally involve a plugin) in an hour or less. The documentation is clear; the API is simple but effective; there's no boilerplate (no import statements, no class declarations, no metadata, just code); deployment is just a matter of copying the script into the geanylua directory and restarting/rescanning; and it integrates nicely with the keybinding system.
Anyone who wants to develop a plugin, or wishes for a feature that some other editor has, should consider GeanyLua. It might not do what they need, but if it does, they'll be able to do it within an afternoon. I'm already maintaining 6 different Lua-powered features (some of which involve multiple scripts), with a 7th to be uploaded soon, and it's easy.
I believe GeanyLua is nice, but it still needs a maintainer :) You could be the one!
Best regards
Along the same lines, I've developed another way people can quickly integrate functionality to geany in minutes rather than days or even hours :-)
external-tools https://github.com/sblatnick/geany-plugins/tree/external-tools/external-tools - Add virtually ANY executable script or file to be called from keyboard shortcuts or the Tools menu. The intended use is that you can write *bash scripts* or even *perl scripts* that use environment variables to get data from geany (via environment variables passed to the scripts) and are able to act based on some settings on geany or the code.
One advantage that this plugin offers that the lua plugin could maybe consider doing is having a nice UI for adding, removing, and editing scripts.
This plugin hasn't been submitted to geany-plugins yet, as I am still working on it. That said, it's already quite functional. It behaves much like gedit's external tools, but with some improvements and planned features they missed. (I use gedit's version of the plugin daily, so I'm hoping to add it to geany and improve on it)
Here are the currently set environment variables:
1. GEANY_LINE_NUMBER - The current line number the cursor is at in the editor 2. GEANY_SELECTION - Any currently selected text 3. GEANY_SELECTED_LINE - All of the text on the current line the cursor is at 4. GEANY_FILE_PATH - Path to the current file in the editor 5. GEANY_FILE_MIME_TYPE - Mime type of the current file (example: "text/x-csrc") 6. GEANY_FILE_TYPE_NAME - Mime type by name of the current file (example filetype: "C")
Output from the script can be directed into:
1. New "Tools" tab of the Message Window as either text output or a table (I'm still working on the table) 2. Overwrite currently selected text 3. Do nothing in the UI (good for opening other tools like meld) 4. Overwrite the currently selected line 5. /any other ideas?/
I hope the plugin will be greatly flexible. I plan on adding that file paths in the output on the tools tab of the message window will be clickable to browse to files as well as a table output for CSV-like uses.
Anyway, I hope somebody likes this little sneak peak at my plugin :-)
Thanks,
Steven Blatnick
On 06/05/2013 06:06 AM, Thomas Martitz wrote:
Am 05.06.2013 13:46, schrieb Thrawn:
Hi, folks.
Lex, thanks for your comments. I have heard before about GeanyLua's future being uncertain, and I did email the list suggesting that I would be willing to be an emergency backup maintainer. Ie I don't generally have the time, but given a choice between fixing a severe problem and losing the plugin, I'd step up.
Just tonight I've uploaded another script to the Geany Wiki, for surrounding the current selection with brackets, tags, etc. That fulfils another item from the plugin wishlist. It took about 40 lines (including comments and debug lines) and 15 minutes.
I strongly urge that GeanyLua be retained. I think that it and GeanyPy are the way of the future for plugin development, and since GeanyPy isn't available precompiled, GeanyLua is the only out-of-the-box candidate for developing a useful feature (that would normally involve a plugin) in an hour or less. The documentation is clear; the API is simple but effective; there's no boilerplate (no import statements, no class declarations, no metadata, just code); deployment is just a matter of copying the script into the geanylua directory and restarting/rescanning; and it integrates nicely with the keybinding system.
Anyone who wants to develop a plugin, or wishes for a feature that some other editor has, should consider GeanyLua. It might not do what they need, but if it does, they'll be able to do it within an afternoon. I'm already maintaining 6 different Lua-powered features (some of which involve multiple scripts), with a 7th to be uploaded soon, and it's easy.
I believe GeanyLua is nice, but it still needs a maintainer :) You could be the one!
Best regards
Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
On 13-06-04 08:19 PM, Thrawn wrote:
Hi, folks.
I took a look through the plugin wishlist recently, and it seems to me that a fair number of them could be solved quickly and easily using Lua scripting.
I think that[1] wishlist is pretty out of date, FWIW. Maybe we should start one on the main wiki[2] again?
Advanced interaction with Geany's chrome is out,
Assuming chrome means the GUI, I think there's Lua bindings for GTK+ and from what I've read, it's pretty straightforward binding C structures in Lua. If you can get a hold of the GeanyMainWidgets structure and/or the ui_lookup_object function from Lua, you should be golden.
[...]
I could use GeanyPy, I suppose, and it's capable of more advanced stuff, but it's not available as a precompiled package, and the build process wanted to install over 100MB of python-dev dependencies...not really keen, nor would I want to impose that burden on end-users. I'll just pick the low-hanging fruit with Lua.
Oliver has GeanyPy packages on his PPA[3] for Ubuntu, presumably the .debs would work for other Debian-based distros as well. For the build process, I'm pretty sure it shouldn't require 100MB of dependencies to compile (unless you've never installed any build tools yet, like compiler, autotools, etc). If you use a distro with apt-get, you can use `apt-get install --no-install-recommends packageName` and often reduce the number of packages dragged in by half or more.
Anyway, cool that you gave GeanyPy a look, sad that it got overlooked for another alternative :) It's a weird situation, no uses it because no uses it[4] :)
Cheers, Matthew Brush
[1] http://www.geany.org/Support/PluginWishlist [2] https://wiki.geany.org/plugins/wishlist - Someone already did :) just need to transfer the list over. [3] https://launchpad.net/~oly/+archive/ppa [4] Lex, before you say "because it's not in Geany-Plugins", patches welcome on integrating GeanyPy's complex build systems into both of Geany-Plugin's even more complex build systems, oh and (non-trivial) upgrading to GTK3 and Gobject-Introspection-based PyGTK for GTK3 :)
Hi, folks. Thanks for your feedback.
I'm only a novice with C, but I'll take a look sometime at the GeanyLua source and see whether I think I could fix something broken. Will let the list know what I decide.
@Steven: Interesting to hear about your External Tools project, because several of my Lua scripts are basically to give easy integration with external tools. What are its specific advantages compared to GeanyLua and GeanyPy?
I think that[1] wishlist is pretty out of date, FWIW. Maybe we should start one on the main wiki[2] again?
Yeah, it is out of date, but still, these are things that someone wanted at some point. Seems to me like a good starting point. Feel free to update it, though. I believe a bunch of the items already exist in Geany core or a plugin, so they could be cleaned up.
Advanced interaction with Geany's chrome is out,
Assuming chrome means the GUI, I think there's Lua bindings for GTK+ and from what I've read, it's pretty straightforward binding C structures in Lua. If you can get a hold of the GeanyMainWidgets structure and/or the ui_lookup_object function from Lua, you should be golden.
Sadly, I can't see anything in the GeanyLua API that would give me either of those :/ Maybe that's something I can look for in the GeanyLua code.
Oliver has GeanyPy packages on his PPA[3] for Ubuntu, presumably the .debs would work for other Debian-based distros as well.
Good to know. I might give that another look at some point.
I do still like the simplicity of the GeanyLua API, but of course, the complexity of the GeanyPy API is the price of the power.
For the build process, I'm pretty sure it shouldn't require 100MB of dependencies to compile (unless you've never installed any build tools yet, like compiler, autotools, etc).
OK, tried 'sudo apt-get install python python-dev python-gtk2 python-gtk2-dev' on another machine, and this time it wanted to download 57MB, or 41MB without installing recommendations. Better, but still quite a bit, when you consider the size of the main Geany package. And then you still need to download the actual plugin source, compile and install it, and you won't be able to manage it via your package manager.
I work as a programmer, so none of that is a big deal for me. But it's enough for me to prefer GeanyLua for jobs that it can handle. And there are enough of those to keep me busy for a while.
Anyway, cool that you gave GeanyPy a look, sad that it got overlooked for another alternative :) It's a weird situation, no uses it because no uses it[4] :)
Well, if it were available from the default repositories, I'd probably use it. Does it actually have to be part of geany-plugins for that?
You could try porting some of my scripts to GeanyPy if you want. They're GPL and all quite short. Have you tried them out?
[4] Lex, before you say "because it's not in Geany-Plugins", patches welcome on integrating GeanyPy's complex build systems into both of Geany-Plugin's even more complex build systems, oh and (non-trivial) upgrading to GTK3 and Gobject-Introspection-based PyGTK for GTK3 :)
:s No wonder GeanyLua is in peril. Sounds like you have a hard road ahead for GeanyPy, but I do sincerely wish it well, and will keep my eye on news of it.
And I have taken note of the fact that GeanyPy crumbles yet another of the few advantages of Gedit, the ability to integrate a Python console.
Will email the list again soon. I'm working on a Lua script to give Vim keybindings. It's actually quite simple! There are a lot of keys to do, that's all.
Thrawn
Hi ya,
On 8 June 2013 14:54, Thrawn shell_layer-geany@yahoo.com.au wrote:
Hi, folks. Thanks for your feedback.
I'm only a novice with C, but I'll take a look sometime at the GeanyLua source and see whether I think I could fix something broken. Will let the list know what I decide.
@Steven: Interesting to hear about your External Tools project, because several of my Lua scripts are basically to give easy integration with external tools. What are its specific advantages compared to GeanyLua and GeanyPy?
Putting words in Steven's mouth, but I would say a major advantage is it doesn't need Lua or Python.
I think that[1] wishlist is pretty out of date, FWIW. Maybe we should start one on the main wiki[2] again?
Yeah, it is out of date, but still, these are things that someone wanted at some point. Seems to me like a good starting point. Feel free to update it, though. I believe a bunch of the items already exist in Geany core or a plugin, so they could be cleaned up.
Advanced interaction with Geany's chrome is out,
Assuming chrome means the GUI, I think there's Lua bindings for GTK+ and from what I've read, it's pretty straightforward binding C structures in Lua. If you can get a hold of the GeanyMainWidgets structure and/or the ui_lookup_object function from Lua, you should be golden.
Sadly, I can't see anything in the GeanyLua API that would give me either of those :/ Maybe that's something I can look for in the GeanyLua code.
You will have to add those to the lua interface, they are available in the geany plugin interface so it shouldn't be too hard. Just a little C programming. And documenting!!!!
Oliver has GeanyPy packages on his PPA[3] for Ubuntu, presumably the .debs would work for other Debian-based distros as well.
Good to know. I might give that another look at some point.
I do still like the simplicity of the GeanyLua API, but of course, the complexity of the GeanyPy API is the price of the power.
Well the Geanypy interface tries to wrap the whole Geany plugin interface, Geany lua has its own very restricted interface, simple, but limited.
For the build process, I'm pretty sure it shouldn't require 100MB of dependencies to compile (unless you've never installed any build tools yet, like compiler, autotools, etc).
OK, tried 'sudo apt-get install python python-dev python-gtk2 python-gtk2-dev' on another machine, and this time it wanted to download 57MB, or 41MB without installing recommendations. Better, but still quite a bit, when you consider the size of the main Geany package. And then you still need to download the actual plugin source, compile and install it, and you won't be able to manage it via your package manager.
Well, if you have to install all of Python, yeah, but then many (most) systems include it now anyway. And the -dev packages are only needed to compile geanypy, using the packages noted above shouldn't need them.
I work as a programmer, so none of that is a big deal for me. But it's enough for me to prefer GeanyLua for jobs that it can handle. And there are enough of those to keep me busy for a while.
But still with no maintainer you are running the risk of the plugin being removed and all your work being useless. Especially if you are going to add to Geanylua itself (eg GUI access), find a maintainer, or become it yourself. (you may need to do that anyway to add stuff, with no maintainer there is no committer, unless you impose on someone else)
Anyway, cool that you gave GeanyPy a look, sad that it got overlooked for another alternative :) It's a weird situation, no uses it because no uses it[4] :)
Well, if it were available from the default repositories, I'd probably use it. Does it actually have to be part of geany-plugins for that?
You could try porting some of my scripts to GeanyPy if you want. They're GPL and all quite short. Have you tried them out?
[4] Lex, before you say "because it's not in Geany-Plugins", patches welcome on integrating GeanyPy's complex build systems into both of Geany-Plugin's even more complex build systems, oh and (non-trivial) upgrading to GTK3 and Gobject-Introspection-based PyGTK for GTK3 :)
:s No wonder GeanyLua is in peril. Sounds like you have a hard road ahead for GeanyPy, but I do sincerely wish it well, and will keep my eye on news of it.
Methinks he exagerateth for effect ;)
Geanypy could be made part of geany-plugins, there are some issues to solve, but it works well enough for many uses that they don't need to be solved first. But Matthew is a perfectionist.
I'm sure help would be given on the build system issues if geanypy was to be included in g-p (but don't look at me, I'm autotools ignorant :).
And I have taken note of the fact that GeanyPy crumbles yet another of the few advantages of Gedit, the ability to integrate a Python console.
Will email the list again soon. I'm working on a Lua script to give Vim keybindings. It's actually quite simple! There are a lot of keys to do, that's all.
How do you handle modality?
Cheers Lex
Thrawn _______________________________________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
My intent behind external-tools is to essentially imitate the functionality of gEdit's External Tools plugin. You can try that out to see what I mean, or better yet, try my plugin out at https://github.com/sblatnick/geany-plugins%C2%A0in the "external-tools" branch. I've added a make file in the directory, so you can just run "make && make install" and then enable it.
Here are some example uses, some of which I've already used in gEdit:
1. Build code with compiling output in the bottom panel. Yes, I know that there are already build tools, but this makes building as simple as adding the command line code just as you would in the terminal, rather than figuring out all of the separate fields.
2. Replace currently highlighted text. When trying to add localization to a JSP, I found it convenient to write a little macro that changed some.text.string to <%=SOME_TEXT_STRING%> with a press of a button. This allows me to write perl scripts or bash scripts to replace any text.
3. Integrate database operations. You could highlight the select query and have the output displayed in a table below.
4. Open an external tool such as meld to compare the current file against git or svn.
5. Open relevant files. For example, I may have a .jsp open and need to open a similarly named .js and .java file related to it. Basically I can script opening of the files not yet open as compared to the current one.
6. Run custom searching like ack-grep or tools to clean up files like html.
Basically it is very flexible without having to learn very much about the inner workings of geany like making a plugin would. Best of all, you can use any language you want, so long as the file knows to execute it.
Another advantage is that you can add scripts and shortcuts easily, with a UI, rather than having to set up the directory structure and format yourself.
Variables are passed to the script through the environment. Here is a good example of a script you could add to my plugin to see the variables:
#!/bin/bash echo "GEANY_LINE_NUMBER=$GEANY_LINE_NUMBER" echo "GEANY_SELECTION=$GEANY_SELECTION" echo "GEANY_SELECTED_LINE=$GEANY_SELECTED_LINE" echo "GEANY_FILE_PATH=$GEANY_FILE_PATH" echo "GEANY_FILE_MIME_TYPE=$GEANY_FILE_MIME_TYPE" echo "GEANY_FILE_TYPE_NAME=$GEANY_FILE_TYPE_NAME" echo "GEANY_PROJECT_DIRECTORY=$GEANY_PROJECT_DIRECTORY"
Furthermore, I think it easier to have a single interface for building, Custom Commands, and any other functionality that could use this structure.
I plan on adding (if I can figure out how :-) the ability to have links in the text output for opening files who's paths are printed.
Of course, it's a plugin, so that allows it to be installed only if they want it.
I hope this helps,
Steve
PS: I have two other plugins I'd love to see get adopted that are in my github repo in their own branches:
quick-search: incremental search that is quicker than the ones already in geany by on a single keystroke adding to the highlighted entries and the search field any currently highlighted text. It also doesn't occupy toolbar space, as it, like gedit's incremental search, is a non-decorated hovering window in the top left corner of the editor. I actually like this plugin's behavior better than gedit's because it doesn't retain a list of historical values, so you don't get it auto-completing when you don't want it.
quick-opener: Open dialog that searches files in the project directory by name and allows for quick opening. This is like the lua plugin mentioned in the mailing list, but it filters as you type. It's configurable to skip unwanted directories and file names.
________________________________ From: Thrawn shell_layer-geany@yahoo.com.au To: Geany development list devel@lists.geany.org Sent: Friday, June 7, 2013 10:54 PM Subject: Re: [Geany-Devel] Lua script vs the plugin wishlist
Hi, folks. Thanks for your feedback.
I'm only a novice with C, but I'll take a look sometime at the GeanyLua source and see whether I think I could fix something broken. Will let the list know what I decide.
@Steven: Interesting to hear about your External Tools project, because several of my Lua scripts are basically to give easy integration with external tools. What are its specific advantages compared to GeanyLua and GeanyPy?
I think that[1] wishlist is pretty out of date, FWIW. Maybe we should start one on the main wiki[2] again?
Yeah, it is out of date, but still, these are things that someone wanted at some point. Seems to me like a good starting point. Feel free to update it, though. I believe a bunch of the items already exist in Geany core or a plugin, so they could be cleaned up.
Advanced interaction with Geany's chrome is out,
Assuming chrome means the GUI, I think there's Lua bindings for GTK+ and from what I've read, it's pretty straightforward binding C structures in Lua. If you can get a hold of the GeanyMainWidgets structure and/or the ui_lookup_object function from Lua, you should be golden.
Sadly, I can't see anything in the GeanyLua API that would give me either of those :/ Maybe that's something I can look for in the GeanyLua code.
Oliver has GeanyPy packages on his PPA[3] for Ubuntu, presumably the .debs would work for other Debian-based distros as well.
Good to know. I might give that another look at some point.
I do still like the simplicity of the GeanyLua API, but of course, the complexity of the GeanyPy API is the price of the power.
For the build process, I'm pretty sure it shouldn't require 100MB of dependencies to compile (unless you've never installed any build tools yet, like compiler, autotools, etc).
OK, tried 'sudo apt-get install python python-dev python-gtk2 python-gtk2-dev' on another machine, and this time it wanted to download 57MB, or 41MB without installing recommendations. Better, but still quite a bit, when you consider the size of the main Geany package. And then you still need to download the actual plugin source, compile and install it, and you won't be able to manage it via your package manager.
I work as a programmer, so none of that is a big deal for me. But it's enough for me to prefer GeanyLua for jobs that it can handle. And there are enough of those to keep me busy for a while.
Anyway, cool that you gave GeanyPy a look, sad that it got overlooked for another alternative :) It's a weird situation, no uses it because no uses it[4] :)
Well, if it were available from the default repositories, I'd probably use it. Does it actually have to be part of geany-plugins for that?
You could try porting some of my scripts to GeanyPy if you want. They're GPL and all quite short. Have you tried them out?
[4] Lex, before you say "because it's not in Geany-Plugins", patches welcome on integrating GeanyPy's complex build systems into both of Geany-Plugin's even more complex build systems, oh and (non-trivial) upgrading to GTK3 and Gobject-Introspection-based PyGTK for GTK3 :)
:s No wonder GeanyLua is in peril. Sounds like you have a hard road ahead for GeanyPy, but I do sincerely wish it well, and will keep my eye on news of it.
And I have taken note of the fact that GeanyPy crumbles yet another of the few advantages of Gedit, the ability to integrate a Python console.
Will email the list again soon. I'm working on a Lua script to give Vim keybindings. It's actually quite simple! There are a lot of keys to do, that's all.
Thrawn _______________________________________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
if anyone wants to checkout the ppa the links below, it auto packages geanypy from git, I also packages some of my own plugins in this ppa which i may get put into the geany plugin project one day when GeanyPY is part of the plugin list.
Anyway follow the link below it builds for a few versions of ubuntu, but i have never tested it with debian but i see no reason it would not work other than i may need to adjust the required versions of libraries.
https://launchpad.net/~oly/+archive/geanyhttps://launchpad.net/%7Eoly/+archive/geany
On Sat, Jun 8, 2013 at 6:59 AM, Steven Blatnick steve8track@yahoo.comwrote:
My intent behind external-tools is to essentially imitate the functionality of gEdit's External Tools plugin. You can try that out to see what I mean, or better yet, try my plugin out at https://github.com/sblatnick/geany-plugins in the "external-tools" branch. I've added a make file in the directory, so you can just run "make && make install" and then enable it.
Here are some example uses, some of which I've already used in gEdit:
- Build code with compiling output in the bottom panel. Yes, I know that
there are already build tools, but this makes building as simple as adding the command line code just as you would in the terminal, rather than figuring out all of the separate fields.
- Replace currently highlighted text. When trying to add localization to
a JSP, I found it convenient to write a little macro that changed some.text.string to <%=SOME_TEXT_STRING%> with a press of a button. This allows me to write perl scripts or bash scripts to replace any text.
- Integrate database operations. You could highlight the select query
and have the output displayed in a table below.
- Open an external tool such as meld to compare the current file against
git or svn.
- Open relevant files. For example, I may have a .jsp open and need to
open a similarly named .js and .java file related to it. Basically I can script opening of the files not yet open as compared to the current one.
- Run custom searching like ack-grep or tools to clean up files like html.
Basically it is very flexible without having to learn very much about the inner workings of geany like making a plugin would. Best of all, you can use any language you want, so long as the file knows to execute it.
Another advantage is that you can add scripts and shortcuts easily, with a UI, rather than having to set up the directory structure and format yourself.
Variables are passed to the script through the environment. Here is a good example of a script you could add to my plugin to see the variables:
#!/bin/bash echo "GEANY_LINE_NUMBER=$GEANY_LINE_NUMBER" echo "GEANY_SELECTION=$GEANY_SELECTION" echo "GEANY_SELECTED_LINE=$GEANY_SELECTED_LINE" echo "GEANY_FILE_PATH=$GEANY_FILE_PATH" echo "GEANY_FILE_MIME_TYPE=$GEANY_FILE_MIME_TYPE" echo "GEANY_FILE_TYPE_NAME=$GEANY_FILE_TYPE_NAME" echo "GEANY_PROJECT_DIRECTORY=$GEANY_PROJECT_DIRECTORY"
Furthermore, I think it easier to have a single interface for building, Custom Commands, and any other functionality that could use this structure.
I plan on adding (if I can figure out how :-) the ability to have links in the text output for opening files who's paths are printed.
Of course, it's a plugin, so that allows it to be installed only if they want it.
I hope this helps,
Steve
PS: I have two other plugins I'd love to see get adopted that are in my github repo in their own branches:
quick-search: incremental search that is quicker than the ones already in geany by on a single keystroke adding to the highlighted entries and the search field any currently highlighted text. It also doesn't occupy toolbar space, as it, like gedit's incremental search, is a non-decorated hovering window in the top left corner of the editor. I actually like this plugin's behavior better than gedit's because it doesn't retain a list of historical values, so you don't get it auto-completing when you don't want it.
quick-opener: Open dialog that searches files in the project directory by name and allows for quick opening. This is like the lua plugin mentioned in the mailing list, but it filters as you type. It's configurable to skip unwanted directories and file names.
*From:* Thrawn shell_layer-geany@yahoo.com.au
*To:* Geany development list devel@lists.geany.org *Sent:* Friday, June 7, 2013 10:54 PM
*Subject:* Re: [Geany-Devel] Lua script vs the plugin wishlist
Hi, folks. Thanks for your feedback.
I'm only a novice with C, but I'll take a look sometime at the GeanyLua source and see whether I think I could fix something broken. Will let the list know what I decide.
@Steven: Interesting to hear about your External Tools project, because several of my Lua scripts are basically to give easy integration with external tools. What are its specific advantages compared to GeanyLua and GeanyPy?
I think that[1] wishlist is pretty out of date, FWIW. Maybe we should start one on the main wiki[2] again?
Yeah, it is out of date, but still, these are things that someone wanted at some point. Seems to me like a good starting point. Feel free to update it, though. I believe a bunch of the items already exist in Geany core or a plugin, so they could be cleaned up.
Advanced interaction with Geany's chrome is out,
Assuming chrome means the GUI, I think there's Lua bindings for GTK+ and from what I've read, it's pretty straightforward binding C structures in Lua. If you can get a hold of the GeanyMainWidgets structure and/or the ui_lookup_object function from Lua, you should be golden.
Sadly, I can't see anything in the GeanyLua API that would give me either of those :/ Maybe that's something I can look for in the GeanyLua code.
Oliver has GeanyPy packages on his PPA[3] for Ubuntu, presumably the .debs would work for other Debian-based distros as well.
Good to know. I might give that another look at some point.
I do still like the simplicity of the GeanyLua API, but of course, the complexity of the GeanyPy API is the price of the power.
For the build process, I'm pretty sure it shouldn't require 100MB of dependencies to compile (unless you've never installed any build tools yet, like compiler, autotools, etc).
OK, tried 'sudo apt-get install python python-dev python-gtk2 python-gtk2-dev' on another machine, and this time it wanted to download 57MB, or 41MB without installing recommendations. Better, but still quite a bit, when you consider the size of the main Geany package. And then you still need to download the actual plugin source, compile and install it, and you won't be able to manage it via your package manager.
I work as a programmer, so none of that is a big deal for me. But it's enough for me to prefer GeanyLua for jobs that it can handle. And there are enough of those to keep me busy for a while.
Anyway, cool that you gave GeanyPy a look, sad that it got overlooked for another alternative :) It's a weird situation, no uses it because no uses it[4] :)
Well, if it were available from the default repositories, I'd probably use it. Does it actually have to be part of geany-plugins for that?
You could try porting some of my scripts to GeanyPy if you want. They're GPL and all quite short. Have you tried them out?
[4] Lex, before you say "because it's not in Geany-Plugins", patches welcome on integrating GeanyPy's complex build systems into both of Geany-Plugin's even more complex build systems, oh and (non-trivial) upgrading to GTK3 and Gobject-Introspection-based PyGTK for GTK3 :)
:s No wonder GeanyLua is in peril. Sounds like you have a hard road ahead for GeanyPy, but I do sincerely wish it well, and will keep my eye on news of it.
And I have taken note of the fact that GeanyPy crumbles yet another of the few advantages of Gedit, the ability to integrate a Python console.
Will email the list again soon. I'm working on a Lua script to give Vim keybindings. It's actually quite simple! There are a lot of keys to do, that's all.
Thrawn _______________________________________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel