Hi,
Is there any way to replace tool tip output with Growl[1] for the svn
bundle?
Tool tips are the only "non-sticky" output, but they are so non-
sticky that I sometimes cant read them at all. If the cursor is not
at the right place (99% of the time as I use a tablet pen), this is a
real nightmare.
I can't find a way to catch the output of the command, if I could I'd
send it to Growl thru growlnotify (Shell) or Ruby-Growl.
So my questions are:
1) How can I catch the output of svn commands?
2) More generally, wouldn't it be nice to add Growl to the output
options? What do you think Allan?
For those who don't know it:
Growl is a central notification system for Mac OS X.
It's free and released under BSD license.
What is nice is that you can configure how notifications will look,
if they are sticky, etc. per applications. Applications can access it
through Cocoa and Carbon API or Applescript, Ruby, Perl, Java, TCL,
Python, Shell, etc.
Here are some scrennshots[2] and the huge list of apps using Growl[3]
[1]: http://growl.info/
[2]: http://growl.info/screenshots.php
[3]: http://growl.info/applications.php
--
FredB
I'm interested how it would be possible to create an autocompletion
plugin/bundle for Textmate and ruby. I realize there is ESC, but I
would like to open a menu with say CTRL-SPACE and then see all the
possible completions based on the entered characters. Then when I
continue typing in the editor, the menu adjusts it's contents to show
only the matching entries. The user can navigate the menu and choose
an entry to be inserted in the editor. Like auto completion in
eclipse, Visual Studio or XCode.
I found this article:
http://macromates.com/blog/archives/2005/06/09/code-sense/ and wonder
what the actual state of code sense is in Textmate. Is it possible to
create a Plugin/Bundle that controls an auto completion menu?
Ruben
I am new to TextMate. I have a bunch of lines and I am trying to sort
them. I select them and use the Actions popup and choose Sort from
the menu choices under Text, the text to be sorted disappears.
I tried to run the Sort command through the Filter through command
and got the same result. Empty document.
I am sure that my newbieness is showing through but can somebody
please figure out what exactly is wrong?
Indro
I take class notes on my laptop in Markdown and organize them in a
locally-hosted blog. Last week was the first week I used TextMate
instead of BBEdit for this, and I was occassionaly getting an extra
level of indentation while typing in code blocks. For example, in one
section of my notes I typed this:
| #include<vector>
|
| vector<int> v; // vector of zero elements
| vector<int> v(250); // vector of 250 elements, initialized to zero
| vector<time24> t(10); // 10 elements, all set to 00:00
Each line is indented by four spaces (the pipe characters are meant to
represent the left margin), which Markdown will wrap in <pre> and
<code> tags. I have TM (version 1.5 [906]) set to use soft tabs of 2
characters each.
I found that hitting the Return key after each of these lines (other
than the blank one) would put the cursor on the next line with an
indentation of 6 spaces instead of 4. This may be a red herring, but
the extra indentation seemed to occur only after lines that had an
angle-bracked pair, like <xxx>, in them. So in this excerpt
| #include<iostream>
| #include<vector>
| #include "d_random.h"
| using namespace std;
the extra indentation occurred after the first two lines, but not
after the second two.
Can anyone tell me why this is happening and what I can do to fix it?
--
Dr. Drang
Hi all,
I have come across an interesting conundrum that I wonder if anyone
else has dealt with.
(it goes without saying that I am now a tm fanatic and don't know how
I lived without it).
I am starting to work with Symforny -- a php5 framework. I have a tm
project for my sf project, but have discovered that the existence of
the ._files is interfering with the execution of the symfony command
(ie it sees ._schema..xml as "empty" and does not use the correct
schema.xml file).
I found 19.4 in the manual, and I want to know if that is my only
option -- I would rather not sacrifice metadata.
Thanks,
--
dc
-----
David Clark
Web Specialist
Institute for Community Inclusion (http://www.communityinclusion.org/)
david.clark(a)umb.edu
(617) 287-4318
Hi -
Using TM v.1.5 (906), I selected Terminal Usage... from the Help menu. I
got a message window titled "Enhanced Terminal Usage" which explained
about the shell command "mate" and asked where to create a symlink. I
left the default location as /usr/bin and clicked then "Create Link"
button. The standard admin user authentication box pops up, I enter the
secret password. Then I get a error message box that says:
Couldn't Create Link
Creating the link "/usr/bin/mate" failed with the following reason:
Operation not permitted
Hmmm. I check to see if mate is in /bin. Nope. Okay let's check /usr/
bin. Ahh a symlink but not a valid one. The link is /Users/aurora/
Desktop/TextMate.app/Contents/Resources/mate. The correct link should
be /Users/aurora/Desktop/TextMate/TextMate.app/Contents/Resources/mate.
Which in turn is a symlink to ../SharedSupport/Support/bin/mate where it
truly is. So, I deleted the bad symlink at /usr/bin and recreated it
properly. After a rehash, where mate shows it at /usr/bin/mate. And mate
-h returns help as it should.
Conclusion: whatever process or command within Textmate that created the
original (bad) symlink in /usr/bin needs to get tweaked to add the
TextMate bundle (Textmate) into the source file name. The Textmate app
name (TextMate.app) is fine, but both are needed.
Hope this helps,
Brian Caldwell
A very minor issue, but if I use the symbol transform to place a \n
in the output for the symbol, TextMate insta-quits when I load up a
file using that language.
The specific example that crashes for me:
{ showInSymbolList = 1;
symbolTransformation = '
s/([a-zA-Z_.:]+)[.:]([a-zA-Z_]\w*)/$1\n $2/g
';
}
Like I say, very, very minor - I would have been surprised if the
symbol had actually displayed on multiple lines.
Hello,
I've committed a working version of my Mercurial bundle to the Svn
repository. There may be some rough edges (like troubles if hg is not in
your PATH) but I'll fix these soon.
Thanks to the Darcs/SVN bundles authors for inspiration. :)
Enjoy!
--
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto(a)keltia.freenix.fr
Darwin snuadh.freenix.org Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005
Hi,
I frequently need to do a complete compilation, i.e. latex, bibtex,
latex, latex to update the references in the document - Using
existing bundles, latex+view, bibdesk, latex+view, latex+view I need
to click away upcoming error messages and Texniscope several times
throughout such a procedure. Has anyone a more elegant solution ? I
have to admit that my scripting abilities are not sufficient to make
my own bundle that could do that.
Christof
Hello,
I just have one suggestion for your otherwise beautiful text editing. Can
you please make code folding to display also an end tag of the block. Now
when the code is folded I can see "if {..." but the end tag is not visible.
I think it should display even the terminating "}", like "if {...}" or
"<hr>...</hr>".
Not seeing the terminating tag makes the document with folded code simply
unreadable, especially if the document is big and there is lots of code
folded. I am always searching for where the end of my block was gone.
Maybe it is only me, but I found it very confusing. Can you please fix/adapt
it? And if it's only me, it would be nice to have preferences for it, only
for me :)
Thanks,
Daniel
I really like the TODO bundle... however, something I think might be
useful.
I want to export the todo list to a file called "TODO" in the root
directory of the project. How can I accomplish this?
Eric Coleman
I'm trying to play with symbol list definitions, and things aren't
working for me.
I've created a language to play with:
{ scopeName = 'source.gk';
fileTypes = ( 'gk' );
patterns = (
{ name = 'heading';
match = '^((=+) (.+) \2)\s*$';
captures =
{ 1 = { name = 'heading.gk'; };
2 = { name = 'heading.depth'; };
3 = { name = 'heading.title'; };
};
},
);
}
And a source file that matches it:
= Heading 1 =
== Heading 1.1 ==
It's the end of the world as we know it, and I feel fine.
* And this
* Is wh a...z t I mean
...and there we go
== Heading 1.2 ==
= Heading 2 =
Using colorings in my own Theme, I can tell that the scope "source.gk
heading.gk" is being applied to the headings. Now I want them to show
up in the symbol list.
I've created a new Preferences part in the bundle:
/* preferences */
{ showInSymbolList = 1; }
and set the scope for that Preference to "source.gk heading.gk".
Unfortunately, nothing shows up in the Symbol list.
If I quit and restart TextMate, the contents of the Preference are
unchanged. (I noticed that if I put bad syntax into this preference
and quit/restart, the change doesn't stick. It would be nice if there
was a better way to "Test" if the preference is valid or not.)
I'm using Version 1.5 (906) under MacOS X 10.4.5. I can send a full
dump from System Profiler if the above does not explain why symbols
aren't working for me.
I've been using the TODO bundle and find it useful. Thanks.
Note that a checkout of the TODO bundle (from the repository) also
> require a checkout of the Support directory.
>
Uh, sure. I have Subversion and can update the bundles in
/Library/Application Support/... but how do I check out part of the app?
>From where? To where?
A little help for a Subversion novice would be appreciated.
Hi
The updated TODO works very nicely on osX 10.4 (my computer at home).
However, at work im using osX 10.3.9 (still waiting for the upgrade!).
I updated the bundles this morning and now when I run TODO I get:
/Library/Application Support/TextMate/Support/lib/textmate.rb:3:in
`require': No such file to load --
set (LoadError) from /Library/Application
Support/TextMate/Support/lib/textmate.rb:3 from /tmp/
temp_textmate.3IDEea:3:in `require' from /tmp/temp_textmate.3IDEea:3
Anyone got any ideas?
Stephen
Hey Allan,
Did you see that TM is recommended fo RoR development on ADC?
http://developer.apple.com/tools/rubyonrails.html
"Finally, we recommend that you download and install the 30-day trial
of TextMate to use throughout this tutorial. It's the editor of
choice for Rails developers on Mac OS X."
Nice.
--
FredB
I have started making use of the 'Run Script' feature for ruby files I'm
editing. All works fine and then I start to get this error:
/Applications/Tools/TextMate/TextMate.app/Contents/SharedSupport/Bundles/Ruby.tm bundle/Support/tmruby.rb:115:in `sub': wrong argument type nil
(expected Regexp) (TypeError) from
/Applications/Tools/TextMate/TextMate.app/Contents/SharedSupport/Bundles/Ruby.tm bundle/Support/tmruby.rb:115
Quitting and restarting TM bypasses the problem, but it would be good to
have it fixed! I'm on OS X 10.4.5, I'm willing to provide more info if
that helps...
Thanks in advance
- Jonathan
>From: Charilaos Skiadas <cskiadas(a)uchicago.edu>
>> Any insight greatly appreciated (and apologies if this is an
>> inappropriate post for the forum)
>
>I'd say it's very appropriate for the forum. The problem is I think
>that TextMate does not do multiline matching in the syntax, so none
>of these is going to work I'm afraid. Can't see a way out of this,
>unless of course you have the luxury of placing an empty line before
>the next >, and then matching that in foldingStopMarker.
>
>Haris
>From: Timothy Bates <timothy.c.bates(a)gmail.com>
>I had exactly this problem without output from our matrix package.
>
>My solution was to pre-process the output with a find-replace macro.
>
>The macro finds the taglines, and replaces them with "end\n($1)"
>
>That way, each block is wrapped in <tagline>...<end>
>
>Then the folding is trivial.
Thanks to both Haris and Timothy for replying so quickly to this....I
guess not having multiline matching in the syntax explains
it...thought I was going nuts!
The workaround as suggested by both was to preprocess the sequence
files (iterating over the entries using simple BioPerl - I'm pulling
the data on the fly from a RDMS anyway) and add a tab to the end of
each FASTA record...this tab is both invisible and unique to the end
of each entry and everything collapses as I want...
BTW, not only is TextMate amazing for programming/markup etc, it is
also awesome for bioinformatics analysis...I use v. large genome
datasets (flat file and RDMS) with scripting the primary mechanism of
retrieving/analyzing the data...I used to use NEdit but have ported
everything over to TextMate...using column selection, I can push
fields (like sets of gene names) as input to perl/shell scripts that
query the db and return the data formatted and highlighted...am
finding new stuff to do with it every day...
This patch fixes a problem with the Perl syntax where if you have a
function called 'submit', each call will appear as a function
declaration (sub mit).
Index: Bundles/Perl.tmbundle/Syntaxes/Perl.plist
===================================================================
--- Bundles/Perl.tmbundle/Syntaxes/Perl.plist (revision 2795)
+++ Bundles/Perl.tmbundle/Syntaxes/Perl.plist (working copy)
@@ -99,7 +99,7 @@
</dict>
</dict>
<key>match</key>
- <string>^\s*(sub)\s*([-a-zA-Z0-9_]+)\s*(?:\((.*?)\))?</string>
+ <string>^\s*(sub)\s+([-a-zA-Z0-9_]+)\s*(?:\((.*?)\))?</string>
<key>name</key>
<string>meta.function.perl</string>
</dict>
--
pgp fingerprint: BC64 2E7A CAEF 39E1 9544 80CA F7D5 784D FB46 16C1
-----Original Message-----
From: "Benoit Gagnon"<b.gagnon(a)gmail.com>
Sent: 25/02/2006 07:49:51
To: "TextMate users"<textmate(a)lists.macromates.com>
Cc:
Subject: Re: [TxMt] TODO List
On Feb 25, 2006, at 2:28 AM, Soryu wrote:
> Hi,
>
> in an attempt to do some ruby I have revamped the TODO list command
> again, completely. It's now written in Ruby using ERB with a template.
>
> It removes a bug from the older TODO comment which would descend
> into subdirectories for non-project files. So if you had a file
> in / and invoked the TODO command it would scan your complete Volume.
> It sorts according to TODO/FIXME/CHANGED categories
> and numbers the items, so you see how much work there is still
> todo :)
>
> Soryu.
Looks nice with a single file open, but fails with a "too many open
files" error with my entire project open.
Here's the error:
/tmp/temp_textmate.mqBVat:12:in `pwd': Too many open files - getcwd
(Errno::EMFILE) from /tmp/temp_textmate.mqBVat:12:in `scan_file'
from /tmp/temp_textmate.mqBVat:27:in `scan_file' from /tmp/
temp_textmate.mqBVat:26:in `each' from /tmp/temp_textmate.mqBVat:
26:in `scan_file' from /tmp/temp_textmate.mqBVat:27:in `scan_file'
from /tmp/temp_textmate.mqBVat:26:in `each' from /tmp/
temp_textmate.mqBVat:26:in `scan_file' from /tmp/temp_textmate.mqBVat:
27:in `scan_file' ... 7 levels... from /tmp/temp_textmate.mqBVat:
26:in `scan_file' from /tmp/temp_textmate.mqBVat:39 from /tmp/
temp_textmate.mqBVat:38:in `each' from /tmp/temp_textmate.mqBVat:38
______________________________________________________________________
For new threads USE THIS: textmate(a)lists.macromates.com
(threading gets destroyed and the universe will collapse if you don't)
http://lists.macromates.com/mailman/listinfo/textmate
Hi,
This is not a TextMate problem...rather a user issue but would
appreciate any advice...
I'm trying to set up folding...the file format look like this (FASTA
DNA sequence format) -
>text
agagagtttttttttt...(typically 60chars)
...multiple lines of above, number of lines varies per record
>text2
agagagtcgtttta
.
.
.
Setting foldingStartMarker is easy i.e; (^>) but it's
foldingStopMarker whcih is proving to be tricky.
As I see it, need to match the last line immediately before a new
entry denoted by ^> .
I figure a look-ahead assertion regex is required...something like -
[AGTCagtc]+ # match any string of ACGT
(?=\n^>) # positive look ahead for new line followed by >
But can't get this or numerous minor variants to work at all...
Any insight greatly appreciated (and apologies if this is an
inappropriate post for the forum)
First of all, I love TextMate. It's worth the price of a Mac just to
have such an awesome editor at one's disposal.
With that said, I have a feature request. ;-)
It would be nice if the function dropdown could be relocated to the
top of the window. CodeWarrior had its function dropdown up at the
top. BBEdit has it up there and XCode has it up at the top too.
It's more familiar to have it at the top. Second, and more
importantly to me, having it at the bottom often causes me to
overshoot with my mouse and end up in dock territory. If you have
dock magnification turned on, then you know what happens next.
It would be nice to have a configurable layout so that the UI widgets
could be tailored to one's individual preferences.
Charles Laine
claine(a)mac.com
The day Microsoft makes a product that doesn't suck is the day they
make a vacuum cleaner.
Hi there,
I'm posting here because I don't know if this has to be classified as
a bug and/or if someone has a possible solution for me....
Whenever I'm pressing the "filetype" switchbar at the bottom of the
screen, TM crashes. The weird part is, it worked allright before.
I tried switching to another local user. Textmate didn't crash while
at the other users account. I thought it had something todo with the
usersettings, so I tried deleting the com.macromates.textmate.plist
file from the ~/Preferences folder. To no avail.
Does anyone know what i could try next to get things running smoothly again ?
Thanks in advance,
Max
--
http://DLmax.org
On Feb 25, 2006, at 10:29 AM, textmate-request(a)lists.macromates.com
wrote:
> You don't need to use a webserver to run PHP. It comes with a
> standalone command line app, rightfully called "php". It will take
> stdin, output to stdout, and do all these things you cannot do in a
> web server / client browser scenario.
>
> ben
That sounds really great, I wish I knew how to do that.
This might be a dumb question, but is there ANY elegant solution for
keeping my Subversion repository in sync with my local files
*including* adding files, deleting files, renaming files? I'm really
trying to get religious about keeping all my projects under version
control, but I find it such a pain in the arse to have to remember to
do svn add, svn delete, svn rename whenever I decide to reorganize my
project files. In every project I do, I always get to a point about
halfway in where I say -- okay, this is messy -- let's combine these
files, delete this one, and rename these more descriptively. Then my
SVN repository gets all out of whack and refuses to let me make
anymore commits, and that's the end of version control for that
project. Happens every time.
Ideally:
It would be so nice if I could sync my TM project to my SVN
repository directly. If I rename something in the drawer, it gets
renamed in the repository too. Delete files? Add files? Same
thing. Is there some way to do this already? If not, how do you
guys handle this issue? And if not, any chance of adding this
functionality in a future release? Could a bundle be created to do
this?
Sean
:::: DataFly.Net ::::
Complete Web Services
http://www.datafly.net
Hi,
in an attempt to do some ruby I have revamped the TODO list command
again, completely. It's now written in Ruby using ERB with a template.
• It removes a bug from the older TODO comment which would descend
into subdirectories for non-project files. So if you had a file in /
and invoked the TODO command it would scan your complete Volume.
• It sorts according to TODO/FIXME/CHANGED categories
• and numbers the items, so you see how much work there is still todo :)
Soryu.
One thing I liked about vim was the continuation of the "*" down the
same column for each line in a block comment. So something entered
like:
(* Hello!
Blah
would be formated to:
(* Hello!
* Blah
I implemented this in the O'Caml language by changing the block
comment language rule to:
{ name = 'comment.block.ocaml';
begin = '\((\*.*)\)?$';
end = '\*\)';
beginCaptures = { 1 = { name = 'comment.block.ocaml.begin'; }; };
},
And adding two snippets for the return key: One for the scope
comment.block.ocaml.begin that would return, space in, and add a "* ".
One for comment.block.ocaml that would only return and add a "* ".
Xefore I charge off and add this for C, is this the best way to
implement this feature? Or am I missing an easier way? I've attached
the two snippets and language syntax for O'Caml if anybody would like
to try ti.
--
-Corey O'Connor
Forgive the ignorance...
perl -pe '
s/"/\"/g;
'
This there any reason that the above wouldn't work? I'm guessing it
has to with the "-pe" options (which I know nothing about).
I'm working on a bundle command (see below) that converts a plain-
text document (screenplay) to a PHP file for conversion to PDF via
FPDF (http://www.fpdf.org). Everything is working just fine except
for two things I just can't figure out--for the record, this code was
given to me by Allen for an HTML conversion and I've repurposed it
for this.
The first problem I'm having is with the very last line of code. The
idea is to get safari to open the generated document in Safari and
process it as a web-page. Because $DST seems to output the file-path
I can't just have it open "http://localhost/example.php", which is
what I want. How do I do that? Is it in the manual, 'cause I missed
that part.
The second question is regarding the 19th line of code:
$this->Cell(5.5,.18," XXXX ",0,0,'L',0);
I want to know if there is a way to define the "XXXX" bit in the
document itself with something like:
$header = example
How would that be done?
Thanks in advance, you guys are really helping make this bundle kick
butt.
-------------------------------
# first figure out a name for the result
NAME="${TM_FILENAME:-untitled}"
BASENAME="${NAME%.*}"
DST="/Library/WebServer/Documents/$BASENAME"
# everything we output within { … } is written to the PHP file via
redirection (see line with the })
{
# first output PHP header
cat <<HEAD
<?php
require("fpdf/fpdf.php");
class PDF extends FPDF
{
//Page header
function Header()
{
//Move to the right
\$this->Cell(5.5,.18," XXXX ",0,0,'L',0);
//Title
\$this->Cell(.5,.18,\$this->PageNo(),0,2,'R',0);
\$this->ln(.32);
}
}
\$pdf=new PDF("P","in","Letter");
\$pdf->SetMargins(1.5,.5,1);
\$pdf->AddPage();
\$pdf->SetFont("Courier","",12);
HEAD
# then PHP body (converted from document)
perl -pe '
s/"/\\"/g; #escape quotes
s/\/\/(.*)\/\/|^\/\/(.*)//g; # strip out non-printing comments
s/^(\t{4})([^\t].*)$/\$pdf->Cell(2);\$pdf->MultiCell(0,.18,"$2",0,L,
0);/g; #characters
s/^(\t{3})([^\t].*)$/\$pdf->Cell(1.5);\$pdf->MultiCell(1.5,.18,"$2",
0,L,0);/g; #parenthetical
s/^(\t{2})([^\t].*)$/\$pdf->Cell(1);\$pdf->MultiCell(3.5,.18,"$2",
0,L,0);\$pdf->ln();/g; #dialogue
s/(\t{10})([^\t].*:)/\$pdf->Cell(4);\$pdf->MultiCell(2,.18,"$2");\
$pdf->ln();/g; #right-transitions
s/^\w+.{2,20}:\s*$/\$pdf->MultiCell(0,.18,"$&",0,L,0);\$pdf->ln();/
g; #left-transitions
s/^(\w|\.|\[|\-).*$/\$pdf->MultiCell(0,.18,"$&",0,L,0);\$pdf->ln();/
g; #paragraph
'
# and finally PHP footer
cat <<'TAIL'
$pdf->Output();
?>
TAIL
} >"$DST.php"
# open the generated PHP file in Safari
open -a Safari "$DST.php"
Dear List,
One of the most striking things to a new user is that the most
important part of the UI for textmate is a button a that is at the
_base_ of the window (v. unexpected) and that is the smallest part of
the UI. I'm quite sure I would not have realised its significance had
I not seen the Screencasts, and I know that people I've recently
introduced to Textmate have had the same problem. Is there any way it
could be made more obvious?
Best,
N.
What is the meaning of the "swallow" key for language rules? I
searched the archives, wiki and documentation but I couldn't find a
good definition. Did I miss something?
--
-Corey O'Connor
> I'm guessing you want it to replace all " with \", in which case
> you would want to escape the \, i.e. s/"/\\"/g
Yeah, I feel silly, that's just it.
And one of these days I'll tell you everything I want to do, I promise.
[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
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
Here are 3 macros, 3 commands, and a small Ruby program that take the
DRY principle to another level while writing Rails migrations.
These snippets for creating a table, adding a column, and renaming a
column will add the opposite actions into self.down for you. I made a
30 second demo video so you can see them in action. You'll find all
this on my blog. The address is in my signature.
Hope some of you find this useful.
--
Sami Samhuri
http://sami.samhuri.net
I really like the project drawer and I always keep it on the left-hand
side. This is not a problem as long as I use a single window: textmate
opens it up in the same location as when I last closed it.
But if I open up another window (with a drawer), it is always opened
with the drawer on the right hand side. It's really annoying, because
(as far as I can tell) the only way to switch drawer sides is to move
the window to the right screen edge and then toggle it off and back on
again. This wastes quite a lot of time.
Is there a way to force left side drawers?
Steven Wittens
> #!/usr/bin/perl
> local $/; # put Perl in "slurp" mode
> $text = <>; # read in the whole file
> $text =~ s/^([A-Z ]+)\n(\(.+\))\n(.+)$/\n\n\t\t\t\t$1\n\t\t\t$2
> \n\n$3/mg;
> print $text;
Of all the solutions proposed here, this once seemed to work the
best. Thanks for the tip about processing the entire document in one go.
I ended up with the following:
#!/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\)\d]$\n^(.*)$/\n\t\t\t\t$1\n\t\t$2\n/;
$text =~ s/^\*\*\*//mg;
$text =~ s/^(.*(IN:|UP:|TO:))$/\n\t\t\t\t\t\t\t\t\t\t$1\n/;
$text =~ s/^(\w+.*(\.|\?|\!|\"|\-))$\n^\w+.*(\.|\?|\!|\"|\-)$/\n$1/mg;
print $text;
...but it doesn't work at all. I'm guessing that it's something
obvious that I can't see, but in case it's not an explanation of what
I'm trying to do follows.
1. removes trailing whitespace at the end of a string (which is
common in the format I'm importing from.
2. appends three *'s to the beginning of what I'll call well-formed
sluglines so that step 4 doesn't apply to these are well.
3. finds a specific set of lines, a Character followed by
Parenthetical, followed by Dialoge. And formats it.
4. finds Character followed by Dialogue when there is no
Parenthetical, and formats it.
5. repairs the sluglines that were changed in step 2.
6. formats transitions.
7. formats regular paragraphs (this is a little funky, but it's my
fault).
I can do all these in the Find&Replace window, but I get nothing when
running this bundle command.
You can find a sample document to test the script on here: http://
ollieman.net/files/bundles/braveheart-sample-unformatted.txt
And you can find what the result should look like here: http://
ollieman.net/files/bundles/braveheart-sample-formatted.txt
Thanks again for all the help. This will allow we to switch full-time
from Final Draft to TextMate. Something I'm really looking forward to.
> this would not allow for commands that take the whole document as
> input and the current selection as output, and autocompletion
> thingies wouldn't work _that_ good, so considering this I'm on +1 for
> allan's proposal.
I think some minor changes to the wording of Allan's solution might
make it more readable. What about:
Output: [ Discard ]
[ Text ] and [ pop-up ]
[ Snippet ] and [ pop-up ]
[ HTML ]
[ Tool Tip ]
[ New Document ]
And then the pop-up showing for the Text and Snippet output options
have the folowing options:
and [ Replace Input ]
[ Replace Selection ]
[ Replace Document ]
[ Insert After Caret ]
This version uses more [action verbs][1], which makes it read more
logically.
> by the way, I'd like an option to show the output as a popup menu (or
> something like that): this would perfectly suit autocompletion. think
> about it, al.
I'll second that.
Nice ideas, Allan! Cheers,
Ben
[1]:
http://developer.apple.com/documentation/UserExperience/Conceptual/
OSXHIGuidelines/XHIGMenus/chapter_16_section_3.html#//apple_ref/doc/
uid/TP30000356-TPXREF117
___________________
Ben Jackson
Diretor de Desenvolvimento
ben(a)incomumdesign.com
http://www.incomumdesign.com
hello:)
TeXShop can provide synchronization in two ways.
"pdfsearch" : The default method uses a new ability in Mac OSX 10.4
to search for strings in pdf files.
No special style files need be included to use this method.
"pdfsync" is the original method but needs to add the following line
to the preamble of your tex source code before the \begin{document}
line:
\usepackage{pdfsync}.
Is it to possible to use in the future, the first method "pdfsearch"
with Textmate
Thanks
Alain