[TxMt] Edit remote file via SSH

Methnen (AKA Jamie) jamie at methnen.com
Tue Jan 10 07:53:51 UTC 2006


On Jan 9, 2006, at 11:39 PM, Simon Dorfman wrote:

> Here's what I'd like to do:
> On my webserver, I'll edit my .bash_profile to include and alias  
> for 'mate'
> to a shell script.  The shell script will do the following:
> 1. secure copy the argument file to my local tmp folder
> 2. open the the local tmp file with 'mate -w'
> 3. once I finish editing the file in TextMate and close it, secure  
> copy the
> new file to replace the file on the webserver

Interesting idea.  The main issues I can see would be for the bash  
script to somehow know that TextMate had finished editing the file,  
and for the script to somehow send the file to your local system for  
the editing...  The rest would be relatively easy to do in bash.

....after looking at the help on the mate command it looks like  
something like this would be very possible if the hurdle of getting  
the file to and from the local system.  The mate command can wait  
until TextMate is finished with a file before continuing.  This would  
make it trivial for the bash script to them simply continue when the  
file is finished with.

I'm a bit busy right now but if you want to wait a few days I might  
have time this weekend to write something but I'm not sure I know  
enough to get around the local system versus remote system thing...

> Any other ideas for accomplishing the same goal (edit remote files  
> with
> TextMate) are also welcome.

Well Transmit always works and is what I use most of the time.

Jamie

_______________________________________________________________________
Email: jamie at methnen.com
Homepage: http://www.methnen.com

"And I always go to pieces.  And I have it in my mind, that the sky is
tall and heavy, when I could be brave."
-Karen Peris (Brave)

"I want to find where the maid in the street is pouring her wine,
I heard she takes you in and gives you the words you need said.
If you'll be her brother, she'll kiss you like a sister.
She'll even be your mother, for now."
-Matt Slocum (Sister, Mother)

"And we are drowned."
-Annie Dillard (Tickets For a Prayer Wheel)
_______________________________________________________________________





More information about the textmate mailing list