Dear all I've been using the R parser that generates a list of functions in the current document and displays them in Symbols sidebar. Is it possible to configure Geany (via an action, c-menu item or similar) to select a given R function (listed in Symbols), preparing it for instant re-definition (using ctrl+r, here)? I am not sure how symbols/parsers work, so would this depend on the R parser or on the Geany interface?
Thank you Liviu
Le 04/08/2010 17:17, Liviu Andronic a écrit :
Dear all I've been using the R parser that generates a list of functions in the current document and displays them in Symbols sidebar. Is it possible to configure Geany (via an action, c-menu item or similar) to select a given R function (listed in Symbols), preparing it for instant re-definition (using ctrl+r, here)? I am not sure how symbols/parsers work, so would this depend on the R parser or on the Geany interface?
Thank you Liviu
Hi,
AFAIK the tag parser (which is the source of the symbols) don't store the end position of a tag, no matter which language is used.
This said, it would be probably possible to do some hacks in order to achieve this -- at least with languages that doesn't support out-of-functions instructions -- even if I don't know R on my own. Basically I think of finding the next symbol start position (quite easy), which then gives the range of the symbol you want. Then even some further hacking may be done to strip whitespaces and/or comments at the end of the range which are likely to refer to the next symbol; and I think this could be achieved in a quite accurate way. It's hackish, yes. But perhaps -- if you know C -- you could try to write a little plugin that does it.
Regards, Colomban
On Wed, 04 Aug 2010 21:59:29 +0200 Colomban Wendling lists.ban@herbesfolles.org wrote:
I've been using the R parser that generates a list of functions in the current document and displays them in Symbols sidebar. Is it possible to configure Geany (via an action, c-menu item or similar) to select a given R function (listed in Symbols), preparing it for instant re-definition (using ctrl+r, here)? I am not sure how symbols/parsers work, so would this depend on the R parser or on the Geany interface?
AFAIK the tag parser (which is the source of the symbols) don't store the end position of a tag, no matter which language is used.
True, but if the syntax highlighting supports folding and the function's first line is a fold point, then Scintilla knows the line with the end point of the fold.
So perhaps adding a 'Select current fold range' keybinding would work (that looks at the current line then steps backwards until it finds an opening fold point).
Regards, Nick