[There is a question in here... scrub through to the end!]
This is very interesting!
Clearly, folks have a range of different tasks they need to accomplish and a range of different approaches for doing so.
In my case, what I'm currently doing is ridiculously simple compared to what some on the list are doing: I'm just editing a small number of files that make up "a website." I'm editing the files locally... the files are on a hard drive in a box that's right under my desk. But to complicate things, I want to be able to see how these files appear when served from a REAL web server (not just opened from my disk). Plus, I also want to know how they look from a Windows machine.
So... I've set up my next oldest computer (a G3) as a "server in my closet." This is my "test" deployment location.
Of course, I also want to deploy the files on a (external) "staging" server where my client(s) can check things out.
So, at minimum, I have stuff in three places that I (usually) want to be the same. When I started using TextMate, I was concerned about that lack of "ftp/sftp/ssh integration."
After I discovered and researched rsync (yes, consider me a newbie as regards The Power of the Command Line) and TextMate bundles, I'm suddenly no longer concerned about whether I can open a file "via ftp" FROM WITHIN TextMate. Or save it back from TextMate "to" the Internet.
On Feb 19, 2006, at 10:05 PM, Court K wrote, in part:
<snip> I mean who actually is editing files that ARE NOT going to end up on the internet? ... <snip>
As other's have mentioned, this is not *quite* the universal situation... for example, folks editing LaTeX are (I presume) mostly expecting to see the result in print; folks using TextMate to write screen plays are also (again, I presume) thinking in terms other than "web deployment."
The files I am editing ARE intended to go directly for the Internet. But still I feel no need for "built-in" ftp/sftp/ssh support in TextMate. In part this is because I'm always working with the same set of files and their location on the net is always the same. And no one else is editing them other than me.
So my Question:
What are folks doing that makes them want to see built-in ftp/sftp/ ssh support in TextMate? One situation I can imagine is the desire/ need to open many arbitrary files that are located in many arbitrary locations on the Internet. I don't have a good picture of when anyone would be needing to do that though. Are people doing that? For me, the files I want to edit are on my computer. Periodically they need to be uploaded to the net, but my editing sessions don't begin from copies that were on the net.
Just Curious! ;)
eo
Eric O'Brien wrote:
What are folks doing that makes them want to see built-in ftp/sftp/ ssh support in TextMate? One situation I can imagine is the desire/
While I don't want to see this (having Fugu is good enough[tm] for me), I still need to edit files which are (residing and used) on my linux box, and our admins won't allow a file server on that machine. So I edit with one keyboard, save and turn to the other keyboard for testing. Now if Fugu had an AppleScript interface to open a file known by path in the editor ... But I haven't checked the alternatives yet, so it can't be all that pressing.
Christopher
Le Thu 23/02/2006, Christopher Creutzig disait
Eric O'Brien wrote:
What are folks doing that makes them want to see built-in ftp/sftp/ ssh support in TextMate? One situation I can imagine is the desire/
While I don't want to see this (having Fugu is good enough[tm] for me), I still need to edit files which are (residing and used) on my linux box, and our admins won't allow a file server on that machine. So I edit with one keyboard, save and turn to the other keyboard for testing. Now if Fugu had an AppleScript interface to open a file known by path in the editor ... But I haven't checked the alternatives yet, so it can't be all that pressing.
I use Cyberduck which allows me to "edit a distant file" with textmate.
On 23 Feb 2006, at 12:18, Christopher Creutzig wrote:
While I don't want to see this (having Fugu is good enough[tm] for me), I still need to edit files which are (residing and used) on my linux box, and our admins won't allow a file server on that machine. So I edit with one keyboard, save and turn to the other keyboard for testing. Now if Fugu had an AppleScript interface to open a file known by path in the editor ... But I haven't checked the alternatives yet, so it can't be all that pressing.
Have a small shell script or alias that does
rsync -avz -e ssh mystuff user@server.example.com:/usr/local/apache/ htdocs
and keep a small terminal window open to run it in. If you register an ssh key with the server you won't have to authenticate every time.
Andy Armstrong wrote:
Have a small shell script or alias that does
rsync -avz -e ssh mystuff user@server.example.com:/usr/local/apache/ htdocs
No thanks. I'm not going to rsync around 28 Gig just because I have a couple of files scattered around in that tree I might want to edit in TextMate. Besides, my point was not that remote editing was in any way difficult to do (it isn't); the only thing missing is that right now I can't easily, *on my Linux box*, invoke TextMate on the Mac to open a file in the directory I happen to be in. (The script for that I posted a few days ago has problems with the AppleScript command timing out.)
and keep a small terminal window open to run it in. If you register an ssh key with the server you won't have to authenticate every time.
Fugu, Cyberduck etc. are much more comfortable in this regard.
Regards, Christopher
On 24/2/2006, at 10:39, Christopher Creutzig wrote:
[...] (The script for that I posted a few days ago has problems with the AppleScript command timing out.)
What you could do is ssh home and run an asynchronous shell script, which has the scp part as part of the mate -w part.
I.e. something like: ssh home 'osascript -e '''tell app "Terminal" to do script "{ mate -w /tmp/text && scp /tmp/text server:whatever; } &>/dev/null &"''
Allan Odgaard wrote:
I.e. something like: ssh home 'osascript -e '''tell app "Terminal" to do script "{ mate -w /tmp/text && scp /tmp/text server:whatever; } &>/dev/null &"''
Yes, that would do the trick. But I would really like to have something that would work regardless of where I'm coming from or where I'm editting. (without changing every instance of this script)
Jeroen.
On 24 Feb 2006, at 09:39, Christopher Creutzig wrote:
Andy Armstrong wrote:
Have a small shell script or alias that does
rsync -avz -e ssh mystuff user@server.example.com:/usr/local/apache/ htdocs
No thanks. I'm not going to rsync around 28 Gig just because I have a couple of files scattered around in that tree I might want to edit in TextMate.
rsync only transmits changes. That's the point of it.
and keep a small terminal window open to run it in. If you register an ssh key with the server you won't have to authenticate every time.
Fugu, Cyberduck etc. are much more comfortable in this regard.
That probably depends how much you like the shell. I find I use it in preference to the Finder quite often.
On 24/02/2006, at 13:56, Andy Armstrong wrote:
On 24 Feb 2006, at 09:39, Christopher Creutzig wrote:
No thanks. I'm not going to rsync around 28 Gig just because I have a couple of files scattered around in that tree I might want to edit in TextMate.
rsync only transmits changes. That's the point of it.
Yes, but I am sure he doesn't want all 28 gig on his local drive :-p. Of course rsync can easily be set up to effectively only sync in one direction and not delete files remotely, that are missing locally.
-- Sune.
I was actually surprised this feature wasn't / won't be available for TextMate. However, I'm not complaining! Just getting used to doing things *the right way*.
Here's my scenario:
1) I maintain 3+ legacy PHP applications, each with varying requirements. (i.e. PHP5 + a bunch of PEAR libraries. another, PHP4 only. etc)
Not being a great OS X sysadmin, I have been unable to successfully mimic all my live PHP deployment environments on my local box. 3 different apache's, three different PHP configs, different PEAR repos!?! It's just not my bag. So I mostly dev on the server when I have to.
I know this is poor programming style (as RoR has so elegantly shown me), but it's just the nature of the beast at this point. I'd be quite surprised if I were alone in this regard. (just wait until the win32 crew comes over to osx in mass exodus... you'll be quite amazed at the coding standards. *ahem*)
Has anyone used EditPlus on windows?
I'd consider it's FTP/SFTP integration ideal.
You can just click Ctrl-Shift-S and a menu pops up with a list of previously managed/saved FTP/SFTP sites. You can select the current default site / directory. Or select a different site. It's pretty slick if you've ever used it. It was definitely EditPlus' killer feature that made me use it for 4+ solid years of web programming on windows, and I'll still to this day recommend it to all my windows-bound friends. =)
Of course, TextMate gets all nods in the OS X world!
Shanti
Eric O'Brien wrote:
What are folks doing that makes them want to see built-in ftp/sftp/ssh support in TextMate? One situation I can imagine is the desire/need to open many arbitrary files that are located in many arbitrary locations on the Internet. I don't have a good picture of when anyone would be needing to do that though. Are people doing that? For me, the files I want to edit are on my computer. Periodically they need to be uploaded to the net, but my editing sessions don't begin from copies that were on the net.
I have a FreeBSD server in the closet that I try to manage. There it is sometimes useful to edit files. I do most small edits with vim, but once in a while you end up with a large (config) file that needs some big overhaul or back and forth glancing and editting. Then it would be nice to have a quick way of editting that file in TextMate and saving it directly back to the server. Either because it is easier to put it back directly, or so that I can test some settings and go back to editting and saving quickly.
There have been some proposed scripts/commands that use ssh and keys to go back and forth to TM with temporary files, but I'd rather have it as built-in so that it is a bit more robust.
Jeroen.
In article 43FE0396.8000600@je-ju.net, Jeroen van der Ham jeroen@je-ju.net wrote:
Eric O'Brien wrote:
What are folks doing that makes them want to see built-in ftp/sftp/ssh support in TextMate? One situation I can imagine is the desire/need to open many arbitrary files that are located in many arbitrary locations on the Internet. I don't have a good picture of when anyone would be needing to do that though. Are people doing that? For me, the files I want to edit are on my computer. Periodically they need to be uploaded to the net, but my editing sessions don't begin from copies that were on the net.
I have a FreeBSD server in the closet that I try to manage. There it is sometimes useful to edit files. I do most small edits with vim, but once in a while you end up with a large (config) file that needs some big overhaul or back and forth glancing and editting. Then it would be nice to have a quick way of editting that file in TextMate and saving it directly back to the server. Either because it is easier to put it back directly, or so that I can test some settings and go back to editting and saving quickly.
There have been some proposed scripts/commands that use ssh and keys to go back and forth to TM with temporary files, but I'd rather have it as built-in so that it is a bit more robust.
I suggest you try a good sftp client such as Fetch, Yummy FTP or Transmit. Connect to the server; click "Edit" on the file and viola! It shows up in TextMate, you edit it, and when you save it it is retransmitted. (You may have to tweak some settings; for example Yummy FTP offers several options for deciding when to save a file back to the server.)
It's easier than it may sound. I find it so convenient that I hardly edit anything locally on my unix boxes anymore.
Another option is to mount the unix volume remotely. Then you can open the file directly. We do that with samba; another option is nfs. The only trouble there is that MacOS X tends to clutter up the mounted directories with invisible files (which are harmless, but still...).
(And regarding an earlier poster who is synchronizing multiple sets of files: good sftp clients can do synchronization. If you mount the remote volume then built-for-the-task synchronization programs such as Synchronize! Pro X will also work.)
-- Russell
On 23 Feb 2006, at 18:48, Jeroen van der Ham wrote:
Eric O'Brien wrote:
What are folks doing that makes them want to see built-in ftp/sftp/ ssh support in TextMate? One situation I can imagine is the desire/ need to open many arbitrary files that are located in many arbitrary locations on the Internet. I don't have a good picture of when anyone would be needing to do that though. Are people doing that? For me, the files I want to edit are on my computer. Periodically they need to be uploaded to the net, but my editing sessions don't begin from copies that were on the net.
I have a FreeBSD server in the closet that I try to manage. There it is sometimes useful to edit files. I do most small edits with vim, but once in a while you end up with a large (config) file that needs some big overhaul or back and forth glancing and editting. Then it would be nice to have a quick way of editting that file in TextMate and saving it directly back to the server. Either because it is easier to put it back directly, or so that I can test some settings and go back to editting and saving quickly.
If it's a local server enable SMB or Dav and share /. Then you can just mount it's filesystem.
On Feb 23, 2006, at 12:51 AM, Eric O'Brien wrote:
What are folks doing that makes them want to see built-in ftp/sftp/ ssh support in TextMate? One situation I can imagine is the desire/ need to open many arbitrary files that are located in many arbitrary locations on the Internet. I don't have a good picture of when anyone would be needing to do that though. Are people doing that? For me, the files I want to edit are on my computer. Periodically they need to be uploaded to the net, but my editing sessions don't begin from copies that were on the net.
These are the thing I use TextMate for (with regards to remote files):
#1 Editing config files on *nix machines. #2 Making emergency edits of single files. #3 Developing projects on remote testing servers. ##3.1 ROR (ruby on rails) ##3.2 ASP.net
#1 & #2 Any good FTP app handles this perfectly. Lately i've been using Cyberduck (probly because of the icon ;) ).
#3.1: With ror, I have my local powerbook as my testing & development server. I can access it remotely from a windows machine to test IE specific stuff. I don't need any sort of FTP or anything for that.
#3.2: I have all my projects setup in SVN on a dreamhost webdav server. I have checkouts on my local dev machine and my remote staging machine and the live server. For major edits, I do all the changes on my local, commit changes and svn up on the stage. I used to use Transmit to handle major development, too. With transmit you can set a folder up so that as soon as you drag that file onto the textmate icon it'll upload it to the live server. I created a little command that did that from within textmate. That way you get the full benefits of developing on your local with the advantage of uploading directly to the live server with a single keystroke. For minor edits, see #2
To summarize: TextMate doesn't need FTP built in (for me). Cyberduck works perfectly for almost everything FTP/sFTP related. Transmit/SVN works perfectly for everything else FTP/sFTP related.
Others have proposed incorporating FTP/SFTP directly into the editor (ala bbedit) but I'd rather have an FTP program handle FTP and a text editor handle text editing. Never get the fish at a steak restaurant! Let each app be the best at what it does.
However! If we could get a simple way to run the mate command on a remote volume via SSH to edit a remote file with TextMate (simply hitting save to re-upload it) that would be a better method for #1 & #2.
I would much rather have dynamic scopes and better wrapped code indenting! (after that, sure, add whatever you want)
According to Eric O'Brien:
What are folks doing that makes them want to see built-in ftp/sftp/ ssh support in TextMate? One situation I can imagine is the desire/
I don't really care about it, I either use a distributed VCS such as Mercurial[1] to have copies *with history* for files I do really care about or I use Fugu/Cyberduck-kind of program.
----- [1] http://selenic.com/mercurial/