Getting this going in textmate would be awesome! It’s great in R.app to be able to tab and get deeper and deeper into complex objects…
To do this in Textmate, you don't want to scan the source: the object names are not necessarily exposed there
What would be needed is a command that when it gets
object$→
would call names(object) and return that completion list (via applescript, I think is the only API)
likewise object@→ calls slotNames(object)
Something like this might also give you a head start…
http://yihui.name/en/2010/08/auto-completion-in-notepad-for-r-script/
It’s for function completion (which i have switched off in the default R.bundle because it’s too laggy)
Getting a non-laggy version of function parameter completion would rock!
t
On 29 Dec 2013, at 06:42, Ross Ahmed rossahmed@googlemail.com wrote:
What language could I use to scan the source? Could you give some indications of what code should look like and where it should be placed within TextMate?
On 19/12/2013 04:12, "Allan Odgaard" mailinglist@textmate.org wrote:
On 24 Nov 2013, at 20:18, Ross Ahmed wrote:
In R.app on Mac OSX, pressing tab after an object name and dollar sign will list all variables contained within that object [Š] Is it possible to mimic this behaviour in a .R file in TextMate?
Not without writing code to scan your source and produce a list of the variables contained in the object.
Though if you have code to do this, setting up tab to insert that as a completion list (snippet) when tab is pressed and is to the right of an object is fairly simple.
_______________________________________________ textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
_______________________________________________ textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate