Hi, great Tinn-R team,
I really like the improved Data Completion feature, with the CTRL+Space shortcut. It works almost always correctly inside list objects (after the dollar sign), and inside function call parentheses. However, I still miss the quite common feature of other IDE's (e.g. Visual Studio, or Borland Delphi) for variable name completion at the "global" level. By this I mean, for instance, you may want to complete the name of a variable/function/object which resides in the GlobalEnv, or even the "base" environment... especially when names are long or complex to type... or to remember entirely.
I've noticed the nice utils::apropos(...) function, which finds all object names partially fitting with the given string, which are accessible from the current environment (Global, base, etc.). So, there's my suggestion: could you enhance the Data Completion feature by displaying the results of apropos([text around the cursor in Tinn-R Editor]) over the Editor window, with the same graphical object as for other completion tasks? I think that would be quite simple to implement. You'd just have to add, maybe, a protection to prevent too long lists to show up (which may happen if the user strikes CTRL+Space when the cursor is on a very short word like "e" for instance).
You may even enhance the displayed lists by drawing the text while highlighting or making bold the found text within... (but this is far less important; just an extra, aesthetic mostly). This could be done very easily by calling apropos(what=[text], where=T) to get the location of the substring within each result.
(The only completion that would still be missing would, then, be the object names within the code of functions. But I understand well and accept this limitation, as R is more a progressively interpreted language, compared to the lower-level programming languages such as C++. And I think it would be quite laborious for you to program a feature which reads & parses & extracts object names from the current function where the cursor stands.)
So, how do you find my suggestion? Do you think it's possible to add it to Tinn-R soon?
Thanks, and have a nice week!
Marc