[TxMt] Re: rmate custom commands?
Jose Luis Canciani
textmate at jluis.com.ar
Mon May 13 10:29:23 UTC 2013
> […] it might be easier to create new commands that use ‘ssh «server»
«command»’ to execute «command» on «server».
I thought of it, but since I want to use it to browse code and jump from
one file to the next, the new ssh command was slow since it required a new
connection (some seconds every time I wanted to avoid). So I thought that
if Textmate already had a working connection, then why couldn't we take
advantage of it.
On Sun, May 12, 2013 at 11:51 AM, Allan Odgaard <mailinglist at textmate.org>wrote:
> On May 12, 2013, at 10:17, Allan Odgaard <mailinglist at textmate.org> wrote:
> > On May 9, 2013, at 9:59, Jose Luis Canciani <textmate at jluis.com.ar>
> >> […] I'm interested in sending commands to execute: for example I would
> want to be over a class name and with a key combination send something like
> "run\r\n"+ "/find/and/send/to/rmate MyClass", so rmate will run this as an
> OS command. […]
> > […] it might be easier to create new commands that use ‘ssh «server»
> «command»’ to execute «command» on «server».
> Come to think of it, many of the standard bundle items will optionally
> read the command from an environment variable and we can set these for the
> (virtual) server path in ~/.tm_properties, for example if we add this:
> [ /home/** ]
> TM_RUBY = 'cat'
> Then opening a file on your server under /home (via rmate) will have
> TM_RUBY set to ‘cat’ meaning the ruby bundle will use ‘cat’ instead of
> ‘ruby’ for the various actions like Validate Syntax, Run, etc.
> Presently though we mostly treat variables as a single command, meaning if
> we set TM_RUBY to ‘ssh «server» ruby’ then it will not be shell-expanded
> but instead treated as a single executable name.
> This is something I think should be changed, as I ran into same issue with
> the C/C++ bundle, where I changed the default TM_GCC variable to ‘xcrun
> clang’. Escaping the variables was so the user wouldn’t care about special
> characters, but in retrospect, it limits the possibilities.
> I should add that in the current build it might not work to set variables
> for the virtual server path (in ~/.tm_properties). It will however work in
> next build.
> If this is a viable solution though then it might be better to introduce a
> custom scope for files opened via rmate, that’s more robust to target.
> textmate mailing list
> textmate at lists.macromates.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the textmate