I'm thinking of producing a Lua script to give a vim-style interface to Geany. Anyone interested?
My thoughts at this point are that you'd invoke the script using a keyboard shortcut, probably Escape, and it would then grab all of your keystrokes and recognise (a subset of) vim commands, until you issue a shortcut to exit the script.
Most vim commands are pretty easy to translate into cursor movement and copy/cut/paste operations. Insertion could be achieved simply by placing the cursor and exiting the script; pressing Escape would appear to be jumping back to 'command mode', but would actually be re-invoking the script.
Anyone's thoughts on whether this would be worth making?
Am 06.02.2013 07:06, schrieb Thrawn:
I'm thinking of producing a Lua script to give a vim-style interface to Geany. Anyone interested?
My thoughts at this point are that you'd invoke the script using a keyboard shortcut, probably Escape, and it would then grab all of your keystrokes and recognise (a subset of) vim commands, until you issue a shortcut to exit the script.
Most vim commands are pretty easy to translate into cursor movement and copy/cut/paste operations. Insertion could be achieved simply by placing the cursor and exiting the script; pressing Escape would appear to be jumping back to 'command mode', but would actually be re-invoking the script.
Anyone's thoughts on whether this would be worth making?
Maybe you like to have a look at commander-plugin which already might is a good starting point. Personally I doubt the lua-plugin is a good base for such a feature as it's nearly unmaintained since some time.
Cheers, Frank
Maybe you like to have a look at commander-plugin which already might is a good starting point.
Possibly, and thanks for the pointer, but I'm not really aiming to produce a full plugin. Lua scripts are much quicker and easier :). One file, no compilation, just save to a directory and run them.
Personally I doubt the lua-plugin is a good base for such a feature as it's nearly unmaintained since some time.
Hmm...thanks for the tip. As far as I can tell, though, the Lua plugin still works fine, whether it's maintained or not. I've produced several scripts in it.
Either way, do you think that a vim overlay would be useful (to some)?
Am 2013-02-07 04:21, schrieb Thrawn:
Maybe you like to have a look at commander-plugin which already might is a good starting point.
Possibly, and thanks for the pointer, but I'm not really aiming to produce a full plugin. Lua scripts are much quicker and easier :). One file, no compilation, just save to a directory and run them.
OK. This is fine with me.
Personally I doubt the lua-plugin is a good base for such a feature as it's nearly unmaintained since some time.
Hmm...thanks for the tip. As far as I can tell, though, the Lua plugin still works fine, whether it's maintained or not. I've produced several scripts in it.
But we cannot assure it will in future as there is no real maintainer. Personally I was already thinking of removing the plugin btw.
Either way, do you think that a vim overlay would be useful (to some)?
As old tall tell there is also kind of a vim mode in emacs, there is for sure somebody who think its useful. But this being said: I expect here you will open Pandoras box. There will be people outside - lot of people - that will ask "why is :foobaa not supported".
Cheers, Frank
[...]
But we cannot assure it will in future as there is no real maintainer. Personally I was already thinking of removing the plugin btw.
Yes, without a maintainer, as soon as it breaks with a new version of Geany I would expect it to be removed from G-P package. The G-P maintainers have done a great job carrying the Lua plugin until now.
Either way, do you think that a vim overlay would be useful (to some)?
As old tall tell there is also kind of a vim mode in emacs, there is for sure somebody who think its useful. But this being said: I expect here you will open Pandoras box. There will be people outside - lot of people - that will ask "why is :foobaa not supported".
I would recommend a quick google of Eclipse vim plugins, a cautionary tale. There are several plugins but they are criticised because they don't work well enough, are unreliable, so they are abandoned etc. And that includes one that uses vim itself as the plugin. None of them seem to have attained any real traction.
I think Frank is right, as a public plugin you are setting yourself up for complaints. Of course for your own use its fine to build such a plugin.
Cheers Lex
Cheers, Frank
Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Am 2013-02-07 09:33, schrieb Lex Trotman:
[...]
But we cannot assure it will in future as there is no real maintainer. Personally I was already thinking of removing the plugin btw.
Yes, without a maintainer, as soon as it breaks with a new version of Geany I would expect it to be removed from G-P package. The G-P maintainers have done a great job carrying the Lua plugin until now.
From my remembering Nick did the biggest part of it.
Either way, do you think that a vim overlay would be useful (to some)?
As old tall tell there is also kind of a vim mode in emacs, there is for sure somebody who think its useful. But this being said: I expect here you will open Pandoras box. There will be people outside - lot of people
- that
will ask "why is :foobaa not supported".
I would recommend a quick google of Eclipse vim plugins, a cautionary tale. There are several plugins but they are criticised because they don't work well enough, are unreliable, so they are abandoned etc. And that includes one that uses vim itself as the plugin. None of them seem to have attained any real traction.
I think Frank is right, as a public plugin you are setting yourself up for complaints. Of course for your own use its fine to build such a plugin.
I agree. However, I'd also find it useful in some situations (as well as an "Emacs-mode" in other situations. So. Maybe we should it say it in this way: Users will not sending you "great job" if they like your plugin, but "it shall also support ..." ;)
Cheers, Frank
Yes, without a maintainer, as soon as it breaks with a new version of Geany I would expect it to be removed from G-P package. The G-P maintainers have done a great job carrying the Lua plugin until now.
From my remembering Nick did the biggest part of it.
I'd be sorry to see it go. It seems to me that Lua scripting has huge potential, mostly overlooked; it can quickly and easily do many of the jobs that would normally be plugins (I've written short scripts to compare open files, edit files as hex, and quickly find+open files in the current project using partial file names). If it were a choice between fixing it and dropping it, I'd probably take up the job myself.
I think Frank is right, as a public plugin you are setting yourself up for complaints. Of course for your own use its fine to build such a plugin.
I agree. However, I'd also find it useful in some situations (as well as an "Emacs-mode" in other situations. So. Maybe we should it say it in this way: Users will not sending you "great job" if they like your plugin, but "it shall also support ..." ;)
Fair enough :D. If people do that, though, then at least it will mean that they're noticing the existence of the Lua plugin. Who knows, maybe they'd modify the script or write their own; it's not hard at all, and the geanylua documentation is quite good.
I think Emacs mode is out, though...vi commands are mostly very easy to translate into cursor movement and clipboard operations. Emacs commands are not.
Will work on this if I get time, and upload to Geany Wiki.
On 13-02-07 04:09 PM, Thrawn wrote:
Yes, without a maintainer, as soon as it breaks with a new version of Geany I would expect it to be removed from G-P package. The G-P maintainers have done a great job carrying the Lua plugin until now.
From my remembering Nick did the biggest part of it.
I'd be sorry to see it go. It seems to me that Lua scripting has huge potential, mostly overlooked; it can quickly and easily do many of the jobs that would normally be plugins (I've written short scripts to compare open files, edit files as hex, and quickly find+open files in the current project using partial file names). If it were a choice between fixing it and dropping it, I'd probably take up the job myself.
IMO, it'd be silly removing a perfectly functional plugin unless it breaks and no one wants to fix it. I doubt that'll happen anytime soon with both Lua and Geany plugin API being quite stable, and unless the breakage is massive and hard to fix, I'd also be willing to pitch in to keep it working, as other contributors have done in the past.
I'll also take this opportunity to point out the existence of GeanyPy[1], which for me makes more sense since I know Python fairly well and Lua not at all :)
Cheers, Matthew Brush
IMO, it'd be silly removing a perfectly functional plugin unless it breaks and no one wants to fix it. I doubt that'll happen anytime soon with both Lua and Geany plugin API being quite stable, and unless the breakage is massive and hard to fix, I'd also be willing to pitch in to keep it working, as other contributors have done in the past.
Sounds good :).
I'll also take this opportunity to point out the existence of GeanyPy[1], which for me makes more sense since I know Python fairly well and Lua not at all :)
I didn't know about that one; I haven't built any plugins from source, just downloaded via apt-get. Looks like it's more powerful, because it exposes the full plugin API, whereas Lua scripts just get a subset. I'll have to check it out sometime if I find that I need more powerful interaction than geanylua allows. Has the API stabilised?
On 13-02-07 05:32 PM, Thrawn wrote:
IMO, it'd be silly removing a perfectly functional plugin unless it breaks and no one wants to fix it. I doubt that'll happen anytime soon with both Lua and Geany plugin API being quite stable, and unless the breakage is massive and hard to fix, I'd also be willing to pitch in to keep it working, as other contributors have done in the past.
Sounds good :).
I'll also take this opportunity to point out the existence of GeanyPy[1], which for me makes more sense since I know Python fairly well and Lua not at all :)
I didn't know about that one; I haven't built any plugins from source, just downloaded via apt-get. Looks like it's more powerful, because it exposes the full plugin API, whereas Lua scripts just get a subset. I'll have to check it out sometime if I find that I need more powerful interaction than geanylua allows. Has the API stabilised?
I guess so, it's mostly just a 1:1 mapping of Geany's C API. It's missing the odd function and hasn't any support yet for Geany's plugin keybindings facilities, but otherwise I can't see changing it unless Geany's plugin API changes.
Cheers, Matthew Brush
Am 08.02.2013 02:12, schrieb Matthew Brush:
On 13-02-07 04:09 PM, Thrawn wrote:
Yes, without a maintainer, as soon as it breaks with a new version of Geany I would expect it to be removed from G-P package. The G-P maintainers have done a great job carrying the Lua plugin until now.
From my remembering Nick did the biggest part of it.
I'd be sorry to see it go. It seems to me that Lua scripting has huge potential, mostly overlooked; it can quickly and easily do many of the jobs that would normally be plugins (I've written short scripts to compare open files, edit files as hex, and quickly find+open files in the current project using partial file names). If it were a choice between fixing it and dropping it, I'd probably take up the job myself.
IMO, it'd be silly removing a perfectly functional plugin unless it breaks and no one wants to fix it. I doubt that'll happen anytime soon with both Lua and Geany plugin API being quite stable, and unless the breakage is massive and hard to fix, I'd also be willing to pitch in to keep it working, as other contributors have done in the past.
I'll also take this opportunity to point out the existence of GeanyPy[1], which for me makes more sense since I know Python fairly well and Lua not at all :)
Shouldn't we make it a bit more popular? Would it make it sense to include it maybe into geany-core-disribution? Just thinking.
Cheers, Frank