On 2 Apr 2007, at 08:36, Hans-Joerg Bibiko wrote:

would it be possible to set a selection in the current document by using a tmCommand?


This can be done in a command by taking the entire document as input and outputting the entire document as a snippet, wrapping the selection you want in ${0:…}, however this is bad because since the entire document is being replaced the TM parser has to rescan the entire file. If you know you only need to select on the current line then you can use just that for input/output which would be more efficient.

Ideally you would use a macro to do such things, if it is possible.