As a follow-up to the discussions about remote file editing, I wanted
to throw another idea out there. First of all, I think the ideal
solution is to have Mac OS X mount a remote directory in the Finder,
and then access that directory from TextMate as if it were on a local
volume. (After all, providing file access is the operating system's
job; TextMate shouldn't have to implement special support for it.)
I mentioned WebDAV before, and for editing files on a web site, it's
usually the best solution. Unfortunately, accessing remote files
outside of the web server's control is very difficult, sometimes
impossible, with WebDAV. For those cases, I've been resorting to NFS,
which Mac OS X also supports natively. However, NFS has always been
buggy in my experience, at least when accessing it across the Internet.
Luckily, Mac users have a third option: the Apple Filing Protocol, or
AFP. Although it's becoming obsolete in favor of less proprietary
standards, it doesn't suffer from the weaknesses of WebDAV and NFS.
Namely, it's not bound to a web server, and it has no trouble
mounting remote directories over the Internet. I've been using it to
edit remote shell scripts in TextMate with no problems.
Setting up AFP is very easy if your host system is Linux and you have
admin rights. You simply install the netatalk package [1] and start
the AppleTalk daemon. For instance, if you're running Fedora Core:
yum install netatalk
service atalk start
After that, you simply go the Finder, choose Connect To Server, and
enter afp://myserver. You can then enter your user name and password
to mount your home directory. More info about configuring share
points and enabling secure authentication is in the netatalk
documentation.
Anyway, I just wanted to mention that option for those of you who
want remote file access without having to rely on a third-party
utility or wait for SFTP support to be built-in to TextMate.
Trevor
[1] http://netatalk.sourceforge.net/
Howdy y'all. Wooo doggies!
I know a lot of people have talked about this in the past, but...
If you want to use TextMate through FTP, you can still use a project
window with tabs.
#1 Open up your FTP add (I've used Cyberduck and Transmit)
#2 Open a document from your FTP program into TextMate (cmd-j in the
duck)
#3 Find the temp folder that your FTP app uses to save the files
you're editing (the duck uses /var/tmp/folders.503/TemporaryItems/ on
my system)
#4 Open that folder in TextMate
#5 Close any FTPd files you're currently working on
#6 Open a document from your FTP program into TextMate (cmd-j in the
duck)
Your temp editing FTP files should now pop up as new tabs in textmate.
For extra slickness, you can save this project, stick the .tmproj in
your dock or something and be ready to go at a moments notice !!!!
yee haw!!!!
Enjoy ;)
(this really shouldn't come as news to anyone, but it was fun to feel
like a big know-it-all for a few precious moments)
((back to cruel intellectual mediocrity))
Hi all,
Just put this together and thought I'd share:
$TM_SELECTED_TEXT`echo "$TM_SELECTED_TEXT"|ruby -00 -pe
"gsub(/([._]|\W)(?:
(x)|(y)|(X)|(Y)|(width)|(height)|(w)|(h)|(Width)|(Height))/) { \$1 +
(\$2 ? \"y\" : \$3 ? \"x\" : \$4 ? \"Y\" : \$5 ? \"X\" : \$6 ?
\"height\" : \$7 ? \"width\" : \$8 ? \"h\" : \$9 ? \"w\" : \$10 ?
\"Height\" : \$11 ? \"Width\" : \"\") }"`
It will take, for example, something like this:
var xMin = (this.trap_mc) ? this.target_mc._x - bounds.xMin : 0;
var xMax = (this.trap_mc) ? this.target_mc._x + this.target_mc._width +
(this.trap_mc._width - bounds.xMax);
And append this afterwards:
var yMin = (this.trap_mc) ? this.target_mc._y - bounds.yMin : 0;
var yMax = (this.trap_mc) ? this.target_mc._y + this.target_mc._height
+ (this.trap_mc._height - bounds.yMax);
This is something I do by hand like, maybe 10 or 20 times in a coding
session. Anyone else have some useful additions (or a more elegant
regexp)? ;)
- Ben
___________________
Ben Jackson
Diretor de Desenvolvimento
ben(a)incomumdesign.com
http://www.incomumdesign.com
Anybody know any commands in Textmate that can remove all extraneous
whitespace from a HTML document like BBEdit's Formatting->Compact function?
I checked the tidy documentation but couldn't find anything. Strange, I
thought Tidy would have that one.
Quinn
I'm getting a digest of the topics here and suddenly (about 2 days
ago) I started getting every message posted here listed twice (in a
row) in the digest. Any one else having this problem? Any suggestions?
— oliver taylor
ollieman.net
Dear TextMate Users,
I use TextMate to deal with LaTeX documents.
To create the German format for quotations i have to write "`foo bar
"' (you have to move your nose very close to the monitor to see the
2nd character after the " character).
If I type the first " character a 2nd one appears. That's fine. Then
I type the the ` character. It will be completed with an ' char. The
results looks like "`'" . This is not what I want.
I would like to type the first " and want to get an "`'". What can I do?
Regards
Tukaram
Is there a workaround for this issue ? The XCode Bundle will not find
the active target on its own and complains with a huge tooltip,
basically dumping the entire hash of possibilities.
Am I restricted to projects with a single target ?
thanks
Ben
> Try this
>
> #!/usr/bin/perl
> local $/; # put Perl in "slurp" mode
> $text = <>; # read in the whole file
> $text =~ s/(\s+)$//mg;
> $text =~ s{((INT\.|EXT\.|I/E\.|int\.|ext\.|i/e\.)\s.*)$}{***$1}mg;
> $text =~ s/^([A-Z].*[A-Z)])\n^(\(.*\))\n(.+)$/\n\t\t\t\t$1\n\t\t\t$2
> \n\t\t$3\n/mg;
> $text =~ s/^([A-Z]{2,}.*[A-Z)0-9])\n(.*)$/\n\t\t\t\t$1\n\t\t$2\n/mg;
> $text =~ s/^[*]{3}(.+)$/\n$1\n/mg;
> $text =~ s/^(.*(IN:|UP:|TO:))$/\n\t\t\t\t\t\t\t\t\t\t$1\n/mg;
> $text =~ s/^(\w+.*(\.|\?|\!|\"|\-))\n\w+.*(\.|\?|\!|\"|\-)$/\n$1/mg;
> print $text;
Wow, thanks Dr. Drang! That worked perfectly. I'll be releasing the
bundle soon, and i'll be sure to let you guys know.
hi.
is there any reason, why the enhanced TODO-command is in the rails-
bundle and not, say, in the source- or text- or the todo-bundle?
(other than syncPEOPLE using it for rails)
niko.
--
____________________________
niko dittmann <ni-di(a)web.de>
____________________________
I often use Comment Line (Command-/) to add and remove comments. I
noticed that if I have a shell script snippet like this:
# Comment
then Comment Line removes the comment. But if the snippet looks like
this:
#Comment
then Comment Line adds yet another comment ("# #Comment"). Is this a
bug? I checked the Ruby code for the command in the Bundle Editor but
I didn't see anything wrong.
Trevor