[TxMt] Ability to set selection from a command
Allan Odgaard
throw-away-1 at macromates.com
Fri Nov 4 03:28:30 UTC 2005
On 03/11/2005, at 22.31, Matthew Gilbert wrote:
> I have frequently wanted the ability to replace some text in the
> current document and set the selection through a command. Is this
> possible? I can easily replace the entire document, but setting the
> selection eludes me.
What can be done is instead use a macro. A macro can get the same
command functionality (insert snippets etc.) using Text -> Filter
Through Command…
That said, the need to somehow make a selection pre-executing a
command is definitely useful. I'm toying a little with the thought of
having commands specify what “unit” they work on, like word, line,
paragraph etc. -- that's how I do for the build in stuff. But it
might be more flexible just to have the command itself do the
selection via a (future) scripting interface.
> In addition, I'd like access to the column number along with the
> line number. I didn't see this as one of the exported environment
> variables.
It's TM_COLUMN_NUMBER
More information about the textmate
mailing list