[TxMt] Using default editor on remote connections

Rob McBroom textmate at skurfer.com
Tue Oct 3 15:03:01 UTC 2006


On Oct 2, 2006, at 5:47 PM, Jerzy Gangi wrote:

> However, I find myself ssh-ing into servers around campus and I  
> can't use TM to edit files in the shell (since the EDITOR variable  
> is obviously local to my machine).  Is it possible in  
> my .bash_profile on remote servers to open files in my local TM?   
> This would be great...

I use Cyberduck to access remote files, which allows you to edit them  
in the application of your choice (similar to Fugu). On a related  
note, I like to use TextMate when I'm sitting at my Mac, but it  
obviously won't work if I'm logged in remotely, so I've got this in  
my .tcshrc:

   # Mac OS X specific stuff
   if ( $OSTYPE == "darwin" ) then
     setenv LC_CTYPE en_US.UTF-8
     # if logged in locally...
     if ( ! $?SSH_CLIENT ) then
       # use TextMate in place of vim
       setenv EDITOR /usr/local/bin/mate_wait
       alias vi '/usr/local/bin/mate'
     endif
   endif

I'm sure something similar is possible in Bash, but I don't know the  
syntax.

Rob



More information about the textmate mailing list