With a selection of "x.jpg", I'd like a snippet for the html context that
can insert
<img src="x.jpg" alt=" x.jpg" width="164" height="234" border="0"
class="box1">
I have a snippet that works:
<img src="${1:${TM_SELECTED_TEXT:TM_CURRENT_WORD}}" width="$2" height="$3"
border="${4:0}" class="$5">
but it only uses default values for width and height. Are there shell
options to get these?
Thanks for the help,
tim
PS: if you find yourself making lists out of lines of text, this helps me
<${1:ol}>
${TM_SELECTED_TEXT/(^.+$)/\t<li>$1<\/li>/g}
</$1>
The secret of success is constancy to purpose.
Benjamin Disraeli
Hi,
I'm trying to write a simple ssh script to scp a file onto my mac,
open it in textmate, block till textmate closes, then scp the file back.
I can't seem to open files with 'mate -w' via ssh though. It does
work with 'open -a TextMate <myfile>' but then it doesn't block? Is
there anyway to open files using 'open -a' and make it block?
Thanks
---
Jeremy Wilkins
Ibex Internet Ltd
Parkside Business Park
Parkside Rd.
Kendal
Cumbria
LA9 7EN
Tel: 0845 226 8342
Fax: 08718 729374
http://www.ibexinternet.co.uk/
One thing I really miss from vim is the "Copy character above cursor"
function. I've looked in the TM docs, but I can't see anything
similar, or am I missing it?
Best wishes,
N
In emacs there is an option to highlight parentheses pairs when your
caret is on a parenthesis -- show-paren. Can a similar effect be
achieved in TextMate? Right now when you move over a parenthesis the
matching one is highlighted very quickly and then goes back to
normal, I usually miss it.
-- Daniel
Hello,
Up until now I've never made any use of the "Go To File" command, the
amount of files I've been working with in the past hasn't warranted
it, but for my current project (400+ files) it would seem to be a
better way of navigating through the source tree.
Unfortunately it doesn't seem to be working. When I bring up the
window with Cmd-T and start to type the name of a file I know exists
within the project I'm not getting anything returned at all, the
window is empty.
The draw at the bottom of the window has "*" in the Show field and
"dict, plist, strings" in the Hide field, which should be the default
values as far as I remember. No errors are being logged by the
console and I'm not finding any pointers for a Google search on
'textmate "go to file" problem'.
Can anyone give me some pointers on how to diagnose or fix this?
TIA
G.
--
------------------------------------------------------------------------
Home: http://polytechnic.co.uk
Flickr: http://flickr.com/photos/garrettc
Work: http://www.gencon.co.uk
> Just one of several **basic editor functions** Allan can't seem to be
> bothered to implement. Others that come to mind are double-click on a
> bracket to select a block and the pathetic double-click-extend-
> selection behavior.
Ah yes! The master list of required **basic editor functions** common
to all editors. I've got my copy right here. I hate it when editors
try to fit the needs of users and try to be distinctive.
Damn innovation!
Hail conformity!
Seriously, it's not like there aren't other editors out there for you
to use if you're this frustrated.
Dear folks,
I have just found the following commands in the "Text" menu:
"shift left" apple-[
"indent line" apple-opt-[
I am wondering how I can get to these commands on my german keyboard
i.e. I already need to press alt-5 to get [ -- hence no chance to
additionally modify any of those commands with alt. Is there any way
to change the shortcuts?
Also for some reason I cannot use apple-{ (nothing happens, even
though I should at least get a service to enter the current date).
Apple-} works as intended (i.e. as a shortcut for a LaTeX command and
when I am not in a LaTeX-file it just enters the current date [from
WordService.service]).
Is there a way to enable/disable certain Services in special apps
only? (What is the keyboard shortcut preference / domination order?)
Daniel
Dear fellow LaTextmaters,
I am (again) fiddling with the LaTeX bundle (seem to do that too much
and write my thesis too little --- ah well). and am trying to find
some way to add better folding recognition.
However, I would like things to be a bit easier, maybe I am just a
bit slow-minded today:
Right now I am trying something similar to the HTML.bundle:
foldingStartMarker = '(?x)
(\\chapter\{.*\}
|\\begin\{.*\}
)';
foldingStopMarker = '(?x)
(\%endchapter\{.*\}
|\\end\{.*\}
)';
Which will add folding marks to chapter headlines and custom comments
that show the end of a chapter (or section, subsection etc.). Which
works fine, but instead of having to type out every possibility I was
hoping to do this:
foldingStartMarker = '(?x)
(\\(chapter|section)\{.*\}
|\\begin\{.*\}
)';
foldingStopMarker = '(?x)
(\%end(chapter|section)\{.*\}
|\\end\{.*\}
)';
Works only if the indentation is correct. (Which might get annoyingly
deep if this is done in depth).
\chapter{chapter}
\section{section}
%endsection{}
%endchapter{}
Is there a way to get folding to recognize the foldingStopMarker as
"the line before it hits a certain pattern"? So I can fold (marked
with *)
* \section
…
*
\section
thx,
Daniel
PS: btw, when editing this email in Txtmate and returning to Mail.app
the indentations were all gone.
Hello. I'm relatively new to TextMate and new to this list. So, sorry if
what I'm asking is dumb and has been covered before.
I've checked the manaul macromates site, but couldn't find the answer.
Hopefully this is something easy to remedy.
I recently discovered the commands feature, and was playing with the
ActionScript commands that ship with TextMate. I got Find in ActionScript
Dictionary set up just fine; that was as easy and determing the path to the
help_toc.xml and plugging it in to my shell variables (I have a vague
understanding of what I did, but I'm no shell variable expert).
But I can't get Show AS Function Signtare to work properly. When I try it,
my cursor is in between the parentheses of the function, and I hit the key
command, and tool tip appears, but the contents of the tool tip is an HTML
file. It looks like it's the HTML file that would be returned from the Find
in ActionScript Dictionary command, just displayed in a tool tip. In fact,
if i change output to Show as HTML, I get a search results page just like
Find in ActionScript Dictionary.
the command is:
"$TM_BUNDLE_SUPPORT/Tools/asd.pl"
It saves nothing, has no input, and outputs as show as tool tip. Scope is
source.actionscript
Thanks,
Dru
Hi,
Recently I learned about QS being able to access Application Menus. This
rocks when combined with the huge bundle menu that TextMate has, making
it a breeze to find things you use sometimes, but keep forgetting the
shortcut of.
Here's how to set it up:
- Launch Quicksilver, edit preferences
- In the Application tab, tick "Enable advanced features" and select "Beta".
- In the Catalog tab, open the Quicksilver entry and tick "Proxy Objects".
- In the Triggers menu, create a new hotkey trigger for the QS command
"Current Application" with the action "Show Menu Items". I use
ctrl-space as hotkey for it.
Now open up TextMate, open a new document, press ctrl-space and type
"lor" for example, this will give you the "lorem ipsum" command.
Have fun,
Jeroen.
I like how TextMate seamlessly merges user bundles with the default
bundles. I can add new snippets, for example, and they'll be stored
(transparently) in my ~/Library folder, so that when I upgrade to a
new version of TextMate, my custom snippets won't get blown away.
This works great for adding things to the default bundles, but what
about changing them? I know any changes I make to a default bundle
will override the original, but that works well only until the next
TextMate release comes out. Consider the release notes from the
recent update:
"Lots and lots of changes, fixes, and additions to the bundles."
That means wherever I've made a change to a bundle, even small
tweaks, I'll be losing all these bug fixes and enhancements that have
been made in the new version. For this reason, I've been avoiding
making any changes to the default bundles, but of course this
prevents me from tweaking the bundles to suit my particular needs and
workflow.
I'm wondering how other TextMate users handle this problem. Do people
track the bundle repository, merging upstream changes (and fixing
conflicts) as they occur? Or is it more common simply to avoid making
any changes at all, as I've been doing (reluctantly)?
Trevor
Hi,
Don't know what I've done or how it happenend, but I have inexplicably
lost the ability to save a file using Command-S on the keyboard. Saving
a file from the menu works fine.
I've tested the Command-S in other applications, and it works as
expected so I'm reasonably sure it's not a dead or malfunctioning key on
my keyboard.
I had hoped the recent update might restore the Command-S function, but
no joy.
Suggestions for how to get the Command-S function back?
Thanks
Joe
Is it possible to have "Soft Wrap" enabled for only a specific
bundle? I want to wrap text documents at 78/80 chars, and I know
TxtMate doesn't have "Hard Wrap" yet (hope it gets it some day ;))...
however, when I turn softwrap on, it seems to be on again until I
turn it off.
Anyway to avoid this?
Eric Coleman
I was wondering how to handle snippets for various XML types. For
example, I'm developing some snippets for the Quotation Exchange
Language [1]. Although QEL is just XML with a specific schema, its
snippets are totally unique and would be useless in any other XML
file. That makes me inclined to give the QEL snippets their own scope
(to avoid potential naming conflicts between tag triggers). But how
can this be done? It seems like I'd have to create a new language
type for QEL, but I'd simply be duplicating the XML bundle -- not
just for QEL but for all the XML file types I'm writing snippets for.
The thought of all that redundancy bothers me; perhaps there's some
way of "subclassing" the XML language type? Or is there an entirely
different way to handle this kind of thing?
Trevor
[1] http://www.amk.ca/qel/
How could I go use keystrokes to select text from the cursor to the
next (or previous) occurrence of a searched term? This would be
really helpful for automating tasks, for example, in quickly hacking
out macros that can operate on variable-length text fields (where a
"select until next tab" would be useful -- using ^W doesn't help with
URLs). I'm aware that I can get around this using find-and-replace of
an entire block of text via regular expressions, but was wondering if
there's something more procedural.
Thanks,
Shiran
Hi,
I would like to disable the automatic file backup in TM. I didn't find an
option in the preferences menu - could someone please tell me how to do
this?
THX,
Andreas
Hola,
As long as we don't have that snippet repository yet: here are two
small snippets I have been using a lot lately:
Variations on the "link" snippets:
[${1:mail}](mailto:${2:HREF})
[${1:file}](file:///${2:HREF})
Dan
Hi all,
unfortunately I modified "Slush & Poppies" theme and ruined the
colors. Is there a way to get back the original "Slush & Poppies"
theme with its standard colors?
THX,
Andreas
Hello,
i want to use textmate for my diploma. i am trying to use latex for this.
so, suddenly this massages appear. textmate ask me after i tried to
save a document for my root passwort. the templates of textmate do not
running if i want to build them.
i reinstalled latex and textmate. what i did wrong?
error Massage
Compiling LaTeX...
This is pdfeTeXk, Version 3.141592-1.30.4-2.2 (Web2C 7.5.5)
Document Class: exam 2004/08/14 Version 2.2 by Philip Hirschhorn
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
! LaTeX Error: File `pdfsync.sty' not found.
./untitled
See the log file for details
untitled.log
Found 2 errors, and 0 warnings in 0 runs
I see where the subversion menua has the option of updateing the
entire project, but I do not see one for commiting the entire
project. Am I not seeing it, or does it not exist?
Thanks.
Hi All,
I'm sure the printing will get improved in the future but for the
minute I find it a bit limited (font size too big etc).
I've setup a command in the text bundle using a2ps (you can get this
from darwin ports, probably fink and other places as well).
Save: Nothing
Command(s): a2ps --center-title=`basename "$TM_FILEPATH"` --font-size
8 --pretty-print --columns 1 -M A4 -R --line-numbers 5 -o - - |
ps2pdf14 -sPAPERSIZE=a4 - /tmp/textmate_print.pdf && open /tmp/
textmate_print.pdf
Input: "Selected Text" or "Document"
Output: Discard
Activation: Key Equivalent - "Command P"
This will create a pdf called /tmp/textmate_print.pdf, and opens it
in Preview (or acroread, or whatever your default pdf viewer is). If
your happy with it you can just hit Command P to print it.
At the minute this prints in font size 8, but thats easy to change,
it also prints in A4, if you change this you'll need to change both -
M option to a2ps and the -sPAPERSIZE option to ps2pdf
jebw
I'm trying to add a Delete command to the Subversion bundle. I've got
the basics working, but now I'm trying to make it look nice.
Here's the command as it is now:
require_cmd "${TM_SVN:=svn}" "If you have installed svn, then you
need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt>
shell variable (e.g. in Preferences / Advanced)"
rv=`CocoaDialog textbox --title "Delete from Repository" --string-
output --no-newline \
--informative-text "These files will be scheduled for deletion
during the next commit." \
--text "${TM_SELECTED_FILES:-$TM_FILEPATH}" --button1 "Delete" --
button2 "Cancel"`
if [ "$rv" == "Delete" ]; then
eval "$TM_SVN" del "${TM_SELECTED_FILES:-$TM_FILEPATH}"
elif [ "$rv" == "No" ]; then
exit
elif [ "$rv" == "Cancel" ]; then
exit
fi
What I want is the list of files in the CocoaDialog textbox to be
newline-separated, and have the enclosing quotes removed (ideally,
the project base path as well). I don't have any bash-fu to figure
this out.
Help please?
Thanks,
Ken Scott
Hi,
I like using key commands for scrolling / reading. That is, not just
moving one line up/down, more like continuous movement vertically.
Navigation -> Scroll -> Line Up/Down
Question,
Using this command (while holding down / key repeat), firing a
shortcut makes the top-menu blink. So, when using it for continuos
scrolling it feels a bit sluggish due to this.
Also, when I've scrolled say 1 1/2 page, how do I center the cursor
on the visible area!?
Why,
I'm used to this from bbedit where you have ctrl alt and command +
arrows for scrolling in different speeds. Say ctrl-down = one line,
ctrl-alt-down = three lines, etc. Then when you see that line you
wanna edit, I use command-shift-J for moving the cursor -> "Go to
center line".
In bb I don't think the shortcuts for this is available in the main
menu, which makes them run without the menu-blink for each key repeat.
best
/David
Mark,
just open the LaTeX Bundle and edit the "Typeset & View" command,
everything needed is there. e.g. you could include a new variable for
your projects that gets used in this case and allows for more
flexibility than "hard-coding" it in the bundle itself.
If you think these may be useful additions to us Latextmaters, send
'em to this list as well!
Dan
Nice work on this feature Allan! I put together a (quick and dirty)
command for the AS bundle to extract the selected text to a new
function and re-indent it. Would this be useful to anyone else? I'll
commit it to the repo if there's any interest.
Ben
I'd personally be very interested. I just started doing a few simple
but much needed additions to the bundle as well (like folding blocks
for conditionals, do's etc.), but i'd rather save the time if
somebody already added the things that are needed. I think the
current bundle is great in terms of lowest-common denominator, and as
such it may be that people are opposed to expanding it to the point
where it becomes a matter of taste and style. But i guess you could
talk to the maintainer (who?) and see if he might be open to any of
your additions. In any case, I (and surely others) would love to take
a look at your enhanced bundle. @everybody, Is there a place where to
upload alternative bundles?
Sebastian
James Edward Gray II wrote:
> Hi all.
>
> I use TextMate for Ruby programming all day everyday
> (professionally). I just recently bought a new computer and am
> slowly migrating everything over. I wanted to rebuild my TextMate
> snippets and commands in the process, so I could reevaluate what
> I've created, fix minor annoyances I have found in usage, and
> improve on what I have created.
>
> I have a pretty large set of additions in my old Ruby bundle. I
> have tons of snippets for iterators, testing and common language
> constructs, a few handy commands (like switching { ... } to do ...
> end), and even snippets for many standard libraries (like
> YAML::dump/load and an OptionParser skeleton).
>
> My questions are:
>
> 1. Is there any interest in me providing these additions publicly?
> 2. Would if be allowed for me to add some or all of this to the
> default Ruby bundle?
>
> I figure I'm going to be entering all this again anyway. It
> doesn't matter to me if it's just for me or for all of us. I
> didn't know if there is some desire to keep the default bundles
> pretty small or anything though. Let me know if there's interest
> and, if so, how best to provide it.
>
> Thanks.
>
> James Edward Gray II
Hi all.
I use TextMate for Ruby programming all day everyday
(professionally). I just recently bought a new computer and am
slowly migrating everything over. I wanted to rebuild my TextMate
snippets and commands in the process, so I could reevaluate what I've
created, fix minor annoyances I have found in usage, and improve on
what I have created.
I have a pretty large set of additions in my old Ruby bundle. I have
tons of snippets for iterators, testing and common language
constructs, a few handy commands (like switching { ... } to do ...
end), and even snippets for many standard libraries (like YAML::dump/
load and an OptionParser skeleton).
My questions are:
1. Is there any interest in me providing these additions publicly?
2. Would if be allowed for me to add some or all of this to the
default Ruby bundle?
I figure I'm going to be entering all this again anyway. It doesn't
matter to me if it's just for me or for all of us. I didn't know if
there is some desire to keep the default bundles pretty small or
anything though. Let me know if there's interest and, if so, how
best to provide it.
Thanks.
James Edward Gray II
On Apr 2, 2006, at 18:42, Allan Odgaard wrote:
> On 2/4/2006, at 20:27, Michael Sheets wrote:
>
> > What you could do is move them to a custom bundle "Ruby James" or
> > similar then post the link on this list. Let people take a look. :)
>
> That sounds like a good idea. The Ruby bundle does IMHO need some
> clean-up before more stuff is added.
Fair enough, I will place my additions in a new bundle as I create
them and put it online for others to examine...
James Edward Gray II
All,
Sorry to bother the list with this stupid question, I know nothing
of RegEx and have been trying to grasp it, and the way it works in
TextMate. Basically for my needs all I need to figure out is how to do
if statements. Here is what I am trying to do:
Snippet:
function():$1 {
}
if $1 != Void, then put in a return statement like this:
function():Array {
return
}
Which I can add the variable name to return later.
Any help and I will be extremely grateful. Thanks for your time.
best,
Aaron Clinger
http://aaronclinger.com
There's a great site for a new web framework called SQL on Rails.
http://www2.sqlonrails.org
They even have an 8 minute screencast where they develop a full internet search
engine. The magic and power of the system is thanks to textmate snippets. Just
thought you all would enjoy spotting textmate in something this brilliant.
--clm100
It looks like TextMate only recognizes Perl-style backreferences when
doing a regular expression search/replace. (e.g. $1, $2, etc.) I'm
used to the style typically found in text editors: \1, \2, etc. Is
there any way TextMate can be made to recognize the latter style?
Trevor
Is there a way to use latexmk in the typeset and preview command in
the LaTeX bundle with any of its options---like -pvc say?
Thanks. All the best,
Mark
_________________
Mark Eli Kalderon
Department of Philosophy
University College London
Gower Street
London WC1E 6BT
Dept webpage: http://www.ucl.ac.uk/philosophy
Personal wepage: http://www.kalderon.demon.co.uk
feature request:
redo last action
redoes the last snippet, macro or command that you just did.
I have a lot of commands and snippets and things that i only use once
every so often. So I don't give them a tab completion or shortcut.
Many of them I would like to use multiple times in a row.
Currently, i could record a temporary macro, run the command and then
rerun the temp macro.
But I never remember to do that.
It would be way handier to have this extra function, too.
Thankyou, and goodnight everybody!
I'm trying to disable auto-indentation for the lines below starting
with 'case'. This is how I'd like the code to appear:
switch ($where) {
case 'start' :
# code...
break;
default :
case 'middle' :
# code...
break;
case 'end' :
# code...
break;
}
However, by default, the php bundle wants to format it like this:
switch ($where) {
case 'start' :
# code...
break;
default :
case 'middle' :
# code...
break;
case 'end' :
# code...
break;
}
I've added this preference item to the php bundle for source.php, but
it's not working:
/* preferences */
{
unIndentedLinePattern = '^\s*case\s+.*$';
}
Am I doing this right?
Thanks,
Q
Hi everybody,
I am a 25 year old bioinformatics student and passionate rails developer
from germany. However, for my upcoming diploma thesis OCaml will be my
programming language of choice. Of course I would like to be able to stick
with Textmate and code OCaml in Textmate but unfortunately there is no
integrated default syntax highlighting for OCaml and I could find only one
bundle for OCaml. The bundle is listed on the old wiki page
http://wiki.macromates.com/textmate/show/Bundles102.html ,but unfortunately
its link http://ianp.org/articles/textmate/OCaml.tmbundle.zip is broken.
Does anybody know where I can download this package or maybe point me to
another OCaml bundle with syntax highlighting?
THX and sorry for my bad english,
Andreas
After running Tidy on documents with a doctype of
XHTML 1.0 Transitional
The doctype definition is replace with the "Strict" version.
I did a little digging and there is a -doctype switch in Tidy, but
setting it to
--doctype -transitional
in the Tidy bundle has no effect... Transitional is still changed to
Strict.
Any ideas how to fix this?
eo
Hello all,
As you may have noticed, the cycle of TextMate betas has slowed down
recently. When talking to Allan yesterday, I asked him about the
progress of reworking TextMate's innards. He confided me that during the
recent months MacroMates has been cooperating with TheCodingMonkeys
working hard to exchange experiences and to merge their editors.
Later today a new beta of SubEthaMate will be released, as a combined
effort between TheCodingMonkeys and MacroMates. This new beta will
feature preliminary support for both of SubEthaEdit and TextMate
strongpoints, collaboration features, access to the Unix shell, and
remote editing over (S)FTP.
The beta will of course be very rough around the edges, and it will
require extensive testing and feedback to get all this right. Allan told
me that the new beta will be released only to the TextMate community
later today. The public announcement will follow when SubEthaMate is
more stable.
To be certain, I contacted one of TheCodingMonkeys, Martin Pittenauer.
He confirmed that they are working with Allan to create a stronger
editor. "TextMate and SubEthaEdit both have the same philosophy, selling
their editor at a low price and placing high value on usability. It is
time we combined our effort and knock BareBones off their throne.", he
commented.
He also told me that they are waiting for SubEthaMate to become
reasonably stable, before releasing it to their community.
I can't wait to get my hands on the new beta!
Jeroen.
Hey folks,
To the maintainer of the Java language bundle, I just pulled the
latest from svn. I didn't realize if the Java.tmbundle was update,
but there are (IMHO) some bugs in the language grammar that I'm
running accross that I don't think I've seen before but it's possible
I just wasn't looking:
FIRST:
When the cursor is immediately outside of a block comment, the scope
still shows "comment.documentation.java" or "comment.block.java" when
I don't think it should be (imagine the ^ character to be the cursor):
Example:
/* some comment here */^
-- or --
/**
* My method does this
*/^
the scope on the outside of the closed comment is being recognized as
comment.block.java and comment.documentation.java respectively when
really I'm out of the comment blocks.
SECOND:
All the code after an abstract method is scoped to
meta.definition.method.java, like for Example:
public abstract void doSomething();
// all code in the file below this is scoped to the
meta.definition.method.java
if I add a {} at the end of the abstract method signature the scope
gets fixed -- but, y'know ... then the compiler complains :-)
Thanks,
-steve
I'm trying out TextMate for the first time and I love what I see, but
I'm unable to run commands of any kind. They all fail with:
interpreter failed: Malformed Mach-o file
I've double checked my download and all the relevant parts of my
system. It's hard to imagine that this is very common, but has anyone
seen it before?
Thanks,
Patrick
A month or two ago I started making a Coldfusion bundle and haven't
look at it since... and now I'm back doing some CF work again the
highlighting is starting to piss me off, so I thought I'd ask you
guys: how do I do a bundle pattern that matches nested comments?
In CFML you can have
<!---
<cfif something eq true>
<!--- A nested comment --->
</cfif>
--->
and the whole thing should be syntax coloured as a comment.
The basic pattern at the moment is:
{
name = 'comment.block.html';
begin = '<!---';
end = '--->';
}
any ideas how to get nesting working?
-- Tim
Dear Allan,
I compiled the InputManager from svn and installed it similar to what
I found here on this list's archive (i.e. put both the .bundle and
Info into ~/Library/InputManagers/Edit in TextMate --- this works!
Great, now I can write my emails in TextMate (which is sooooo much
better than Mail.app) using Markdown etc.
Also the problem with the PropertyList bundle was odd. I deleted the
bundle from Disk and re-imported it from the svsn and now it is
available (again?).
And as a side note and feature request: Would it not be really great
if TextMate would take over in ALL Cocoa Apps? ;) Not just as an
InputManager, but as default editing view ;) Ahh, just dreaming again.
Daniel
Dear folks,
Is it just me, or does the CodeBrowser not work when TextMate is run
in Intel-Mode? When I start it in Rosetta everything is fine, in
intel-mode I have no CodeBrwoser, but instead a:
2006-03-22 01:00:00.774 TextMate[5326] *** -[NSBundle load]: Error
loading code /Users/dekay/Library/Application Support/TextMate/
PlugIns/TmCodeBrowser.tmplugin/Contents/MacOS/TmCodeBrowser for
bundle /Users/dekay/Library/Application Support/TextMate/PlugIns/
TmCodeBrowser.tmplugin, error code 2 (link edit error code 0, error
number 0 ())
2006-03-22 01:00:00.775 TextMate[5326] instance TmCodeBrowser plugin
doesn't have proper initializer
on my console…
too bad,
Daniel
I've written a little command to help me grep the current file and copy
matching lines to a new document. I've copied the example of "Search the
TextMate Mailing List" for the CocaoDialog. However my implementation is
stalling and I need to killall CocaoDialog to free it up.
Save: Nothing
Input: Selection
Output: Create new document
---
res=$(CocoaDialog inputbox \
--title "Find matching lines" \
--informative-text "Regular expression to match lines:" \
--button1 "Find" --button2 "Cancel")
[[ $(head -n1 <<<"$res") == "2" ]] && exit_discard
pattern=$(tail -n1 <<<"$res")
perl -ne "print if /$pattern/";
The only thing much different here from the "Search mailing list" code
is the use of stdin.
Hmmmm?
Q
Hi everyone,
Not sure if this is possible. Anyone ever use Zend Studio? The auto
competition and function prototypes are simply amazing.
Basically, completion happens automatically, and gives a nice drop
down with prototype information in it. Also, if you are inside a
functions brackets, it will show a prototype of the function, based
on the PHPDoc comments (if it's available).
Is this possible in the current version of textmate? I imagine it
would have to index the project to get this going. If it's not
possible, is it every planned? I immagine it would be useful for
ruby, javascript, and anything else really provided it had a method
to parse the source code in the project.
Regards,
Eric
Since TextMate already has such great support for Markdown I'm
wondering why Smartypants has been left in the dark.
I was reading this: http://rentzsch.com/notes/contemporaryQuill
...and wondering why a solution like this has not already been
implemented. The only reason I don't want to use this is because it
will break when TextMate has been updated.
Is there an implementation like this already out there?
So, in the process of writing the screenwriting bundle I'm working
(and using every day) I've come to the conclusion that it might be
cool to look into subversion for working with screenwriting projects.
Obviously I know nothing about subversion, so my question is:
Is this stupid?
Do you guys have any good resources for getting started with subversion?
Is there a better solution (since I'm just using text-documents)?
I can't seem to find a really good intro on how to use TextMate with
Subversion, did I miss it somewhere?
Thanks in advance.
>> [...] TextMate seems to show tabs and line endings but not any more of
>> the non-printing characters that BBEdit shows
>
> It does show unprintable characters, but not spaces.
It's good to know I wasn't doing something wrong. However, if the
functionality exists [and has already been written/tested] why keep it out
of a release?
Trust me, I want to fall in love with TextMate, but there's some things that
can't yet be done in TextMate -- I find myself jumping back to BBEdit in
order to accomplish these tasks.
> I found that to look too busy and the spaces should be indicated by where
> there are no other ,,invisibles% shown
I respect the consideration to keep the application lean and fast, but when
should a developer's personal preference get in the way of what his/her end
user's want out of a product?
> (I know there are requests for configuration here).
A simple option or preference would be a welcome addition and wouldn't
require people to use it. BBEdit conditionally allows one to show invisibles
and then selectively choose whether or not spaces are shown.
>> I was able to find the ShowInvisibles Bundle for TextMate that aims
>> to highlight tabs and spaces in different colors but it doesn't
>> appear to work with my setup and/or preferences.
>
> It was created prior to the theme system. What it does is give a
> certain scope to spaces (and other characters), but for that to show,
> you would need to add a theme rule for it.
This information is encouraging, but the bundle doesn't come with any
documentation or configuration instructions, only to edit the
Invisibles.plist to suit ones' needs.
Could you put together an example of a theme rule that would highlight the
spaces in a document using this bundle?
Allan,
I am curious: the PropertyList bundle keeps getting lost on my
system. No apparent reason why. A svn update does not tell me about
any changes; it is still installed - yet the bundle editor does not
list it in its filters list. I have to install it into ~/Library/
Application Support/TextMate/Bundles/ else it will not be listed at
all?! odd.
Daniel
Hi all,
I'm currently working on a website where I'm going to add text
through html forms. I have tried the Edit in Textmate option, but it
seems to be an issue with the encoding.
The site I'm working on uses iso-8859-1 as encoding, and when I get
the text in Textmate all Norwegian characters are not represented
correct. I guess this is because Textmate uses unicode in its
internal representation of the text. Are there any workarounds for this?
--
Mvh/Regards
Geir-Tore Lindsve
lindsve(a)bluezone.no
http://www.lindsve.net
I have a project with about 500 files that split neatly into a few
categories. Is there some way to split the project drawer or otherwise
get two separate scrolling views of different subsections of the project?
And/or can one get a multi-pane hierarchical view (like one of the
Finder views)?
It looks like Go to File... will often be the quickest way to open a
file, but sometimes I'll have to manually hunt through the hierarchy and
some hints on how best to wade through it would be much appreciated.
-- Russell
Ryan,
> Could you put together an example of a theme rule that would
> highlight the
> spaces in a document using this bundle?
Just add a new line to whatever theme you are using (in prefs,
fonts&colors, click the plus button), select that line, enter the
scope selector that the Invisibles.bundle assigns to invisibles - et
voilá!
hth,
Daniel
PS: I don't have access to the bunlde -- thus you will need to figure
out the scope yourself from the bundle editor.
This is either a bug or I'm doing something wrong. I've created a bundle
command with the following line:
osascript -e 'tell application "TextMate"' -e 'set bounds of window 1 to
{640, 1, 1279, 832}' -e 'set bounds of window 2 to {1, 1, 640, 832}' -e
'end tell';
TextMate beachballs until I run 'killall osascript' in the terminal. If
I run the above line in the terminal directly, it works as expected. Is
there some kind of break in the chain of Command -> Shell -> Applescript
-> TextMate?
Can anybody think of a better way to emulate BBEdit's "Arrange Windows"
command?
Thanks,
Quinn
Hi folks,
Don't know what happened to my original email, but it seems it got
gobbled up before it even reached the mailing list, so here goes again:
I'm not sure if this is a bug in TM or the java grammar since upon
reviewing the Java Lang definition itself, it seemed to be correct in
the "hey-that-looks-right" sense .. not the "oh-yeah-I-know-what-I'm-
talking-about-and-that's-definitely-right" sense.
I just pulled the latest (everything) from svn. I didn't realize if
the Java.tmbundle was updated, but there are some things going on
which look a bit buggy.
FIRST:
When the cursor is immediately outside of a block comment, the scope
still shows "comment.documentation.java" or "comment.block.java" when
I don't think it should be (imagine the ^ character to be the cursor):
Example:
/* some comment here */^
-- or --
/**
* My method does this
*/^
the scope on the outside of the closed comment is being recognized as
comment.block.java and comment.documentation.java respectively when
really I'm out of the comment blocks.
SECOND:
All the code after an abstract method is scoped to
meta.definition.method.java, like for Example:
public abstract void doSomething();
// all code in the file below this is scoped to the
meta.definition.method.java
if I add a {} at the end of the abstract method signature the scope
gets fixed -- but, y'know ... then the compiler complains :-)
Thanks,
-steve
Hi,
I'm new to Textmate and enjoying it a lot.
This weekend, I was playing around with the good old Sieve of Eratosthenes.
That was the very first computer program I ever wrote (way back in 1970 in
Fortran IV - ran it on an IBM1130 with 8K - yes that's K! of core memory).
It computed all the primes less than 10,000 and its runtime (determined by
using my wristwatch while looking through the window into the computer room
- timed from when the operator loaded the cards into the reader until the
output started on the line printer) was about 90 seconds, not counting the
printout which probably took longer than the compute time.
Just out of curiosity, I wrote a cheesy, q&d little python script to do the
sieve:
#!/usr/local/env python
import sys, os
"""
The sieve of Eratosthenes. Compute all primes less than some integer
(given here by 'bound')
"""
def printem(sieve):
# Any sieve entries still not 0 must be primes
# (Eratosthenes - antiquity)
px = 0
for p in range(0, len(sieve[2:])):
if sieve[p] != 0:
print sieve[p],
px += 1
if (px % 10) == 0:
print
def sievem(bound=0):
if bound == 0:
sys.stdout.write('How many integers should I sieve? ')
bound = int(sys.stdin.readline()[:-1])
sieve = range(0, bound+1)
remove = 2
while remove * remove < bound+1:
for pm in range(remove*remove, bound+1, remove):
if pm < bound + 1:
sieve[pm] = 0
# Find "next" prime from the remaining sieve elements
for np in range(remove+1, bound+1):
if sieve[np] != 0:
remove = np
break
printem (sieve)
print
if __name__ == '__main__':
sievem(10000)
I ran 'time python sieve.py' and got:
real 0m0.816s
user 0m0.127s
sys 0m0.215s
This on my dual 867mhz Mac G4 with 2Gb RAM. Not surprising that it's faster.
But comparing python to compiled Fortran seems a little unfair, so I ginned
up a little C program and compiled that for N=10000 and timed it:
(list of primes < 10000)
...
found 1229 primes
real 0m0.331s
user 0m0.005s
sys 0m0.022s
That's about 272 times as fast as the old IBM machine, but that's not the
point of this story.
I decided to see how far I could push the calculations on my machine without
tying it up for a week and without spending a lot of time fiddling with the
algorithm. I finally wound up computing all the primes less than 1 billion
and redirecting the output to a file. (Googling confirmed that the number of
primes computed by my code was correct). The resulting file is fairly large:
-rw-rw-r-- 1 dick staff 507044566 Mar 27 17:54 primes_upto_a_billion.txt
So, I decided to see how various programs would handle loading, displaying
and (shudder) manipulating this file. First, I burned it to a CD using Toast
with little or no difficulty.
Then I experimented with BBEdit (Lite), irEdit, Eclipse3.1, SeaMonkey
(Mozilla browser), Alpha, etc. etc. with very mixed results. Most of them
either loaded the file (and then were very sluggish about navigating it),
had to be force killed, or cleanly gave up. The latter was the case for most
of the Java based apps, since they probably defaulted to starting the JavaVM
with too little heap: it's obviously gonna take at least 600mb or more. The
programs that succeeded usually showed both Real and Virtual memory sizes in
the range of 900+ Mb.
Finally, I got around to trying TextMate. Well, the results were
disappointing. It crashed before finishing its load:
TextMate(21976,0xa000ef98) malloc: *** vm_allocate(size=1073741824) failed
(error code=3)
TextMate(21976,0xa000ef98) malloc: *** error: can't allocate region
TextMate(21976,0xa000ef98) malloc: *** set a breakpoint in szone_error to
debug
terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
My interpretation of this console output is that TextMate was trying to
acquire over a gigabyte of memory with a single request. Not clear (a) why
this much would be needed for a slightly over 500mb file and (b) why my
machine couldn't respond, since I regularly have Inactive size at or near
1Gb and lots more available from programs that at idle could be forced to
page out their real memory to disk.
Anyway, I thought it was all interesting and I would like to hear people's
reactions about the whole topic of editor scalability and editing huge
files. This does have real-world ramifications. E.g. the product I work on
is a large Financial Analysis programming language written in C and bits of
C++, which implements a proprietary database format for time-series data
storage. When there are problems in debugging, we generate "slog" files
(selective logs) which routinely in the worse cases can approach 1Gb in
size. We've never really found a reasonably way to deal with the largest of
these and usually resort to other methods, but it would be nice some day to
be able to actually edit them with some measure of efficiency. I'm sure most
readers of this list have had similar experiences.
In addition, when I had finished experimenting with the other editors /
browsers / IDEs, and went to quit my existing TextMate session, it took
quite some time. I got several spinning beachballs in the process. My take
on this is that my experimenting caused lots of TextMates working storage to
be paged out and that it had to fault all that stuff back into it's working
set. That kind of thing seems to happen with TextMate in general: e.g. when
I accidentally hover too long in the File menu on Open Recent... TextMate
spins that beachball for all it's worth - often taking 10 or 15 seconds to
come back to life. What's up with that? Does it try to generate this from
project files and have to read through the equivalent of 1000's of status
entries, many perhaps out on disk? Whatever - it's quite annoying and I've
tried to force myself to use Cmd-O whenever possible.
Sorry for the length of this, I just couldn't resist. (How many of you made
it all the way to the end?)
-- Dick Vile at home in Dexter, MI USA
I'm a long-time web developer and BBEdit user wanting to learn TextMate for
a Ruby on Rails project. I've grown used to relying on BBEdit's show
invisibles command as meaning "show me tabs, spaces, line-endings, and other
non-printing characters (gremlins)" as symbols. I was expecting the same
behavior out of TextMate as BBEdit or SubEthaEdit, but it doesn't seem to
work the same.
I've searched the TextMate documentation and the mailing list archive for
any mention of "showing spaces", (i.e. the ability to show spaces, a la
BBEdit's "Show Invisibles" command) but I've been unable to find any results
that address my problem.
However, TextMate seems to show tabs and line endings but not any more of
the non-printing characters that BBEdit shows. I was able to find the
ShowInvisibles Bundle for TexMate that aims to highlight tabs and spaces in
different colors but it doesn't appear to work with my setup and/or
preferences.
ShowInvisibles Bundle (11-27-04)
http://macromates.com/wiki/pmwiki?n=Bundles.ShowInvisibles
Has anyone had any success in configuring TextMate to "Show Invisibles" or
"Show Spaces" like BBEdit or SubEthaEdit allow? If there's a a build of
TextMate that already does is, I can't find it and in that case would
appreciate a hint or help getting it working. Thanks!
- Ryan J. Bonnell
ryan(a)creativearc.com
http://creativearc.com/
Hi All,
I'd like to be able to export my bundle customizations to another
installation of TextMate.
What's the easiest way to do this?
Thank you.
Diana T
Not sure why this is happening, but on my MacBook pro, i have weird
"php" symbol in the language chooser thingie..
I've attached a screen shot. Basically, instead of the usual "X" i
got some funky [->] thing.
Any reason for this?
Eric Coleman
Hey all,
i wonder if their is encoding detection in TextMate usable in anothe
app.
i'd like to discriminate between :
iso-8859-1, iso-8859-15, cp-1252 and Mac Roman
for the time being, using a ruby regex i'm only able to detect US-
ASCII and UT-8....
in case u have some light upon that...
Yvon
Allan,
thank you for clarifying things even more.
I believe THIS:
>> [...] What exactly IS the most useful way and best way in regards
>> to updating "official" bundles via svn to make customized bundles?
>
> Create an entirely new language grammar and have that one include
> the default one. Then set your files to use the custom grammar
> instead of the official.
Should be in the manual or FAQ. (Or is it and I have missed it?)
>> [...] A couple questions still bog my mind, though:
>> - Am I correct assuming that I can use a certain pattern just
>> once? When I copy a rule from Latex.plist to my custom.plist -
>> only the one encountered first gets to markup the text.
>
> Yes, just like a regular parser :)
Oh, OK, whatever a regular parser is - I am just a chemist, not a
programmer. ;)
>> - Is there a way to markup a pattern with more than just one
>> scopes? Like for \begin{mycustomlist} set something like
>> meta.environment.list *and* meta.package.custom
>
> Generally one would use a longer scope name and put the extra
> information deeeper in the scope name. But you can use captures to
> overcome the limitation.
Thanks for the hint; I guess I will need to figure out if the whole
thing is necessary at all… ;)
>> I am using a svn checkout of the bundle -
>>> e181090182:/Library/Application Support/TextMate dekay$ ls
>>> Bundles Conventions.txt LICENSE Themes
>>> Tools
>
> No Support folder?
I had a support folder in ~/Library/Application Support/TextMate but
did check out the svn version into /Library… as well, now.
>> [...] Also I cannot get the "Edit in Textmate"-InputManager to
>> work in Mail.app - it works e.g. in TextMate's Bundle-Editor (very
>> useful), but Mail.app would be even more so. ;(
>
> Do you see the Edit in TextMate… menu item in the Edit menu of
> Mail? If not, did you restart Mail after installing the input manager?
No, I do not see it. Even after a couple of restarts… maybe it is
because of me being on an iMac CoreDuo? But then as far as I have
seen the InputManager seems to be Universal.
now back to my breakfast,
Dan
Dear TMaters,
I am just editing some language grammar (again) and -- since this is
about the best idea ever -- am doing this in a regular textmate
window (not the bundle editor). And voila, I can select a new
language, one for which I cannot find a bundle, called "Language
Definition." Neat. But it beeps. When I select the language, when I
add new lines etc.
From console.log
2006-03-26 14:05:08.905 TextMate[455] didn't find rule named
source.plist
2006-03-26 14:05:08.906 TextMate[455] didn't find rule source.plist
Anything I should/can do about this?
thx,
Dan
PS: If I am clogging the list, tell me :)
Hi, I'm new to TextMate, coming from Vim.
Is there an equivalent to Vim's textwidth setting, which
automatically wraps a line as you type past the nth character? The
new line is indented two extra tab stops generally.
If not, is this something which would be possible with a plug-in
(when the API is ready)?
Thanks,
Ben
________________________________
We're cycling through Cambodia to raise money for Oxfam, help us
raise £5,200!
http://cambodiachallenge.org/
I tried to google but didn't really find anything in my oh so short
overview.
It would be great to have a meta-selector of sorts for the scope, so
you can "highlight" the current element when editing or something.
I'm actually beginning to really like the Brilliance Dull Beta theme
(!) and that html-tags are almost "invisible". However, it would be
really cool if it could light up when the caret is over it, or light
up an attribute with the caret on and so forth.
This must have been mentioned before, but as I said, I did google ...
a bit :)
Andreas
I use this to create the feeds for ollieman.net. I thought you guys
might like this...
You'll want to start out with a valid RSS2 feed like this:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title></title>
<link></link>
<language>en-us</language>
<description></description>
</channel>
</rss>
Now to the real fun; it's just a snippet but it makes hand-coding RSS
feeds a breeze. Here it is:
<item>
<title>$1</title>
<description><![CDATA[
$2
<a href="$5">Read more</a>
]]></description>
<pubDate>${3:`date +%a,\ %d\ %b\ %Y\ %H:%M:%S\ %Z`}</pubDate>
<author>${4:Oliver Taylor} nospam(a)example.com</author>
<guid isPermaLink="true">${5:http://ollieman.net/$6}</guid>
<link>$5</link>
<category>$7</category>
</item>
The only thing of real note here is getting the pubDate correct. If
you want it to insert GMT instead of your local time you'll have to
tweak that.
Lastly, make sure to set the scope to text.xml and you're all set.
That's it! 1,2,3-easy RSS feed.
Dear TMaters,
I am experiencing weird problems with TextMate not recognizing some
keyboard shortcuts from bundles (i.e. the LaTeX bundle) containing
the escape-key. I can get the completion when pressing esc - but all
the other commands working with esc and a modifier key do not work at
all. If I am lucky I get a beep; selecting the macros I need by hand
from the bundle-macro-menu works as intended… any ideas?
Also I cannot get the "Edit in Textmate"-InputManager to work in
Mail.app - it works e.g. in TextMate's Bundle-Editor (very useful),
but Mail.app would be even more so. ;(
Any idea where I might look for causes to this problem?
* there are no other InputManagers installed
* my .services are rather trimmed by using ServiceScrubber - and as
far as I can tell none are colliding on the shortcuts…
Thanx again,
Daniel
Haris,
thank you for your hint, this solved the probelm I guess. I have not
been using \ref since I am using a mixture of \vref and \prettyref
instead - which both did not have a scope of "meta.label.reference".
I just recently added those commands to the grammar and now it works
fine with alt-esc. The "old" completion gives me the following output
on console.log:
> Mar 26 01:45:47 dekayBase crashdump[724]: bash crashed
> Mar 26 01:45:47 dekayBase crashdump[724]: crash report written to: /
> Users/dekay/Library/Logs/CrashReporter/bash.crash.log
and within TextMate I get:
47:68: execution error: System Events got an error: Die Liste ist
leer. (2)
I am using a svn checkout of the bundle -
> e181090182:/Library/Application Support/TextMate dekay$ ls
> Bundles Conventions.txt LICENSE Themes Tools
Dan
Haris,
As you are the "local LaTeX bundle god." Do you think functionality
like what I am trying to do would be useful in the main bundle? I
have been thinking about doing some bundle or snippets for language
grammar extension specifically targeted to LaTeX, as this is my main
concern these days (or better call it major distraction from actually
*writing* my thesis).
What I am trying o accomplish is a much more detailed markup/
assignemnt of scopes for possible theme development. I believe it
would be very useful to have that much more markup available,
especially since I am using many packages, environments -- just
getting some visual feedback would be nice. Or something where you
are editing some lines somewhere and you are wondering which
environment you are currently in, just press ctrl-shift-P and it
prints "meta.environment.myverycoolenv" -- much better would be a
very light color change in that environment. (I like to have my list
environments colored… and possibly with different colors for itemize,
enumerate etc.)
And these thoughts brought me to the point where I figured I could
create that "detour" to include my custom language grammar before the
LaTeX language grammar was read.
Examples for my changes are:
- recognize \vref and \prettyref as meta.label.reference
- markup the different \headings with
support.function.section.XXX.latex with XXX being part, chapter,
section etc.
- markup the acronym package
- markup the fixme package so the \fixme{} is easy to spot.
Many of these changes are not essential and mostly eye candy. But
then: I like eye candy ;) Marking up commands that are not standard
TeX or LaTeX does have other benefits - if you have a different color
for recognized commands vs. words that start with \ - you kind of get
spell checking built in for commands ;) i.e. "no special color? Not
spelled correctly"
I am still not very comfortable with the whole language grammar
setup, but I am learning… a bit awkward is also the naming convention
- as I need a better understanding of the underlying logic in order
to apply stuff to latex. But in the end - it is just markup and as
long as there is some convention you can easily use the markup - but
names are names and if i call something text.latex or humftibunm
makes no difference to the machine -- just convenience for us users. ;)
A couple questions still bog my mind, though:
- Am I correct assuming that I can use a certain pattern just once?
When I copy a rule from Latex.plist to my custom.plist - only the one
encountered first gets to markup the text.
- Is there a way to markup a pattern with more than just one scopes?
Like for \begin{mycustomlist} set something like
meta.environment.list *and* meta.package.custom
Good night ;)
Dan
Dear TMaters,
Is there a way to parse an external file, say within my project, and
possibly defined by a project environment variable - to add certain
terms to my Language Grammar? This would be very useful for LaTeX
projects where you have different custom macros and/or different used
packages where you want some hi-lighting in your theme and thus have
to change the grammar file for all those changes. Better would be a
macro/script/whatever that would just scan the preamble.tex or so for
all my \newcommands and add them to the recognized scopes...
Or, less fun but still useful: one could write a file with certain
terms that need a new scope - and parse that from within the bundle.
I guess maybe this is overkill, but it seems to me that LaTeX is one
of the more customizable languages out there - and I at least would
love some more power-tools and flexibility on my fingertips *without*
running to write new regexp's every time (but then I am not familiar
enough with regexps to do so easily - maybe that will need to change).
What exactly IS the most useful way and best way in regards to
updating "official" bundles via svn to make customized bundles? How
can I make sure that I can still take advantages of "official"
changes that come via svn but still retain my customizations? (And
possibly be informed if there are conflicts - i.e. if there are
changes in a bundle where I have changes as well…?).
…Dan
Hi all,
Using TextMate and love using it in my current (Python) project.
I have a question though. I svn co-ed the
RegularExpressions.tmbundle, and installed it. Now is there a way to
get this to play nicely with Python?
Let me explain: In Python most regular expressions are defined as
follows:
blah = re.compile(r'...')
would compile the regular expression ... into blah object.
Now I would like the (regular expression code) inside the r'...' to
be colored with RegularExpressions.tmbundle. I think I can do this
somehow with scopes, but this is still my first week with TextMate,
and I don't know what I'm doing with it yet.
Thanks for the help!,
_Ryan Wilcox
Dear folks,
I have succeeded, a bit at least. I have been looking for a way to do
two things:
1. create markup for the different heading types
2. create some kind of mechanism that lets me extend the latex
grammar without the need to fiddle with the main latex grammar file
(as I would like to keep my edits separate from those within the svn/
official version).
The following is just quick description, I will clarify later if
there are questions… for now. And I will post some samples somewhere
if anyone cares.
solution for #2:
start the LaTeX language grammar with:
patterns = (
{ include = 'text.latex.user'; },
and define overriding patterns as well as new, custom patterns such
as stuff you would like for packages you use or macros you defined
yourself (useful since right now everything starting with \ is
colored, but in order to catch typos or whatever I like to have my
custom commands colored in a certain way - thus recognizing them
easier.)
solution for #1:
add those lines (adapted to each heading that should be styled
separately) before the main section recognition pattern:
{ name = 'meta.section.latex';
begin = '((\\(?:chapter))(\*?)(?:(\[)[^\[]*?(\]))??(\{))';
end = '(\})';
captures = { 1 = { name =
'support.function.section.chapter.latex'; }; };
patterns = ( { include = 'source.tex'; } );
contentName = 'entity.name.section';
},
further notes:
the includes may need to be adapted in the examples in order to
correctly parse things in bracket within your custom definitions.
Lessons learned:
* You should not create a circular include structure. This will crash
TextMate
* and thus: save early and save often. Just when does TextMate save
edited bundles? (I just quit TM, this does the job, but else? i.e.
after that crash I lost the work of about 2h ;))
Dan
Dear folks,
I would like to get some language grammar markup to the different
levels of headings in my Latex stuff - and thus I am trying to mess
with the grammar file. I have added rules like:
{ name = 'meta.section.level0.latex';
begin = '((\\(?:part))(\*?)(?:(\[)[^\[]*?(\]))??(\{))';
end = '(\})';
},
which seem to work - but I am losing the functionality of the
"regular" Latex grammar. So I am trying to nest the recognition
somehow, resulting in:
{ name = 'meta.section.latex';
comment = 'this works OK with all kinds of crazy stuff as long as
section is one line';
begin = '((\\(?:(?:sub)*section|chapter|paragraph|part|addpart|
addchap|addsec|minisec))(\*?)(?:(\[)[^\[]*?(\]))??(\{))';
end = '(\})';
captures = { 1 =
{ name = 'support.function.section.latex';
patterns = (
{ include = '#levelA'; },
);
};
};
patterns = ( { include = 'source.tex'; } );
contentName = 'entity.name.section';
repository =
{ levelA =
{ name = 'meta.section.level0.latex';
match = '((\\(section))(\*?)(?:(\[)[^\[]*?(\]))??(\{))';
};
};
},
but somehow this does not work. Any ideas what needs to be changed?
thanx,
Daniel
Hi TextMate list,
I just made, and uploaded to the svn repository, a bulletin board bundle
(BBCode). Let me know what you think. Specifically, does it match the
syntaxes of web fora other than Ars Technica, which I designed it for?
Ars's smileys are probably unique. Then again, I don't really know the
ins and outs of BBCode.
-Jacob
On Mar 24, 2006, at 10:38 AM, textmate-request(a)lists.macromates.com
wrote:
> The ideal case for me [...] would be that TextMate could detect
> "linked" lines in scopes and reflow them dynamically, so deleting
> characters from a long line would allow words from the surrogate
> lines to return to the first line, and typing characters on an
> intermediate line would reflow the block.
What you are really talking about is control of margins within a
plain-text document.
If this could happen in the display of the text within textmate
*only* and not be reflected in the document itself (with real line-
breaks), that would be a godsend. I'd use it every day.
howdy.
I just spend a couple hours making the Brilliance Black BETA theme[1]
work with LaTeX.
It looks a lot better than it did. It all does seem a bit too purple
since a lot of the language is functions.
There are some subtle things you might love to hate. Nested lists get
slightly darker text for each level of depth.
Thanks to David Levy for sending be a bunch of sample LaTeX files to
test with. It helped a lot!
Thanks also to Michael Sheets who sent me sample source files for a
whole slew of languages.
I wouldn't have bothered collecting and testing my stuff with all
these languages if it had not been for these guys.
[1] http://textmate.svn.subtlegradient.com/Themes/Brilliance%20Black%
20BETA.tmTheme
I have only updated Brilliance Black. I'm not going to get around to
updating brilliance dull for a little while. I'm still planning on a
Brilliance White, too. How interested are people in the alternate
versions?
thomas Aylott
subtleGradient
oblivious(a)subtleGradient.com
For historical reasons I would like to bind f3 to "close window" command. I
tried to record a macro, but as soon as I hit apple-w, the window obviously
closes but also the macro recording does abort. It would be simple if I
could just add in the bundle editor a macro doing "closeWindow" (I assume
that is the name of the command).
Cheers, Fons.
--
Org: CERN, European Laboratory for Particle Physics.
Mail: 1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers(a)cern.ch Phone: +41 22 7679248
WWW: http://fons.rademakers.org Fax: +41 22 7669640
http://trippledoubleyou.subtlegradient.com/textmate/taylott_svnlog.rss
My personal crazy textmate bundles and themes are now available in
RSS form.
Enjoy.
This is especially important for making sure you have the latest
version of my themes, as i'm updating the BETA themes constantly.
thomas Aylott
subtleGradient
oblivious(a)subtleGradient.com
Hi,
I am a newbie to TextMate.
I've tried to run a simple test with creating a
TeX document and running a latex (using the built-in)
bundle. I am getting the "unbound variable error"
when I try to execute the command. I get similar
problem with other bundles.
What seems to be the problem and how to fix it?
Thanks.
M.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
for all the germans using textmate for html-coding this little
command will lookup the current html-element on selfhtml.org. i'm
sorry as of now there's no english version of this excellent website
available.
regards, niko.
#!/usr/bin/env ruby
#
# open element reference on de.selfhtml.org
# this is certainly a BAD implementation
# works for me, though
# any improvements are highly appreciated
# niko.
require 'net/http'
$tag_name = ENV["TM_CURRENT_WORD"].to_s
# get the elemnte.htm and attribute.htm:
Net::HTTP.start( 'de.selfhtml.org', 80 ) do |http|
$html_elemente = http.get( "/html/referenz/elemente.htm" ).body
$html_attribute = http.get( "/html/referenz/attribute.htm" ).body
end
# strip the head and the current tag:
$html_elemente.gsub!(/(<!.*<body>).*(<h2><a class="an" name="#
{$tag_name}">#{$tag_name}<\/a><\/h2>.*?)<h2>.*/m,'\1\2')
# prepend "elemente.htm" to anchor-links:
$html_elemente.gsub!(/href="#(.*?")/,'href="elemente.htm#\1')
# the current tag:
$html_attribute.gsub!(/.*(<h2><a class="an" name="#{$tag_name}">#
{$tag_name}<\/a><\/h2>.*?)<h2>.*/m,'\1')
# prepend "elemente.htm" to anchor-links:
$html_attribute.gsub!(/href="#(.*?")/,'href="attribute.htm#\1')
# concat the two strings:
$html = $html_elemente + $html_attribute
# turn relative links into absolute links (for hrefs and imgs):
$html.gsub!(/href="(.*?")/,'href="http://de.selfhtml.org/html/
referenz/\1')
$html.gsub!(/src="(.*?")/,'src="http://de.selfhtml.org/html/referenz/
\1')
# output the html
puts $html
--
____________________________
niko dittmann <ni-di(a)web.de>
____________________________
I'm not sure what XCode, or BBEdit, call them - and I'm also not sure
if this has been discussed in detail on this list - but has there
been any thought to having a double-paned view in Textmate?
Being able to have two documents open side by side could be extremely
useful.
Colin D. Devroe
Thomas,
I really like the work you have done so far on say the iLife theme,
also the Brilliance beta seems cool, although I will need to test it
if it is useful for work ;) I have never had a non-white background yet.
I am looking forward to your theming-howtos. Will you cover just the
theme parts or will you include some stuff about the language grammar/
markup side of things as well?
Daniel
…who just figured out that combining two selectors in themes with
transparent colors makes for very cool effects.
Howdy. I'd just like to revive this old feature request.
I have a much large monitor than ever before.
I also develop rubyonrails apps, so most of my files are rather short.
I want to keep the window the full height of the screen. But when I
do that the code is all stuck to the top of the screen.
It's much easier to code when the code i'm editing is in the middle
of the window, in the middle of the screen.
Any chance of adding an extra half page of scroll space to the top
and bottom of the text pane?
Maybe it could be a preference for people who'd hate it.
Thanks, much much!
> oh yes. this would be lovely icing.
> not particularly necessary functionality, but the mac isn't about
> bare necessities.
> it's about making things lovely to use
>
> On Aug 24, 2005, at 11:46 PM, Ivan wrote:
>
>> Hi,
>>
>> Half window view is like adding "virtual space" in text windows to
>> push the last line to the middle of the windows. It behaviors as if
>> you have added a couple of returns at the end of the document. I hate
>> to see all the lines in the viewing area pushed up everytime I hit
>> return or softwrap to the next line. With half window views, the
>> lines
>> only get pushed up every half window instead of every line.
>>
>> I use this feature a lot in vim and TextWrangler. In vim, it can have
>> any number of virtual space (denoted by tildes), which I think it's
>> better implentation than TextWrangler, which allow you to choose
>> "none", "half", or "full" only. However, I will be happy with just
>> one
>> option, half window view.
>>
>> Anyway, I just want to bounce the idea to other users.
>>
>> Ivan
Hi,
This is a bit off-topic for this list, I know, but since I know there
are a lot of highly competent people on this I'll give it a try...
I'm currently trying to figure out how to use regexp + javascript to
parse the content of a web page. What I want to do is collect weather
data from a Norwegian website and include it in a dashboard widget.
Here is the site with an example search:
http://tux.aftenposten.no/weathersearch/weathersearch.do?
name=levanger&sok=limnor
I tried to copy the source into TextMate and use the regexp search in
TM to figure out the patterns to use, but I can't seem to solve it.
Any help are appreciated.
As far as I can see, the weather data for a particular day are
enclosed by <tr><td class="idag" ... </tr>, but there is a lot of
space around the tags, which I presume must be included in the regexp
patterns.
Anyone here which could kick me in the right direction when it comes
to these patterns?
--
Mvh/Regards
Geir-Tore Lindsve
lindsve(a)bluezone.no
http://www.lindsve.net
Is there a way to get TextMate to treat files with the extension
"webarchive" as binary files? As Text they are useless and I'd love
to just double-click on them in the project window and have Safari
open them.
Dear TextMaters,
I am looking for a theme that works very well with LaTeX - I don't
care much about colors and such, yet. But it seems that TM provides
some very detailed features for syntax coloring and I am not happy
(yet) with the themes I have found so far, I would like much more…
so I am looking for either a theme base for latex that at least has
styles already defined for most sections, or some pointer on how to
best design a theme, how to find out the scopes for sections of text…
basically an in-depth-tutorial or documentation for the theme design?
(Maybe I am looking at the wrong places…?) Is there an easy way to
extract all possible scope selectors from a languag definition and
create a blanket theme out of this?
Dreaming?!,
Dan
Hello,
those of you that use LaTeX a lot, you might be interested in
checking out the LaTeX experimental bundle that i just checked into
the repository. It's got a couple of commands that are still "rough"
and not quite production ready, hence the title "experimental".
One simulates the greek letter method of inserting letters commonly
found in emacs (i.e. first press shift-ctrl-g, then the letter, then
space).
Another encloses the current sequence of non-space characters in
dollar signs, so you could for instance type: \sin ctrl-$ and get $
\sin$.
Another, given as a selection a math equation of the form $...$ or $
$...$$ or \(...\) etc, it toggles the math symbols. I.e. it will take
$foo$ and \(foo\) to \[foo\] and vice versa.
Finally, the home and end keys are bound to two macros that are
inspired by Thomas Aylott's macros for moving about in HTML
documents, except they try to do a descend job with LaTeX.
All these are work in progress, and any ideas/contributions/
suggestions are more than welcome.
Haris
Hi,
is there a way to, when saving, to remove all trailing spaces and tabs
from lines. I would like this when saving C++/C files.
Cheers, Fons.
--
Org: CERN, European Laboratory for Particle Physics.
Mail: 1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers(a)cern.ch Phone: +41 22 7679248
WWW: http://fons.rademakers.org Fax: +41 22 7669640
I use reformat paragraph a lot for reStructuredText. Normally the
text is not indented so reformat paragraph works well. However, for
lists and other things that are indented, reformat paragraph works
unexpectedly. When I reformat a paragraph that is indented by a
single tab the indented text is indented with spaces. So, the first
line still contains the tab I inserted, but subsequent lines are
indented with spaces. This of course causes issues with the reST parser.
My question, is this something I've screwed up in my settings or is
this expected behavior? I expected whatever indent I started with to
be copied to subsequent lines. Nothing turned up when I searched the
mailing list. Any help is appreciated. Thanks _matt
Hi, I have a Python C module, and comments between the
end of the arguments and the opening brace seem to screw
up its ability recognize the function name:
static PyObject *
tableio_writeTable(PyObject *self, PyObject *args) /* args: (string) */
{
/ * function body */
}
I'm not sure how to modify the module to get this to work.
Putting that comment somewhere else makes it work fine,
but I'd like to avoid having to go through the code and
editing every function definition.
Can someone offer a hint as to how to fix the module?
TIA,
Dave
Howdy.
Just wanted to let you guys know about my new theme.
http://macromates.com/wiki/Themes/UserSubmittedThemeshttp://textmate.svn.subtlegradient.com/Themes/Brilliance%20Black%
20BETA.tmTheme
I'd like you guys to test it our for me and let me know if any of it
looks ugly or unusable with the code that you use.
I developed primarily for xHTML, CSS, JS, RubyOnRails & Ruby.
I also tested and tweaked it for: actionscript, Ada, ANTLR, asp,
asp.net, C, C++, obj-C, embedded Django, java, markdown, MIPS
Assembler, Perl, PHP, Python, Slate, SQL, xml
XML is currently rather hard to read without a bright monitor.
PHP could use some color tweaks to look less ugly. (even though php
doesn't deserve to look pretty ;) )
I haven't tested it with LaTeX, yet.
I got some great code samples from <insert name here, because I
forgot it>
If anyone uses a language where this theme looks ugly, please let me
know.
The idea of this theme is to be the ultimate theme prototype that all
themes are based on.
I, personally, will use this theme as the template that all my new
themes are based on.
So I really want to get the scopes as perfect and all-encompassing
as possible.
Thanks!
Enjoy ;)
PS: no screenshots of it yet.
thomas Aylott
subtleGradient
oblivious(a)subtleGradient.com
I created a poll on the wiki to get a feel for which languages
TextMate is primarily used with:
http://macromates.com/wiki/Polls/WhichLanguageDoYouUse
Cast as few votes as possible, i.e. do not add points to languages
you rarely use (it is not a poll about how many languages people
know, but which they actually use regularly).
Be vary of edit conflicts on the wiki page. These will be detected
automatically, but needs manual resolving -- it is probably easier to
just start over, if one happens (the wiki presents the diff when
committing the edit when there is a conflict).
I think queuing theory dictates that some edit conflicts are bound to
happen, given the number of subscribers to this list, but I am not
writing specific polling functionality just for this :)
Hi All,
I have been using textmate for a little over a week now and I love
the program. I have been using it for mostly RoR and HTML Development
but I am looking for a bundle that will help me create MySQL DDL
files. Any Ideas?
David Newberger
A search of the ML archives has come up empty, so I turn to the
mothership: I have a problem.
Textmate is selectively refusing to open (or, rather, display) files
that it should have no problem with.
Some quick and dirty testing seems to indicate that this has to do
with specific file extensions. It first manifested with a problem in
using the "Edit in TextMate" command, but now I fear it's more
widespread than that.
First, an example to show what the behavior is like. Then, how it
affects the whole system.
### Illustrative Example ###
At the moment I am writing this email in TextMate, via using the
"Edit in TextMate" command.
The file:
/private/var/tmp/folders.501/TemporaryItems/Trouble with "Edit in
Textmate".mail
opens just fine in TextMate. An experiment shows that I can open it
fine from the Finder by dragging it onto the TM icon.
However, when I tried to write this email from gmail, and used the
"Edit in TextMate" command from within Safari, it changes focus to
TextMate, but no file opens.
A file has been created:
/private/var/tmp/folders.501/TemporaryItems/Loading “Gmail - Compose
Mail”.safari
But textmate won't open it, not via File:Open, not via a drag to the
dock, and not via Get Info association of .safari files with TextMate.
__However__. If I select _more than one_ .safari file in the Finder,
and drag them to the TextMate, a very odd thing happens.
Textmate opens a new project with the three files listed. But
clicking on one of those files doesn't actually open the file:

You get a blank tab. Clicking on that tab _does_ display the file:

So there's something odd going on here.
Another wrinkle is that, once you've clicked the tab and closed it
once, it opens properly from the Project drawer. But not from the
Finder or File:Open or the "Edit in TextMate" command.
(Yes, I am OCD about checking things like this out, why do you ask?)
I thought this was just for items in the TemporaryItems folder. But,
it seems, I was wrong about that. I dragged a .safari file to the
desktop and tried to open from there. No dice. Same odd multiple-item
behavior.
### The Real Problem ###
The loss of "Edit in TextMate" from the browser is, for me, bad
enough. I have tasted the "real text editor for the browser" crack,
and I'm hooked.
But what really gets me is that this started with .php files, in
Transmit. And I can't open .php files at all.
I first edited a .php file remotely in Transmit, off my SFTP server.
Saved the contents, got a system beep, closed it. Totally normal,
except that after that, .php files broke.
Same behavior as above: I try double-clicking a .php file in the
Finder, I get TextMate open and nothing else; no document window,
nothing. Multiple .php files = a new project with multiple files in
the drawer. Clicking one gets a blank tab. Clicking the tab shows the
file.
Now, I _can_ edit non-php files remotely in Transmit. HTML works
fine. Python works fine. But no .php
Naturally, I spend most of my remote time editing .php files these
days. :/
I'd prefer not to have to totally nuke TextMate, but I would really
dearly love to have a functional text editor.
Thanks in advance.
Cheers,
--
Josh DiMauro
josh(a)metacarpal.net
http://blog.metacarpal.net
All my troubles with TextMate seem to do with language grammars. Here's
another issue I can't work out on my own...
I'm trying to add " case 'something': " to the Symbol List in the PHP
language grammer. I've added the following pattern:
{ name = 'meta.symbol-list.php';
match = "\bcase\s+[^:]+:";
},
And after also adding a showInSymbolList preference item it does place
all case items into the symbol list. But the unfortunate side effect is
that the text is now not in the keyword.control.php scope, so has no
syntax highlighting.
How to give more than one scope name to a pattern? I don't want to
include ALL the matches for keyword.control.php in my symbol list.
Thanks, Quinn
Hi all,
Recent user of TextMate... I've downloaded the latest bundles via
subversion and have noticed a problem with the vb.asp.net bundle.
If I try to open an .asp file, which is not a .NET file, just plain
asp, there are errors generated in the Console:
TextMate: zero width match (swallow pattern) {
begin = "\\(";
"begin_nfa" = <058c1720 >;
end = "\\)";
"end_nfa" = <006192d0 >;
name = "meta.round-brackets";
patterns = ({include = "source.asp.vb.net"; });
swallow = "(\\([^\\)]*[^\\)]*\\)|s*\\n*s*)";
"swallow_nfa" = <04ed1cb0 >;
}
TextMate: zero width match (swallow pattern) {
begin = "\\(";
"begin_nfa" = <058c1720 >;
end = "\\)";
"end_nfa" = <006192d0 >;
name = "meta.round-brackets";
patterns = ({include = "source.asp.vb.net"; });
swallow = "(\\([^\\)]*[^\\)]*\\)|s*\\n*s*)";
"swallow_nfa" = <04ed1cb0 >;
}
TextMate: zero width match (swallow pattern) {
begin = "\\(";
"begin_nfa" = <058c1720 >;
end = "\\)";
"end_nfa" = <006192d0 >;
name = "meta.round-brackets";
patterns = ({include = "source.asp.vb.net"; });
swallow = "(\\([^\\)]*[^\\)]*\\)|s*\\n*s*)";
"swallow_nfa" = <04ed1cb0 >;
}
...about 39 times. I'm not sure if it corresponds to anything in my
.asp file. It's a rather simple file.
Also, if I create a new HTML file using the New from Template -> HTML
command, and I try to insert a <script> tag in the header, TextMate
will make an error sound, and for each key I try to type within the
script tags, the error "ding" sounds. In the Console, many errors like
this are shown:
2006-03-18 22:00:22.896 TextMate[16514] didn't find rule named
source.js.bracketed
2006-03-18 22:00:22.898 TextMate[16514] didn't find rule source.js.bracketed
To get rid of the errors, I deleted the vb.net bundle (I don't do
.NET, so no great loss), but I thought I'd report it.
I suppose I should send this off to support too..
Thanks.
Hey all,
today i've discovered may be a prob with file encoding (???) over
a .txt file.
my pref setup is tuned to UTF-8 and a text file edited by TextMate
was MacOS Roman, something to avoid definitely...
then, using another text editor i've converted this file to UTF-8 and
discovered again that after having edited this file with TextMate the
file becomes again in MacOS Roman...
the symtom is that TextEdit (also setup default to UTF-8) is unable
to open the file.
did other get about the same prob ???
Yvon
I'm helping a group that I consult with in customizing TextMate for
their PHP development.
They have a library of functions within their company that they want
to have syntax-highlighted, similar to the built-in PHP functions.
I accomplished this by creating a custom bundle, making a scope for
their functions and adding the appropriate functions to the patterns
section of the new language file.
My problem is this: In order to get this new scope included with PHP
files, I modified the default PHP.tmbundle with
{ include = 'source.php.ccb'; },
This works great, everything highlights. *But*, now this is a custom
PHP bundle, and any updates to the default will be masked, until the
new default is manually changed.
Is there any way that I can "inject" my new scope into the PHP bundle
without modifying the PHP bundle itself? I tried adding another
language to my custom bundle, and just putting the include line in
for the source.php scope. This disabled all the other PHP functionality.
Thanks for the help,
Ken Scott
I was trying to install the footnote plugin from syncPeople on Rails,
and nothing happened. Then I fiddled around a bit and detected that
Show Scope didn't work either. So I thought maybe there was a problem
with the path $TM_xxx variables (those are paths, mainly, right?). So
using appZapper I did a complete reinstall and I think I've put
everything in the standard place but still no luck, neither plugin
install nor showing of scope works. Any help? I have all bundles
activated and I've also activated the macros using the automation
menu so as to avoid any keyboard mistypings.
Andreas
I've been experiencing a problem in the otherwise excellent Textmate,
it's related to tab-completing a snippet within a tab completed
snippet, here's a simple example to illustrate my problem:
I have created a new text.html document and typed mailto<tab> to get
the mailto snippet, now in the href value I am attempting to insert
another snippet I've created which is a shortcut for my email
address, unfortunately it assumes the shortcut is the value for href,
then moves to the subject value.
I can understand why Textmate works this way, after all, why would
you want to insert a snippet in to a field which expects a literal
value, but ideally I would expect it to tab-complete the email
address, then another tab to move to the subject field.
Hi guys,
I seem to have somehow hosed my bundles or commands or something.
Lot's of things don't work such as CMD+/ for comments or CMD+RETURN
for end of line then return, etc.
Is there anyway I can get fresh default bundles? Or is there
something else I can do to fix these things?
Sean
:::: DataFly.Net ::::
Complete Web Services
http://www.datafly.net
I changed the foldingStartMarker to this:
'^.*\bfunction\s*([\$|\w]\w*\s*)?\([^\)]*\)(\s*\{[^\}]*)?\s*$';
The only reason is that now I can fold this funny-named prototype
function:
function $()
Anyway, if you want to commit this change...
I'm just now playing with TextMate for the first time and, of course,
had to futz with themes a bit to get to my preferred light-on-dark
kinda coding environment....
Question: How do you tell what scope is under the cursor?
I found that I really liked Vibrant Ink, but it lacked scope
definitions for Objective-C and some of the other modes I end up
dealing with. However, the built in Espresso Libre did a pretty good
job otherwise. Since copy/paste didn't work in the Prefs pane
(Feature! Feature!), I ended up copying the various random settings
elements from one plist to the other.
Being too lazy to actually sort out the dupes, I wrote a wee bit of
python (you'll need PyObjC) that rips through the resulting plist and
eliminates duplicate settings (names only).
http://svn.red-bean.com/bbum/trunk/hacques/TextMate/
It is dumb. It should normalize by scope. I should fix that.
Actually, it really is broken -- it really should normalize by
scope. Ah, well.. it'll limp along enough for now.
b.bum
Hi Folks
Let me begin by making clear that I'm not a programmer - I'm trying
out TextMate in HTML production, which may or may not be advisable. I
have been using TextWrangler for this purpose.
The problem I'm having is too much space is being inserted before and
after what is actually being copied and pasted, like at least a
couple of words length on each end. And that's making messy code.
I'm copying out of Dreamweaver and pasting into TextMate.
TextWrangler doesn't make this mistake. What am I not understanding?
I would prefer to use TextMate - text and code are easier to read and
the overall design of this app looks quite advanced to me. I might
use it for ActionScript in the future but I probably won't be using
90% of the features.
This app is not very accessible to non-programmers. Maybe that's how
you prefer it. Some beginning and mid-level tutorials and/or movies
would help a lot. The manual is more like a reference book, rather
than showing it in application. Just to say you might get better
adoption of this beautiful app with better teaching of it.
Kearney Buskirk
I downloaded the Prototype and Scriptaculous bundle from
http://encytemedia.com/blog/articles/2006/01/03/textmate-vibrant-ink-
theme-and-prototype-bundle
but it seems not to be working (yes, I have activated it)
I don't get any syntax highlightning from it in either html or js
files, and this is supposed to happen as far as I understand?
Andreas
I am a recent convert to TextMate, but for some reason (probably me
fooling around in the app) I no longer get any content to show up in
the Function/Symbol field down to the right in the editor for my PHP
and HTML files. Now I just want to restore the default settings for
such files - is this possible while still retaining my other
settings? If so, could someone point me in the right direction?
Cheers,
Egil
--
egil helland / it consultant (mcse, web technology)
web: ikon.as / egil.net mob: +47-91315555
My apologies if this has been asked before but I hadn't seen it...
Is there a way to use TextMate to View Source in Safari (or any
browser for that matter)? Gosh would this be handy, I have a safari
plugin that at least shows the source in color, but of course,
anything I can do in TextMate is better!
Thanks,
Ray
--
Raymond Brigleb, Needmore Designs
http://needmoredesigns.com/
Love the TODO bundle and use it everyday to keep track of several
projects. What I would like to do though is print out the HTML output
the bundle produces. In otherwards, use COMMAND-Ndto print the window.
Any suggestions?
Thanks
Robert
Hi,
I saw some old posts on the mailing list regarding the pause (several
seconds) that the user experiences when switching back to TextMate
from some other application when a project contains files mounted
over NFS. An fs_usage confirms that it probably is the 1000's of
fstat() calls that TextMate does when activated that is causing the
pause.
Is this due to be fixed anytime soon, and in the meantime, has anyone
found any workarounds for it?
Thanks,
Geraint.
I am writing a script to parse a binary file in ruby. According to
the documentation on the file format, the integers are in little-
endian format. When I take the script, read the appropriate part of
the file, then 'unpack' with 'V' (little-endian), I don't get the
right answer from the internal "Run script" command. I do get the
right answer if I change to unpack with 'N'. However, if run from
the command line against Apple Ruby (/usr/bin/ruby 1.8.2) or against
Ruby compiled with DarwinPorts (/opt/local/bin/ruby 1.8.4), I get the
appropriate result with 'V' (as I should).
This seems to be a bug to me, though I'm not sure I'm missing
something here. Can someone either confirm this is a bug, or
alternatively explain to me why things are behaving in this way.
-albert
Hey all,
from time to time TextMate wants my password in order to save a file
having the following perms :
-rwxr-xr-x 1 yvon yvon 591 Mar 12 10:19 run.rb
even after entering the correct pwd, i'm unable to save the file
thought i've found a workaround :
copy the content into the clipboard ;
close the file without saving ;
re-open the file ;
paste the clipboard within this file.
have you heard of such a behaviour ?
best,
Yvon
I am working on an macro in which the selected text will be filtered
through one command and then all the text after the selection will be
filtered through another command. After the first command is
finished, the transformed text is selected, and I need to deselect it
and put the caret immediately after it. I had thought that hitting
the right arrow key would do the trick, but found out [that doesn't
always work][1]. Is there a foolproof way of getting the caret to
land right after the selection?
And while I'm asking questions, two more:
1. Is there a way for a command to call a macro?
2. Can a macro be made to behave differently depending on whether
text is selected or not?
[1]: http://lists.macromates.com/pipermail/textmate/2006-March/
008901.html
--
Dr. Drang
Hello,
Yesterday I decided to give TeXniscope a try after watching the
screencasts from Haris (btw, great screencasts!)
I have a problem making TextMate using TeXniscope though. I have set
the TM_LATEX_VIEWER variable to TeXniscope, and in TeXniscope I have
set the editor command path to /usr/local/bin/mate and the editor
arguments to %file -l %line.
When I typeset the document, TeXniscope doesn't open at all and the log
window shows this message:
******************************************
Compiling LaTeX...
This is pdfeTeXk, Version 3.141592-1.20a-2.2 (Web2C 7.5.3)
Typesetting: ./test.tex
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
Typesetting: ./test.aux)
(/usr/local/teTeX/share/texmf.tetex/tex/context/base/supp-pdf.tex
Output written on test.pdf (1 page, 20593 bytes).
test.log
Success
2006-03-08 08:59:20.072 open[11309] LSOpenFromURLSpec() returned -10827
for application TeXniscope path /Users/geir/Desktop/test.pdf.
2006-03-08 08:59:20.074 open[11309] Couldn't open file:
/Users/geir/Desktop/test.pdf
******************************************
The document I'm trying here is a fresh document from the article
template.
Any idea of a solution for this?
(TeXniscope version 0.3.4, and TextMate version 1.5(906))
--
Mvh/Regards
Geir-Tore Lindsve
lindsve(a)bluezone.no
http://privat.bluezone.no/lindsve
Hi all,
I'd like to announce Keyref, a little app for turning TextMate's
keyboard shortcut list into a PDF reference card. Go to http://
keyref.octopod.info and follow the instructions to generate your own.
You can choose up to eight of the bundles you have installed to add
to the card and generate as many as you want.
I built this because I switched to TextMate just over a month ago and
found myself very lost initially. Several people found the first card
I generated useful so I decided other people might and ended up with
the web app. It takes the shortcut list TextMate generates, so will
include all your own shortcuts as well as the standard ones.
If you find this useful, or have any problems, please let me know.
Cheers,
Chris
http://keyref.octopod.info
Hi all,
I get this error message with some commands launched by plugins :
- the TDDMATE commands
- the external syncPEOPLE on Rail commands
(ex: rake migrate)
- ..
AFAIK, my config is standard (PowerBook, Locomotive, EdgeRails, rake 0.7.0)
Any idea?
Alain
On various Windows editrors I can use Cltr+[ to jump beetween mathching
pairs of braces and parens.
Is there such function in TM? I haven't found it in menu and built-in help.
BTW: is it possible to re-assign Cmd+[ to tab? (only if some text is
selected, ofcourse)
--
regards, porneL
Hey all,
i'd like using, from TextMate, ruby scripts making use of :
require 'xml/libxml'
for the time being i get an error :
LoadError: no such file to load -- xml/libxml
i think i could be coming from $LOAD_PATH (for ruby) not set-up
correctly.
i did a ~/.MacOSX/environment.plist
with only the PATH assigned.
does i need to add something equivalent to :
export RUBYOPT=-rrubygems
export GEM_HOME=/opt/local/lib/ruby/gems/1.8
being in my zsh init.
or all of those kind of setup could be done thru TextMate setup, but
how ?
obviously my script making use of libxml binder is working from
terminal.
best,
Yvon
Hi,
when i tried to run generic complete in a latex file (to complete a
\ref) I get the following inserted,
\ref{/bin/bash: line 1: /Macros/LaTeXcomplete.pl: No such file or
directory
}
can anyone help?
many thanks
Jeff
I'm interested if there is a way or technique (or even "trick") that
will allow me to track and resolve naming dependencies in a TextMate
project.
Specifically, I'm thinking of the situation where, as I develop a web
site, I decide that I need to move or rename an existing file. In
order to prevent the website from breaking, I must then locate and
change any and all references to that file in ALL of the files in the
project. I can use Find and Replace in Project to accomplish that,
but this is hardly proactive on the part of TextMate. I have to stop
to do it, or *remember* to do it later.
If I were using GoLive or Dreamweaver I assume that if I changed the
name of a file in a project, I'd get a message that that file was
referenced in "X" number of files and would I like to update all
those files to reflect the new name?
Is there any way now (or might there be any way in the future) to
handle this situation?
I'm not programming in C or the like, but it seems to me that a
similar situation could occur there: Say that for some reason you
change the name of an include or header file... you'll be into a real
mess if you don't detect all the locations in the code where that
file is referenced and change it! OR... if you change a variable
name for some reason, references to that name will need to be changed
(even though we aren't changing a FILE name in that case).
Thanks,
eo
Greetings all,
I'm getting this: interpreter failed: No such file or directory
When using cmd-/ to add comments.
It's happening in various language formats.
I've tried some of the ruby path type solutions, but I'm not having any
luck.
Could someone point in the right direction to investigate this.
Dan J.
=======================
Daniel Jewett
Solid Ether
22 Church St.
Tarrytown, NY 10591
ph: (914) 332-7513
dan(a)solidether.net
http://www.solidether.net
Anybody wish to help me with a pattern for the PHP language bundle? I
have embedded SQL under a variable such as below. I'm having trouble
excluding the addslashes part from the scope.
$sql = "WHERE category = '" . addslashes($category) . "'";
...or...
$qid = DB::query("
WHERE category = '" . addslashes($category) . "'
");
The pattern I've come up with so far:
{ name = 'meta.scope.sql';
begin = '(dbQuery|DB::query)\("|\$\w*(sql|where)\w*\s*=\s*"';
end = '"\)|";';
patterns = (
{ include = 'source.sql'; },
);
contentName = 'source.sql.embedded';
},
I'm new at this so any help would be appreciated.
Thanks,
Quinn
Whenever I run an external command, I'm getting errors about missing
require_cmd or CocoaDialog. I've followed some of the tips about
looking in $TM_SUPPORT_BUNDLE/bin and such but can't seem to find
those commands/scripts.
Is there something broken with my install I can fix?
-jon
I have playing with TextMate for about a week and don't seem to find
a "bracket" matching feature.
Example, when I double click on a { or [ or (, the match closure is
found and all code in between is highlighted. Or something to that
effect. I have seen other editors simply highlight both the begin
and end characters when the cursor is on one of them.
Am I missing something obvious or does this not exist?
thanks, ke han
Hi
Here's a question for the latex pro's: Do you know if special
characters like german umlauts are allowed in labels? e.g.:
\section{Mein grünes Apfelbäumchen}
\label{mein_grünes_apfelbäumchen}
It works when typesetting the document. I just wanted to know if this
is valid code. Because if _not_ then it would be nice, if these would
be escaped automagically when using the section, subsection and
subsubsection snippets. E.g.:
\section{Mein grünes Apfelbäumchen}
\label{mein_gruenes_apfelbaeumchen}
If it's easier to accomplish, you could also just escape a for ä, u
for ü, and o for ö, etc.
Another nice enhancement would be if the \section and \label commands
would each be on a seperate line. I just asked about the oppinions on
this in the irc channel and I got at least one more vote for this ;-)
Cheers. Oliver
When I select a word by double-clicking on it and then hit either the
left or right arrow key, I expect the word to be deselected and the
caret to end up at the start or end of the word. This isn't what TM
[Version 1.5 (906)] is doing for me now, and its breaking a macro I'm
trying to create.
It appears that hitting an arrow key with text selected by double-
clicking puts the caret one character to the left or right of where
the double-click happened. No other current Mac program that I use
does this, nor can I remember any other Mac program ever behaving
this way (going back to 1985). So, unless I've inadvertently changed
some setting to start this behavior, I would call this a bug.
FYI, the arrow keys work as expected when the selection is made by
swiping or shift-clicking.
--
Dr. Drang
I've released version 2 of my screenwriting bundle.
release: http://ollieman.net/words/2006/03/
screenwriting_with_textmate_20.php
bundle: http://ollieman.net/code/screenwriting/textmate/
---
I've tried to document it into the ground, which is the reason there
are so many instructional videos. (I hope you finally understand what
I'm doing, Haris)
From the release:
> It may seem oblique that the reason I learned the first bit of CSS
> and XHTML I did was because late one night I was pissed off at
> Final Draft for crashing for the 3rd time in a row. I was convinced
> that there had to be a better way, that there had to be a way to
> write screenplays that didn’t hurt. I don’t remember why this
> propelled me to CSS, but it did.
>
> Well, I can now firmly say that I have found a way of writing
> screenplays that doesn’t hurt. Never-mind that I had to build it
> myself, never-mind that the process took me over a year. I’ve found
> it.
I'd like to take a second and thank all of you for helping me with
this. It's an amazing thing that I've managed to build for myself (at
least) an end-to-end solution for writing screenplays that I actually
enjoy using. And no small part of that is due to the users of this
list, you have made this a learning experience that has resulted in a
useful tool.
It's not just that TextMate is my new favorite app. It's that I feel
as though Allan and the community around TextMate are genuinely
working together to advance the quality of our collective writing
environments; it's not just features and buttons, it's progress. And
for that, I cannot thank you enough.
-- oliver
ollieman.net
Just a quick question this time.
Is there any practical difference between 'edit›select›paragraph' &
'edit›select›line'?
I expected that 'select›paragraph' would not select the newline at
the end of the string, leaving me free to delete a block of text and
not remove the line itself from the document. This (expected)
behavior would really be nice for some macros I'm working on.
— oliver
I've been using TextMate for Ruby on Rails development for over a month
now. One thing I missed from some Java IDEs was documentation popup.
With TextMate, you can hit control-H on a symbol and the Ruby bundle
will use `ri` to try to find it. Sometimes it works, sometimes not.
However, Ruby gems (such as Rails) are not processed for use by ri. To
do that, you have to do it manually. I performed the following this
task with just one command on the terminal:
rdoc --ri-site /usr/local/lib/ruby/gems/1.8/gems/act*/lib
The '*' will expand to all of the active... action... stuff that is for
rails. Once this completes (which will take a few minutes), you can
finally use control-H for rails related classes and methods and get
quick access to documentation. Sweet!
Oh, for some caveats on this technique, check out this URL:
http://www.codecomments.com/archive327-2005-5-510886.html
So basically this technique isn't perfect but it's better than before.
~ Dave Smiley
Hi all,
I'm having problems with big files. TextMate, for me, is practically
unuseable for many applications, and I'm not sure wether something is
wrong, or I'm just witnessing limitations of the app itself.
TextMate takes upwards of 3 minutes to paste moderately long pieces
of text (30-70 KB) without line breaks. I use TextMate to edit
Wikipedia entries, which are sometimes badly formated. Thirty
thousand characters and not a newline in sight. When I copy texts
like that and try to paste them into TextMate, it practically dies.
Three times out of five, it won't recover. If it comes back, it's
unbearably slow and practically unuseable. Am I doing something
wrong, or is this a known issue? I am on a G4 1,25GHz with 1 GB of RAM.
Firefox's textfields can handle pasting and editing of 1MB snippets
(I tried) without a hitch, EVEN in those JavaScript rich editor
abominations, which probably aren't the most optimized pieces of code
ever to parse text. And that's with all the other crap going on, like
10 tabs open and several exensions installed.
What's going on?
Michael Ströck
Hey all,
I just started tasting TextMate today, great app.
I was wondering is there any trick to get "creating files from
templates" functional? I mean nothing happen when I click the
"create" button.
Here's some error from my console.log that I guess which is related
to the problem I'm facing:
2006-03-07 18:26:01.742 TextMate[2305] Error laoding '/Applications/
TextMate.app/Contents/SharedSupport/Bundles/Java.tmbundle/Templates/
addrbook.awk/info.plist' as Templates
2006-03-07 18:26:01.742 TextMate[2305] Error laoding '/Applications/
TextMate.app/Contents/SharedSupport/Bundles/Java.tmbundle/Templates/
templatize.sh/info.plist' as Templates
Tank you for your help.
S
When writing Markdown, I like to use reference-style links:
[link text][id]
.
.
<rest of text>
.
.
[id]: http://www.site.com
I've written a snippet that does some of what I want:
[${1:description}][${2:id}]$0
[${2:id}]: ${3:href}
but it puts the reference on the line below the link rather than at
the bottom of the file. Although I haven't done it, I suspect that
writing a command that takes the link label line and puts it at the
bottom of the file wouldn't be too difficult. But before I give it a
try, I'd like to know if it's possible to combine the snippet and the
command into a single instruction that allows me to enter the 3
pieces of information, puts the link label at the bottom of the file,
and leaves the caret back at the [id].
--
Dr. Drang
It seems that the CMD-CTL-G "New Folder" shortcut isn't working. Is
anyone else having this problem, or is it just me? Cheers,
Ben
___________________
Ben Jackson
Diretor de Desenvolvimento
ben(a)incomumdesign.com
http://www.incomumdesign.com
On Mar 6, 2006, at 4:43 AM, textmate-request(a)lists.macromates.com wrote:
> From: Domenico Carbotta <domenico.carbotta(a)fastwebnet.it>
> Date: March 5, 2006 2:39:50 PM MST
> Subject: Re: [TxMt] Latest Python Bundle?
>
> Il giorno 05/mar/06, alle ore 21:39, Owen Densmore ha scritto:
>
>> Are these in the Subversion repository? I tried to download the
>> entire bundle set from svn using the instructions on:
>> http://macromates.com/wiki/Main/SubversionCheckout
>> but it had an error.
>
> probably you should've set UTF-8 as the text encoding. if you've
> already done it, paste the error message so that we can help you :)
Domenico: Grazie mille per la aiuto! Vorrei tanto essere in Italia
adesso.
Well, naturally as soon as I try to re-create the error I got,
everything worked fine! I just checked out all of revision 2825 with
no error so likely everything is fine.
> the rationale for not providing "for", "if" and such snippets is
> that they're not _that_ useful in speeding code writing. I don't
> use the "def" snippet either... :)
> the "class" snippet is useful mainly because of the smart-
> constructor feature.
Thanks for the clarification .. I do agree python is so brief and
clear that it doesn't need a lot of extra help.
> ciao,
>
> Domenico
-- Owen
Owen Densmore
http://backspaces.net - http://redfish.com - http://friam.org
Hello,
I've been a lurking member of this list for some time, but this is my
first attempt at posting. I've been trying out TextMate in demo mode
and plan to buy it because it's nearly perfect for the way I work,
but I have a couple questions I'm hoping somebody could clear up for me.
I'm not a programmer, so please forgive me if my questions seem
somewhat elementary. I do, however, use the Terminal quite often for
shell commands, and I understand PHP well enough to write code for my
own purposes. I prefer coding my web pages by hand, and I'm fluent in
XHTML and CSS and competent in XSLT. I'm a bit anal about clean
coding, usability, and accessibility (both for the end user and for
me when writing my pages). For these reasons among others, I've been
disappointed by virtually all of the website generation applications
and/or scripts I've tried. It seems they require lots of convoluted
configuration that just gets in my way. Besides, I'd rather just do
it all myself with flat text files, using scripting just to generate
the headers, footers, navigation, etc.
I'm not necessarily concerned with TextMate's ability to do the many
super-complicated things it obviously can do, as I probably won't use
most of it myself. However, I'm wondering if it has a feature similar
to the Persistent Includes available in BBEdit. I have examined the
manual and read about how to use snippets, templates, commands, and
the like, and I understand how these could be used to make my life
easier. The problem is that I haven't figured out if there's a way to
re-parse an entire project or certain files within a project after
I've made changes that will affect the output.
For instance, if I've used a script to output links to all the files
contained in the directory (as a navigation menu of sorts) but later
add more files to that same directory, I'd like to be able to re-
generate the entire site so that those new files show up in the menu.
Likewise, if I've generated prev/next links to other files in the
same directory, I'd like to have them updated without having to
manually type the new hyperlinks into each and every file of the
site. I know I could use PHP or server-side includes or something
similar (and I have written a simple php function to do just that),
but I'd really like to generate static web pages because having
dynamic pages online really isn't necessary for what I'm doing (also,
I can upload the same files both to .Mac and to my virtual host, for
example).
If nothing resembling Persistent Includes is available in TextMate,
another viable option would be to auto-generate the output of an
entire project but save it to a new directory on my system using the
same hierarchy of the original project. That way, I can simply re-
generate it whenever I need to. In fact, that would probably be a
simpler solution than the Persistent Includes idea, but of course you
all probably know much more about how to efficiently accomplish this
than I do. Also, if anyone could point me in the direction of a good
streamlined tutorial on how to use shell scripts in an environment
such as TextMate, perhaps I can figure it out on my own. The TextMate
manual is nice, but something more tutorial-like would help a lot.
Sorry for the long post - it actually started out longer with more
details about my background and what I do, but I figured people may
get annoyed, so I cut it. If I need to further clarify exactly what I
need to accomplish, please ask, but I suspect most of you are quite
familiar with BBEdit and know about how Persistent Includes work and
how they differ from regular Includes.
Thanks,
Crystal
I've made a bit of progress in writing a MediaWiki bundle, the goal
of which would be to allow one to use TextMate as an external editor
on Wikipedia and other sites using the MediaWiki software. I've
written an alpha version of a Ruby library to machine-read/screen-
scrape wiki pages -- for example:
page = new MediaWiki::Page('TextMate')
page.contents.gsub!(/Textmate/, 'TextMate')
page.save('Corrected capitalization')
I've also built a few proof-of-concept TextMate commands -- fetch
selection from Wikipedia, etc., and have done a very small amount of
work on a MediaWiki syntax grammar (though the one described here
<http://lists.macromates.com/pipermail/textmate/2006-January/
007623.html> might be further along).
In short, I'm trying to replicate as much as possible of the
functionality of mwjed <http://www.djini.de/software/mwjed/>, a jEdit
plugin with the same purpose. This would include being able to
configure multiple wikis independently, log in, etc., so the bundle
will have to keep track of a bit of configuration info.
If anyone is interested in contributing to this project in any way,
or has any ideas on how I can more elegantly keep track of a wiki
"instance" across individual pages, please let me know. I'm decent
enough in Ruby to get by (though my code could definitely benefit
from another pair of eyes), but if you've got specific expertise in
Objective-C I'd love your assistance in writing some dialogs like the
ones in the Subversion bundle.
The bundle is in no way ready for inclusion in the bundle repository,
but I can share what I've got with anyone who's interested. I invite
questions, comments, and general ridicule.
Cheers,
Andrew Dupont
http://andrewdupont.net
I'm using TextMate 1.5 (906), and just starting to get involved with
a couple of Python projects. I watched the Python screencast by
Domenico Carbotta .. quite nice!
But there are a few snippets missing, I think. I'd like to use
for<tab> to build a for-loop template. Ditto for all the controls
like if, ifelse, while, and possibly a few others.
Are these in the Subversion repository? I tried to download the
entire bundle set from svn using the instructions on:
http://macromates.com/wiki/Main/SubversionCheckout
but it had an error.
So basically I'm looking for a bit more python help in TM but not
sure how to proceed.
Thanks!
-- Owen
Owen Densmore
http://backspaces.net - http://redfish.com - http://friam.org
>> In the regular find window, there's that arrow button you can click
>> to get a multi line text field where to enter your search query,
>> but I don't see it when I do a search in whole project, which is
>> kind of a pain when looking for lengthy pieces of code...
>
> Do you know command-E? It places the selection on the find clipboard.
> 99% of the time, I want to find something which is already in my
> source, and never actually type it in the find dialog text fields
Thanks for the tip. But the situation I'm often confronted to in my
job is editing whole sites coded by others that have the same exact
HTML on millions of pages and I really need to use the project wide
search and replace feature in order to be anywhere close to
productive... If there's is any chance to implement the same collapse
window thinggy from the regular search in the future, it would be
great. Thanks again for your help.
I didn't know about command + / till the other day, however i've run
into a minor issue.
If I have source like the following:
function do_me()
{
/* this was some old shit */
/*
$var = blah
*/
echo 'hello';
}
the command + / shortcut will turn it into:
/*function do_me()
{
/* this was some old shit */
/*
$var = blah
*/
echo 'hello';
}*/
which is deffinitly a no go. how could I change it so that it would
result in:
// function do_me()
// {
// /* this was some old shit */
// /*
// $var = blah
// */
//
// echo 'hello';
// }
Thanks,
Eric Coleman
I am (almost done) writing an HTML output script for my Lua bundle
which (among other things) provides TextMate links for syntax error
codes.
I put one of my files in a path with a space in the name, and it took
me a fair amount of experimenting to figure out how TextMate and Lua
independently wanted to see the URL.
The raw path as supplied in the argument list is:
/Users/gavinkistner/Desktop/pork butt/bling/tmp.lua
To pass that to Lua, I needed to escape the space char:
file_path = Pathname.new( ARGV[0].gsub( %r{([^\w/.])}, '\\\\\1' ) )
#=> /Users/gavinkistner/Desktop/pork\ butt/bling/tmp.lua
To create the parameter for the TextMate URL, I needed to NOT have
that escaping. If I perform HTML escaping (for valid HTML) the space
may not be represented as a '+' char, but must be a %20.
WORK:
<a href='txmt://open?url=file:///Users/gavinkistner/Desktop/pork butt/
orxit.lua&line=6'>
<a href='txmt://open?url=file%3A%2F%2F%2FUsers%2Fgavinkistner%
2FDesktop%2Fpork%20butt%2Forxit.lua&line=6'>
DON'T WORK:
<a href='txmt://open?url=file:///Users/gavinkistner/Desktop/pork\
butt/orxit.lua&line=6'>
<a href='txmt://open?url=file%3A%2F%2F%2FUsers%2Fgavinkistner%
2FDesktop%2Fpork+butt%2Forxit.lua&line=6'>
The Ruby code to create the valid URL param:
htmlpath = CGI.escape( "file://" + File.expand_path( path+file,
file_dir ).gsub( /\\(.)/, '\\1' ) ).gsub('+','%20')
As a more pathological case, I renamed the folder in Finder to "pork
\ % / butt"
The "/" in the name is apparently a ":" on the file system:
gavinkistner$ cd pork\ \\\ %\ \:\ butt/
gavinkistner$ pwd
/Users/gavinkistner/Desktop/pork \ % : butt
My code produces:
<a href='txmt://open?url=file%3A%2F%2F%2FUsers%2Fgavinkistner%
2FDesktop%2Fpork%20%5C%20%25%20%3A%20butt%2Forxit.lua&line=6'>
and it works. Yay! :)
In the regular find window, there's that arrow button you can click
to get a multi line text field where to enter your search query, but
I don't see it when I do a search in whole project, which is kind of
a pain when looking for lengthy pieces of code...
Did I miss something? Thanks!
Hello there
I just noticed that the new Mercurial bundle uses cmd-H to activate
its commands. I use this shortcut very often for hiding Textmate and
other applications. It's a system wide shortcut for hiding
applications. So I might not be the only one doing this. It's no big
problem for me since I can always disable the bundle with the filter.
All the same it might be a good idea to change it to anoter shortcut.
Cheers. Oliver
>I don't know if you use Growl but it's pretty versatile. You can
>choose the place where it pops up, the type of notif. (even speech or
>mail - not that useful for TM), the icon, how long it stays, etc. on
>per command basis (even over a network). So it can be used for notif.
>of background tasks as well for "instant feedback on the command
>executed".
Allan
I think you use this discussion list as a user feedback collection
point. In which case, FWIW, I would be very glad for Growl support too
for the reasons stated above. Growl is highly configurable, usable in a
persistent, immediate and coalesced modes and very OS X. I find
tooltips fiddly and non-persistent. I use most text at 14 points and I
find tooltips bothersome to read.
cheers
David.
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