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