Everyone/Anyone,
I'm new to Textmate (and just about everything else), and I just
finished reading the Textmate book (some sections got a thorough once-
twice-thrice-over). Very good book, now I'm hooked on Textmate.
I'm just an amateur web developer looking to increase my skill and
knowledge. Textmate has been a great companion as It allows me to get
out of Dreamweaver and into the code, but I find that I have lost
some of the "project management" features of Dreamweaver. ie, being
able to transparently upload completed development files from within
the application. (Sure I can still get it done with Transmit, but it
is clunky.) I searched the textmate discussions and wiki and came
away with the conclusion that SVN is the answer. Problem is I know
nothing about SVN... or where to start.
So, my question is... "What is SVN, can I really use it to manage a
production website, and what is the best place, resource, book to get
information on how to install, configure, and use it?" Sounds dumb
right. Well we all have to start somewhere.
(I googled it and found more information than I can shake-a-stick
at. So I thought that I would ask a smaller community that may
better understand my situation and give a little more intelligent mac-
oriented feedback.)
Thanks,
Ethan
So, my copy of JEG2's TextMate book has arrived down under, and I'm
really enjoying getting a better understanding of TextMate.
Being an avid AppleScripter, this was my first attempt at a bundle
command--to look up a selection in a FileMaker database:
osascript <<-ENDSCRIPT
set title to "${TM_SELECTED_TEXT}"
if title ≠ "" then
tell application "FileMaker Pro Advanced"
if not (exists window "HachetteTitles") then open alias
"Path:To:My:Database.fp7"
set cell "_Search" of layout "Titles" to title
do script "Search For Title"
set href to cell "_Search" of layout "Titles"
set img to cell "_thumb" of layout "Titles"
end tell
if href ≠ "" then set title to img & href
end if
return title
ENDSCRIPT
I know this script method works fine outside of TextMate, but no
matter what I do I get errors running it inside TextMate:
31:32: syntax error: Expected “then”, etc. but found unknown token.
(-2741)
I'd certainly appreciate any help diagnosing this one.
--
Tim Mansour <tim(a)neologica.com.au>
Hi everybody,
I have been using Textmate together with PDFView on my powerbook w/
out any problems.
Recently I moved my account to Mac OS X Server. And it won't work
till then.
On the local machine I installed Latex/Textmate/PDFView.
A test with Texshop worked w/out any problems. But when I cmd-R in
Textmate no
preview is shown (the pdf is typesetted correctly, though).
TM_LATEX_VIEWER is set to PDFView, but nothing happens.
What do I need to do?
Thanks
Chris
–––––––––––––––––––––
Christoph Biela
biela(a)glr.tu-darmstadt.de
–––––––––––––––––––––
If I write (a perfectly valid HTML4):
<div id=foo>
TextMate highlights everything up to next quoted string as an ID
attribute. The fix for it is to set:
end = '(?<=''|")|(?!>)';
for tag-id-attribute in HTML's language definition.
There's even no scope for non-quoted attributes. I've managed to add it
using back-assertions (?<=[^=]) for attribute and (?<==) for scope of
uquoted string.
I'm not sure if these are proper solutions - does TM understand something
like 'adjacent scopes'?
--
regards, porneL
I'm new to TextMate, but after reading James Gray's book, I'm eager to
become a "power user"...
I installed the Perforce bundle (using the GetBundle bundle) and just
tried it for the first time. I selected Perforce->Diff With Base with
a file open that I've already ran `p4 edit` on in the command-line,
and I get:
Perforce client error:
Connect to server failed; check $P4PORT.
TCP connect to perforce failed.
perforce: host unknown.
I double-checked that $P4PORT is set properly, and I can run Perforce
fine from Terminal (and from BBEdit). Do I need to do something else
to setup the bundle? (Is there a way to find documentation for
bundles that I haven't found yet?)
I also noticed that all the key equivalents in the Perforce bundle are
"^$". Is this a sign of some kind of problem?
--
Daryl
Hello. I'm sure the people that set this up have a better
understanding of things than I do, but I'm curious…
Why are all the functions listed in the "Completions" preferences and
listed in the functions.txt file that's used by the "Completions for
Word" command?
Couldn't the Completions preferences be changed to something like this:
{ completionCommand = 'cut -d % -f 1 "$TM_BUNDLE_SUPPORT"/
functions.txt | grep -i "^$TM_CURRENT_WORD"'; }
So the list of functions would only need to be maintained in one place?
FWIW, I tried the above, and `"$TM_BUNDLE_SUPPORT"/functions.txt`
doesn't seem to be pointing the file. I got it to work by giving the
explicit complete path to the file, but that's obviously not what we
want stored in the preferences by default. Could it be that
TM_CURRENT_WORD is defined in the Preferences context, but
TM_BUNDLE_SUPPORT is not?
---
Rob McBroom
<http://www.skurfer.com/>
I didn't "switch" to Apple... my OS did.
Hi,
is there any difference to insert something as snippet by using a
normal tmSnippet and tmCommand which is set to the output 'Insert as
Snippet' and input 'selected text or line'?
My problem:
I have a document containing the line:
build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/
1/'` ;
At the end of that line I'd like to insert a snippet '${1:Hallo}
World'. If I do it via a tmSnippet it works perfectly. But if I write
a tmCommand à la:
Command:
in=$(cat)
caret=$TM_COLUMN_NUMBER-1
lnhead=${in:0:$caret}
lnend=${in:$caret}
echo -en "$lnhead\${1:Hallo}World$lnend"
Output: Insert as Snippet
Input: sel. text or line
it crashes, meaning TM inserts: 'build_cpu= ; HalloWorld'.
Maybe TM has some problems while parsing the line? But as tmSnippet
it works?
If you change the output to 'Show as Tooltip' the command did the job
correctly. I only can guess that if in the line occurs a '$' TM will
have problems. And if this is true, what can I do? I already tried to
escape all '$' in the variable 'in' but no success.
Any hint would be very helpful. The example as tmCommand I attached
to this mail.
Thanks,
Hans
Hi.
I'm having some problems with textmate jumping in the encoding. I
have e.g. a website which is saved in iso-8859-1 and correctly opened
in the same format.
I then have some text from a word file that i copy. This text is in
danish, so it have some of the danish letters (æøå).
When I paste this into the before mentioned document in Textmate, the
whole document changes to UTF-8. Because of this when I save it and
upload it, all the dansih letters becomes garbage text (because it
tries to open it as a iso-8859-1 as I have specified).
The same thing happens in Textmate if i try reopen it as iso-8859-1
But is there any reason for Textmate to change the encoding of the
document just because I paste some text, and can I avoid it ?
Regards
Danny Krøger
Hi,
I have a tiny suggestion.
For me it is often the case that I have to replace, let's say hex
\x0B (TAB INDENTION), with '\n'. If I do it using TM's Find/Replace
dialog it takes several minutes for a file with 400 lines and, let's
say 4000 occurrences of '\x0B'. Furthermore TM occupies a lot of my
CPUs.
If I do the same by using the 'Filter-Command' with e.g. 'perl -npe s/
\x0B/\n/g' it only takes a few seconds.
I could image that the speed problem arises if the Find/Replace
routine has to insert '\n'.
Would it make sense to include an option or button within the Find/
Replace dialog, like 'External Replace All' or whatever, to call an
external maybe perl/sed/ruby routine to do the job, esp. if I want to
insert many NEW LINES?
I don't know what kind of disadvantages it would have.
Of course, one could write a tmCommand with a dialog to do it (or
using the Filter command), but in order to avoid additional typing I
would suggest to include such a functionality within TM's Find/
Replace dialog. Esp. for users who don't know the syntax to write
such a regular expression would it be helpful, I think.
Cheers,
Hans