Hi all!
I wrote a plugin that embraces the selection in configurable text. I made it with HTML in mind. It's possible to define variables which the user can fill in a dialog, for example with a file selection dialog or a comboBox with predefined values.
Screenshot: http://primandras.hu/stuff/geany_embrace/screenshot.png Some documentation: http://primandras.hu/stuff/geany_embrace/ConfigFile.html The tar.gz: http://primandras.hu/stuff/geany_embrace/embrace-0.9.tar.gz
I'd like to contribute it in the geany-plugins project. It still needs tidying and stuff. For example I tried to set different set of key bindings for different filetypes and dynamically change them when the user switches documents (so the same key combinations could be re-used) but now only those appear in the key binding setting dialog, which apply to the filetype visible at plugin_init() (However using the same key combination on different documents does work as expected.)
Best regards! András Prim
Hi.
On Fri, 17 Jul 2009 21:49:23 +0200 Prim András pa@primandras.hu wrote:
I wrote a plugin that embraces the selection in configurable text.
Cool. That's some functionality I was looking for. But I rather thought about adding it to snippets instead of adding additional buttons/menu-items/hotkeys. So that you hit a hotkey and then you type a shortcut for a snippet and then the snippet wraps the selection... But will have look at your solution.
-- Mockey
Prim Andráspa@primandras.hu wrote:
I wrote a plugin that embraces the selection in configurable text.
I don't get what it does.
On Fri, 17 Jul 2009 23:12:00 +0200 Jonas Haag jonas@jonashaag.de wrote:
Prim Andráspa@primandras.hu wrote:
I wrote a plugin that embraces the selection in configurable text.
I don't get what it does.
To be honest, me neither. Can you please go into detail with an example maybe?
Thanks, Frank
Frank Lanitz írta:
On Fri, 17 Jul 2009 23:12:00 +0200 Jonas Haag jonas@jonashaag.de wrote:
Prim Andráspa@primandras.hu wrote:
I wrote a plugin that embraces the selection in configurable text.
I don't get what it does.
To be honest, me neither. Can you please go into detail with an example maybe?
Yes, of course. (It seems I'd have to avoid writing letters at midnight. :)
So it adds a new toolbar as seen in the screenshot
http://primandras.hu/stuff/geany_embrace/screenshot.png
When I write my HTML and want a word to be bold, then I select it, press the italic button on the toolbar and it will add "<i>" before and "</i>" after the selection.
Furthermore it is possible to configure it, so that when one presses the image button, it pops a dialog as seen in the screenshot, where one can choose a file with a file chooser dialog, write a label, pick an alignment from the predefined list and write a class name, or choose one that is used earlier. And when pressing OK it will add a nice <img /> tag with the appropriate attributes filled in.
G'day András Prim
On Sat, 18 Jul 2009 09:20:58 +0200 Prim András pa@primandras.hu wrote:
Frank Lanitz írta:
On Fri, 17 Jul 2009 23:12:00 +0200 Jonas Haag jonas@jonashaag.de wrote:
Prim Andráspa@primandras.hu wrote:
I wrote a plugin that embraces the selection in configurable text.
I don't get what it does.
To be honest, me neither. Can you please go into detail with an example maybe?
Yes, of course. (It seems I'd have to avoid writing letters at midnight. :)
So it adds a new toolbar as seen in the screenshot
http://primandras.hu/stuff/geany_embrace/screenshot.png
When I write my HTML and want a word to be bold, then I select it, press the italic button on the toolbar and it will add "<i>" before and "</i>" after the selection.
Why not using <strong>? SCNR.
Furthermore it is possible to configure it, so that when one presses the image button, it pops a dialog as seen in the screenshot, where one can choose a file with a file chooser dialog, write a label, pick an alignment from the predefined list and write a class name, or choose one that is used earlier. And when pressing OK it will add a nice <img /> tag with the appropriate attributes filled in.
Are you doing some check for XHTML/HTML and their different versions?
Thanks, Frank
Hi!
Frank Lanitz írta:
Yes, of course. (It seems I'd have to avoid writing letters at midnight. :)
So it adds a new toolbar as seen in the screenshot
http://primandras.hu/stuff/geany_embrace/screenshot.png
When I write my HTML and want a word to be bold, then I select it, press the italic button on the toolbar and it will add "<i>" before and "</i>" after the selection.
Why not using <strong>? SCNR.
1. Oops. Of course when I want my text to be bold, then I use <b> 2. The plugin has a configuration file, in that the users can define as many buttons as they want, including <strong>.
Furthermore it is possible to configure it, so that when one presses the image button, it pops a dialog as seen in the screenshot, where one can choose a file with a file chooser dialog, write a label, pick an alignment from the predefined list and write a class name, or choose one that is used earlier. And when pressing OK it will add a nice <img /> tag with the appropriate attributes filled in.
Are you doing some check for XHTML/HTML and their different versions?
No, I didn't go that far - the only thing now you can do is to rewrite the config file. AFAIK one can write files that are compatible with all these versions. Would it be useful for you to do such check? In what case?
András Prim
Hi,
On Wed, 29 Jul 2009 15:48:42 +0200 Prim András pa@primandras.hu wrote:
Frank Lanitz írta:
Yes, of course. (It seems I'd have to avoid writing letters at midnight. :)
So it adds a new toolbar as seen in the screenshot
http://primandras.hu/stuff/geany_embrace/screenshot.png
When I write my HTML and want a word to be bold, then I select it, press the italic button on the toolbar and it will add "<i>" before and "</i>" after the selection.
Why not using <strong>? SCNR.
- Oops. Of course when I want my text to be bold, then I use <b>
- The plugin has a configuration file, in that the users can define
as many buttons as they want, including <strong>.
OK. Didn't check the details to be honest ;)
Furthermore it is possible to configure it, so that when one presses the image button, it pops a dialog as seen in the screenshot, where one can choose a file with a file chooser dialog, write a label, pick an alignment from the predefined list and write a class name, or choose one that is used earlier. And when pressing OK it will add a nice <img /> tag with the appropriate attributes filled in.
Are you doing some check for XHTML/HTML and their different versions?
No, I didn't go that far - the only thing now you can do is to rewrite the config file. AFAIK one can write files that are compatible with all these versions. Would it be useful for you to do such check? In what case?
Not for me but I was corious of as I know a couple of ppl which are pretty picky about such things.
Thanks, Frank
Am Samstag, den 18.07.2009, 09:20 +0200 schrieb Prim András:
Frank Lanitz írta:
On Fri, 17 Jul 2009 23:12:00 +0200 Jonas Haag jonas@jonashaag.de wrote:
Prim Andráspa@primandras.hu wrote:
I wrote a plugin that embraces the selection in configurable text.
I don't get what it does.
To be honest, me neither. Can you please go into detail with an example maybe?
Yes, of course. (It seems I'd have to avoid writing letters at midnight. :)
So it adds a new toolbar as seen in the screenshot
http://primandras.hu/stuff/geany_embrace/screenshot.png
When I write my HTML and want a word to be bold, then I select it, press the italic button on the toolbar and it will add "<i>" before and "</i>" after the selection.
Furthermore it is possible to configure it, so that when one presses the image button, it pops a dialog as seen in the screenshot, where one can choose a file with a file chooser dialog, write a label, pick an alignment from the predefined list and write a class name, or choose one that is used earlier. And when pressing OK it will add a nice <img /> tag with the appropriate attributes filled in.
I'm just working on a project in HTML where to get lot's of <li>'s around lines of text. Well, it's around ten lines, but it's a very good use case for your embrace plugin. Of course there are alternate ways, like maybe Search & Replace or lua scripts or mini scripts or anything else, but I instantly got your embrace plugin in mind. :)
Just as a suggestion: Since there already are two more menu items about HTML editing - at least for me - in the Tools menu ("Insert Special HTML Characters" and "HTML Replacement") it maybe would be nice idea to have a more general plugin for HTML and website editing where these functions are merged into one plugin. What do you guys think about this?
Regards, Dominic
On Sun, 26 Jul 2009 00:41:29 +0200 Dominic Hopf dmaphy@googlemail.com wrote:
Am Samstag, den 18.07.2009, 09:20 +0200 schrieb Prim András:
Frank Lanitz írta:
On Fri, 17 Jul 2009 23:12:00 +0200 Jonas Haag jonas@jonashaag.de wrote:
Prim Andráspa@primandras.hu wrote:
I wrote a plugin that embraces the selection in configurable text.
I don't get what it does.
To be honest, me neither. Can you please go into detail with an example maybe?
Yes, of course. (It seems I'd have to avoid writing letters at midnight. :)
So it adds a new toolbar as seen in the screenshot
http://primandras.hu/stuff/geany_embrace/screenshot.png
When I write my HTML and want a word to be bold, then I select it, press the italic button on the toolbar and it will add "<i>" before and "</i>" after the selection.
Furthermore it is possible to configure it, so that when one presses the image button, it pops a dialog as seen in the screenshot, where one can choose a file with a file chooser dialog, write a label, pick an alignment from the predefined list and write a class name, or choose one that is used earlier. And when pressing OK it will add a nice <img /> tag with the appropriate attributes filled in.
I'm just working on a project in HTML where to get lot's of <li>'s around lines of text. Well, it's around ten lines, but it's a very good use case for your embrace plugin. Of course there are alternate ways, like maybe Search & Replace or lua scripts or mini scripts or anything else, but I instantly got your embrace plugin in mind. :)
Just as a suggestion: Since there already are two more menu items about HTML editing - at least for me - in the Tools menu ("Insert Special HTML Characters" and "HTML Replacement") it maybe would be nice idea to have a more general plugin for HTML and website editing where these functions are merged into one plugin. What do you guys think about this?
Hard to say. At the moment htmlchars is implementing a number of features around special chars on HTML files. I wouldn't care much whether its getting merged to a huge one but I'm afraid its getting to bloated for common usage.
Cheers, Frank
On Fri, 17 Jul 2009 23:08:53 +0200 Andreas Mokros am@medienpensionat.com wrote:
But I rather thought about adding it to snippets instead of adding additional buttons/menu-items/hotkeys. So that you hit a hotkey and then you type a shortcut for a snippet and then the snippet wraps the selection...
Currently snippets are much simpler than this and it's not possible to do that - but you could probably do it with a Lua Script ;-)
Regards, Nick
On Saturday 18,July,2009 03:49 AM, Prim András wrote:
Hi all!
I wrote a plugin that embraces the selection in configurable text. I made it with HTML in mind. It's possible to define variables which the user can fill in a dialog, for example with a file selection dialog or a comboBox with predefined values.
Screenshot: http://primandras.hu/stuff/geany_embrace/screenshot.png Some documentation: http://primandras.hu/stuff/geany_embrace/ConfigFile.html The tar.gz: http://primandras.hu/stuff/geany_embrace/embrace-0.9.tar.gz
I'd like to contribute it in the geany-plugins project. It still needs tidying and stuff. For example I tried to set different set of key bindings for different filetypes and dynamically change them when the user switches documents (so the same key combinations could be re-used) but now only those appear in the key binding setting dialog, which apply to the filetype visible at plugin_init() (However using the same key combination on different documents does work as expected.)
Best regards! András Prim
Sounds like a pretty cool plugin. If/when you bring it into the geany-plugins svn repository, I'd recommend that you add it into the combined geany-plugins project (trunk/geany-plugins) to ease release and packagers' work. I maintain geany-plugins' build system, and would be happy to integrate your plugin into the said build system. :-)
On a side note, from a packager's point of view, you might like to add copyright headers to your source files, and perhaps provide an AUTHORS file as well.
On Sat, 18 Jul 2009 05:19:42 +0800, Chow wrote:
On Saturday 18,July,2009 03:49 AM, Prim András wrote:
Hi all!
I wrote a plugin that embraces the selection in configurable text.
Cool!
I'd like to contribute it in the geany-plugins project. It still needs tidying and stuff. For example I tried to set different set of key bindings for different filetypes and dynamically change them when the user switches documents (so the same key combinations could be re-used) but now only those appear in the key binding setting dialog, which apply to the filetype visible at plugin_init() (However using the same key combination on different documents does work as expected.)
Best regards! András Prim
Sounds like a pretty cool plugin. If/when you bring it into the geany-plugins svn repository, I'd recommend that you add it into the combined geany-plugins project (trunk/geany-plugins) to ease release and packagers' work. I maintain geany-plugins' build system, and would be happy to integrate your plugin into the said build system. :-)
On a side note, from a packager's point of view, you might like to add copyright headers to your source files, and perhaps provide an AUTHORS file as well.
In addition to this, you need a Sourceforge account for SVN write access. If you don't have one, just register there. Once you have a username, simply mail it to me and I will add it to the project so you get write access to the SVN repository.
Regards, Enrico
Enrico Tröger írta:
On Sat, 18 Jul 2009 05:19:42 +0800, Chow wrote:
On Saturday 18,July,2009 03:49 AM, Prim András wrote:
Hi all!
I wrote a plugin that embraces the selection in configurable text.
Cool!
I'd like to contribute it in the geany-plugins project. It still needs tidying and stuff. For example I tried to set different set of key bindings for different filetypes and dynamically change them when the user switches documents (so the same key combinations could be re-used) but now only those appear in the key binding setting dialog, which apply to the filetype visible at plugin_init() (However using the same key combination on different documents does work as expected.)
Best regards! András Prim
Sounds like a pretty cool plugin. If/when you bring it into the geany-plugins svn repository, I'd recommend that you add it into the combined geany-plugins project (trunk/geany-plugins) to ease release and packagers' work. I maintain geany-plugins' build system, and would be happy to integrate your plugin into the said build system. :-)
On a side note, from a packager's point of view, you might like to add copyright headers to your source files, and perhaps provide an AUTHORS file as well.
In addition to this, you need a Sourceforge account for SVN write access. If you don't have one, just register there. Once you have a username, simply mail it to me and I will add it to the project so you get write access to the SVN repository.
Regards, Enrico
Dear Enrico!
My sourceforge account is "tzunghaor"
On Mon, 03 Aug 2009 20:06:30 +0200 Prim András pa@primandras.hu wrote:
Enrico Tröger írta:
On Sat, 18 Jul 2009 05:19:42 +0800, Chow wrote:
On Saturday 18,July,2009 03:49 AM, Prim András wrote:
Hi all!
I wrote a plugin that embraces the selection in configurable text.
Cool!
I'd like to contribute it in the geany-plugins project. It still needs tidying and stuff. For example I tried to set different set of key bindings for different filetypes and dynamically change them when the user switches documents (so the same key combinations could be re-used) but now only those appear in the key binding setting dialog, which apply to the filetype visible at plugin_init() (However using the same key combination on different documents does work as expected.)
Best regards! András Prim
Sounds like a pretty cool plugin. If/when you bring it into the geany-plugins svn repository, I'd recommend that you add it into the combined geany-plugins project (trunk/geany-plugins) to ease release and packagers' work. I maintain geany-plugins' build system, and would be happy to integrate your plugin into the said build system. :-)
On a side note, from a packager's point of view, you might like to add copyright headers to your source files, and perhaps provide an AUTHORS file as well.
In addition to this, you need a Sourceforge account for SVN write access. If you don't have one, just register there. Once you have a username, simply mail it to me and I will add it to the project so you get write access to the SVN repository.
Regards, Enrico
My sourceforge account is "tzunghaor"
Added to project. You should be able to commit.
Thanks, Frank