[TxMt] R request: tab moves through list when cursor in collection

Timothy Bates timothy.c.bates at gmail.com
Mon Apr 23 14:33:36 UTC 2007


Hi there,

Just playing with the R console mode. It's nice, so thanks to the writers!

I often want to edit collections (R lists), and it would be nice if tabbing
inside a collection had the action of moving the selection to the next item
in the list.

Would it be possible to write a command (to hard for a snippet, I think)
which takes over the tab key when there is no snippet bound to it, and
detects if the user is in a c(x,y,..) structure, and selects the next item
in the list? 

So if the cursor is in item 1 like this

> a = c(1|11,222)

Then hitting tab would move to highlight all of item 2. Preferably hitting
shift-tab would move to the next previous item, or in front of the
collection if already at the head.


PS: One thing that keeps me in R, is the useful last command function (like
in tcsh, hitting "up" and "down" scrolls through a command history,
replacing the current line. Is it possible to scan the doc, make a list of
lines, and just give this as a drop down menu when up is hit hit?





More information about the textmate mailing list