Dear Geany devs,
As some of you might know, it's generally faster to use single quotes (') around strings in php instead of double quotes ("). In some coding standards (like Drupal's) however you must use double quotes instead of escaping a single quote in your string ("'" instead of ''') for readability. Cleaning up a piece of code (toggle single/double quotes) with search/replace requires a step in between or is quite an intensive job.
It would be nice if Geany could toggle single and double qoutes of a selection, just like the toggle case function does...
Bonus points could be earned if this feature would escape/unescape quotes too ;)
What do you guys think: Feature request of thrash bin?
-H-
On Wed, 06 Aug 2008 13:52:57 +0200, Harold Aling geany@sait.nl wrote:
Dear Geany devs,
As some of you might know, it's generally faster to use single quotes (') around strings in php instead of double quotes ("). In some coding standards (like Drupal's) however you must use double quotes instead of escaping a single quote in your string ("'" instead of ''') for readability. Cleaning up a piece of code (toggle single/double quotes) with search/replace requires a step in between or is quite an intensive job.
It would be nice if Geany could toggle single and double qoutes of a selection, just like the toggle case function does...
Bonus points could be earned if this feature would escape/unescape quotes too ;)
What do you guys think: Feature request of thrash bin?
Haha, dangerous querstion...I personally would move it to the trash bin. But what I personally think is often far away from most users needs and wishes, so it doesn't count much.
To be more seriously, I think this could be easily solved as a plugin. You just need to find someone who wants to implement it or refresh your C knowledge and do it yourself! :D
I guess there can be found several similar tasks of multiple substitutions and/or find/replace actions which can be simplified by grouping them together. But most of these like your request are more or less specific and so IMO they don't fit into Geany's core.
Regards, Enrico
On Thu, 7 Aug 2008 12:06:46 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
To be more seriously, I think this could be easily solved as a plugin. You just need to find someone who wants to implement it or refresh your C knowledge and do it yourself! :D
I agree, but another option is to write a script for the Lua plugin (the geany-plugins version should build against Geany SVN). Or probably you could use any external program to do it with 'Send selection to' if you wanted to use Python, etc.
Regards, Nick
On Thu, 7 Aug 2008 12:44:56 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Thu, 7 Aug 2008 12:06:46 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
To be more seriously, I think this could be easily solved as a plugin. You just need to find someone who wants to implement it or refresh your C knowledge and do it yourself! :D
I agree, but another option is to write a script for the Lua plugin (the geany-plugins version should build against Geany SVN).
This would be a great time to start my Lua adventure! It's been on my todo list for quite a while now...
Unfortunately, I can't get geanylua to compile yet... (both Geany and Geanylua from svn) It also seems that Geanylua doesn't obey --prefix=/usr as it wants to install in /home/harold/.geany/plugins.
The error: $ make install /home/harold/.geany/plugins /bin/bash: /home/harold/.geany/plugins: No such file or directory make: *** [install-plugin] Error 127
Of cource I know how to solve that! $ mkdir /home/harold/.geany/plugins
$ make install /home/harold/.geany/plugins /bin/bash: /home/harold/.geany/plugins: is a directory make: *** [install-plugin] Error 126
Hmmm... This is also the reason I want to go Lua instead of C/Autotools/etc... Too darn complicated for my little brain.
-H-
On Thu, 07 Aug 2008 14:09:02 +0200 Harold Aling geany@sait.nl wrote:
Unfortunately, I can't get geanylua to compile yet... (both Geany and Geanylua from svn) It also seems that Geanylua doesn't obey
What's the compile error?
--prefix=/usr as it wants to install in /home/harold/.geany/plugins.
The error: $ make install /home/harold/.geany/plugins /bin/bash: /home/harold/.geany/plugins: No such file or directory make: *** [install-plugin] Error 127
Maybe you want to run 'make install' with root privileges. I haven't tried that though.
I'll look into the missing plugins directory problem later.
Regards, Nick
On Thu, 07 Aug 2008 14:09:02 +0200 Harold Aling geany@sait.nl wrote:
Sorry, I was wrong, installing as root doesn't help. Jeff's install procedure doesn't use the standard autotools way, as you may have gathered ;-)
$ make install /home/harold/.geany/plugins /bin/bash: /home/harold/.geany/plugins: is a directory make: *** [install-plugin] Error 126
I also get this problem. It's due to a too-old version of some autotool, but there's a workaround:
MKDIR_P='mkdir -p' make install
Sorry for all the hassle ;-) I'll fix the Makefile to do this.
Regards, Nick
On Thu, 7 Aug 2008 13:37:40 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
I also get this problem. It's due to a too-old version of some autotool, but there's a workaround:
MKDIR_P='mkdir -p' make install
Sorry for all the hassle ;-) I'll fix the Makefile to do this.
Should be fixed now in SVN. Hopefully it'll now work for automake <= 1.9.6.
Regards, Nick