General Comments/Questions
=======================
1. Textmate's web preview integration with Markdown is awesome.
This feature has drawn me into textmate.
2. I am so tired of bloated Microsoft Word files. Other than the
files that people send you, has anyone adopted Textmate as their
primary text editor? It seems like a fantastic editor for code, but
how is it for someone in education?
Writing a Markdown document in Textmate
=================================
I understand the basic principals of markdown, but typing the code
(albeit, simple) seems burdensome. Is it possible to:
* highlight selected items and add a "*" (bullet) at the beginning
of the list?
* create triggers for the various markdown codes?
Markdown Conversion
=================
I have had great success in putting markdown document on the web.
What are recommendations for converting a markdown document into a
text file?
Thanks,
Stephen
I just discovered TextMate last week and based on user reviews I
decided it was worth a look-see.
I have been using the demo exclusively for the past week in an
attempt to wean off of BBEdit. However I've noticed a couple of
showstoppers for me and I'm hoping I either haven't discovered that
they can be done in TextMate or that someone clever has figured out
acceptable workarounds.
First up, BBEdit has a function under the Search menu "Compare Two
Front Documents" which recognizes which windows are open in BBEdit
and performs a diff between them. I use this all the time, and
usually one of the documents is a remote document being edited via
FTP through YummyFTP and TextMate. The only comparable function I
found in TextMate is within the Diff bundle, however it specfically
requires that both files be in the same project (i.e., local) and
that they be selected in the Project drawer. Since I need to compare
files remotely to files locally this does not do the trick. I tried
reading up on TextMate's dynamic variables, but didn't see anything
resembling "TM_OPEN_FILES".
Can TextMate accommodate BBEdit's "compare two front documents"
function, either through some built-in function I don't know about or
through some external bundle/workaround? If not, is this planned in a
future release?
Next showstopper for me is the inability for TextMate to find/replace
recursively through a directory. BBEdit allows me to select the
directory of my choice, whereas TextMate seems to require that I
define a Project and that only the Project files can be searched. Is
there any way to override that? Any plans of expanding this in a
future release?
Like I said earlier, I'm very tempted to switch from BBEdit to
TextMate, so if either/both of the above "showstoppers" could be
addressed/accommodated it would be a no brainer.
Thanks a bunch.
brian
Hello,
I've been working a little bit on a bundle for writing guitar (and
other) tablature. There's syntax highlighting, there's a "blank
staff" snippet-like command which will respond to a tuning you set
for the whole document, and there are keybindings to insert and
delete blank spaces and bar lines for a whole column, and to fill in
blank space.
Here's a movie: http://www.mdaines.com/system/tablature.mov
It goes a little slow since I'm still experimenting with the key
bindings. Your input is welcome re: that and anything else!
There's a zip archive of the bundle here: http://www.mdaines.com/
system/tablature.zip
Presumably it'll go into a source repository or something soon.
-- Michael Daines
http://www.mdaines.com
In "Re: Disable Re-indent Paste per bundle" Allan Wrote:
> You should know that you can use ctrl-cmd V to paste without
> re-indenting.
Yes, I do know about this.
> But I think it should be easy to add a preference to disable
> it per scope.
That would be fantastic. Sure, *I* know about ctrl-cmd V, but people
who've never used TextMate are unlikely to know what's going on.
Perhaps I'm deluding myself into thinking that there are people out
there who will adopt this bundle without learning all that TextMate
has to offer, but I'm thinking ahead.
My particular case--the screenwriting bundle--has absolutely no use
for this feature, in fact, it gets pretty hairy when pasting large
chunks of text around, especially since the language depends, not on
markup for it's scope definitions, but indentation.
I know you can disable the re-indenting of text for textmate as a
whole, but how is this done on a per-bundle basis?
I remember Allan mentioning something about a "commands.plist" file,
but I can't find a reference for exactly what that is.
Thanks in advance.
Hi. When using "Edit in TextMate" in Mail.app, the edited text is not
copied back to the original window when saving and closing. However,
"Edit in TextMate" does work when using MarsEdit.
I assume that there something is up with my Mail.app - has anyone
else seen this?
Best wishes /Marcus Ahnve
--
Marcus Ahnve
marcus(a)ahnve.com
Hi,
I'm currently working on an article, together with some other authors,
so we thought it wise to split it up into separate files, and then one
main file, where all the others are \input-ed.
Works great, and the TM_LATEX_MASTER variable makes life a little bit
easier.
However, it turns out that support for this variable is a bit sketchy:
- Using a full path in that variable breaks everything. Escaping a full
path in quotes breaks it even more.
The "Typeset and View" command normally constructs the filename and path
itself, and assumes a clean input, but this breaks when the value of
TM_LATEX_MASTER is used directly.
- If you just give a filename (and the file is in the project root),
then "Typeset and View" can at least build the file. Viewing it breaks,
because file://localhost/${TM_LATEX_MASTER%.tex}.pdf can not be found.
(the variable is properly expanded in the URL, the file just can't be found)
I tried to look into it, but I couldn't really figure out how to get it
to work properly. I hope someone else here has some time and is willing
to look at it.
Regards,
Jeroen.
Those of who you fear the SVN instructions for getting bundles, run away
now.
There are several nifty bundles out there that for one reason or another
aren't in the official subversion repository. To update them, you have
to remember to do an 'svn update' for each one. Isn't there an easier
way? Yes. Yes there is: svn:externals[1]
cd "/Library/Application Support/TextMate"
svn propedit svn:externals Bundles
This will popup your chosen editor. Now simply enter the name of the
bundles you want updated followed by a space and then the path to
their subversion repo. For example, here's my (short) list:
tAylott_subtleGradient.tmbundle http://textmate.svn.subtlegradient.com/Bundles/tAylott_subtleGradient.tmbun…
RubyAndRails-Experimental.tmbundle http://www.eyematz.com/svn/public/TextMate/RubyAndRails-Experimental/RubyAn…
Note that those are only two very long lines. Save your changes and
leave your editor.
Now when you do an 'svn update', it'll automatically fetch changes for
the other bundles as well.
Caveat emptor for those of you with commit access: make sure you don't
accidentally check in the property changes. We mere mortals don't have
to worry about this. ;)
[1]: http://svnbook.red-bean.com/en/1.0/ch07s03.html
--
eric
These Apples are delicious
Hi all,
I've written a ruby script that will tidy-up a series of assignment
statements by lining up the equals signs. Installed as a command in
TextMate, it can reformat all assignment statements in the current
selection, or all assignment statements conitiguous to the current
line. Note that the script assumes you uses spaces, not tabs; and I
wrote it last night, so there may still be bugs. :-)
Anyway, if you are interested, you can find more details and the
script itself at:
http://random-dreams.org/2006/05/fun-with-textmate-align-equals-in.html
Regards,
Chris Poirier.
I had to do a little work with ASP (not ASP.net) today and I was surprised
to see that Textmate did not come with an ASP bundle. So far, my Google
searches havn't found any ASP bundles, so I was hopeful that the Textmate
community could help me.
Can someone point me in the right direction?
Thanks in advance!
There's a pending patch [1] that gives TextMate's Subversion bundle
automatic support for graphical diff utilities like BBDiff.
Unfortunately, I haven't gotten this patch to work with FileMerge
because FileMerge and its command-line launcher, opendiff, take non-
standard arguments and thus aren't compatible with Subversion.
Although wrapper scripts are available, the best one I've used so far
[2] has been rather flaky: sometimes it simply fails to launch
FileMerge.
Today, however, I discovered a new FileMerge wrapper script [3] that
seems totally reliable and works quite nicely with the patch. So, to
use FileMerge with Subversion, here's what you do:
* Install the patch
* Put the script somewhere (chmodding it to executable)
* Add this to ~/.subversion/config:
diff-cmd = <path to script>
After that, any Subversion diffs you do will be handled by FileMerge.
Trevor
[1] http://macromates.com/ticket/show?ticket_id=48F737BE
[2] http://svn.collab.net/repos/svn/trunk/contrib/client-side/svn-
viewdiff
[3] http://ssel.vub.ac.be/ssel/internal:fmdiff
Hey Mates,
I made a [Proof of Concept][1] interface of a theme chooser and coder
styler for TextMate. Using the fantastic commands from [Brad Choate]
[2] to generate `CSS` from TextMate theme and convert documents to
`HTML` files, this nifty little thing let's you view code how it
would look in TextMate. You can choose a small number of Code
snippets and Themes right now and just play with it a little.
Feedback welcome.
The idea is to use this on your site for pasting code or as a general
PasteBin for the `IRC` channel. It's a little `PHP` thingy and some
`AJAX` to load the source and I will make it available under `BSD`
licence shortly.
Again, your Feedback appreciated. There are some items on the TODO
list and some incompatibilities and/or browser flaws to master. Just
don't nag me too much why your theme is not included in the list
right now ;)
Also the professional themers out there (namely Thomas Aylott and
Infiniknight) are welcome to send me some of their sample code fpr
theme designing if they are willing to share it :).
Thanks to Jacob Rus for his ideas and Brad Choate for the nice commands.
So long (and thanks for all the fish),
*Soryu*.
[1]: http://projects.serenity.de/textmate/codestyler/source.php
[2]: http://www.bradchoate.com/
Hi,
I have what may be a simple question about Smart typing. How do you
all "finish" typing something that has smart typing characters? Here's
a simple example:
Typing in some HTML, an input tag.. type <input type="
and TextMate helpfully enters the second " character. Thank you TM.
Now I enter the type: text
Now my cursor is still within the quotes. By habit, I type the closing
quote, but now I'm just defeating the purpose of smart typing. My
option, as I see, is to read and hit the right-arrow key.
A slightly more complicated example - in PHP:
array["something"]
As soon as I type [" it looks like: array["|"] (where "|" is my
cursor. Again, thanks TM. But now, after typing 'something', I have to
move past the " and ].
Am I missing some simple navigation? It's a simple thing that's making
my want to turn off Smart typing.
Thanks!
I'm using groups so that I can hove more that on project folder per
TextMate instance. TextMate seems unable to deal with this. Many
commands that use the project directory environment variable - such
as Subversion - fail. And sometimes the value is set to '/' and
other times it is set to an actual folder in the group.
Is this a known defect? Is there a workaround?
Thanks.
It did, but thankfully Allan fixed it, it was due to a misunderstanding on
my part. Sorry
Sam D
On 5/15/06, textmate-request(a)lists.macromates.com
>
>
> I just created a new PHP file in TextMate, and the file type popup at
> the bottom was set to Cake, and not HTML (which I assume is correct
> for a PHP file). The Cake bundle does claim PHP in it's filetype list.
> Is this correct?
>
>
OK, everyone seems to be adding some new functionality to TM these
days, so I thought it was about time for me to get on that bandwagon
again after a long time away ;-)
So here is the RubyAndRails-Experimental bundle which will do the
following:
1. Syntax Highlight all known Ruby & Rails methods
Especially for those that like me waste large amounts of time looking
for 'spelling' bugs, where I/we have spelled a method wrongly.
In other words: typing "validate_confrimation_of" will NOT highlight
since it’s spellt wrongly, while "validates_confirmation_of" will
highlight correctly. Just make sure you have highlighting on for the
'support.function' scope.
2. CodeCompletion
Pressing ESC after typing a few characters will now give you a
complete listing of all known Ruby, Rails or Ruby & Rails methods
that begins with those characters. Built in support for three
separate scopes if you so wish. (Requires some editing of scopes in
the Bundle window)
Nope, does NOT yet support code base scanning for your own defined
methods. :( Please feel free to improve upon this! ;-)
3. Ruby 'ri' Documentation Support
View ri's informational output based upon the currently selected word
OR the current word your cursor is within. Requires that you have
the ri documentation installed, or it will give you a information
text telling you that.
Great !! So where do I get hold of it ??
If you have SVN installed just copy and run either of these commands:
svn checkout http://www.eyematz.com/svn/public/TextMate/RubyAndRails-
Experimental/RubyAndRails-Experimental.tmbundle RubyAndRails-
Experimental.tmbundle
svn export http://www.eyematz.com/svn/public/TextMate/RubyAndRails-
Experimental/RubyAndRails-Experimental.tmbundle RubyAndRails-
Experimental.tmbundle
or else download it from here: [ http://www.imediatec.co.uk/tm/
bundles/RubyAndRails-Experimental.tmbundle.v1.zip ]
and then double-click the bundle to install it.
Enjoy ! And if somethings not working OK, please let me know,
preferably with a diff patch ;-)
Kind regards,
Mats
----
"TextMate, coding with an incredible sense of joy and ease"
- www.macromates.com -
"RubyOnRails development done the Mac way"
- locomotive.raaum.org -
There is a nice review talking about the comparative advantage of
TextMate over Emacs at macdevcenter.com:
http://www.oreillynet.com/mac/blog/2006/05/
emacs_est_mort_vive_le_textmat_1.html?CMP=OTC-13IV03560550&ATT=Emacs
+Est+Mort+Vive+Le+TextMate
Best, Mark
Hello:)
I would like to know which kind of script is used
for the writing of Latex & View in order to be able
to modify it.
I would like to include something like:
#!/bin/sh
FILE=${1%.*}
cat >temptex<<EOF
\documentclass{article}
\thispagestyle{empty}
\begin{document}
\input $FILE
\end{document}
EOF
pdflatex temptex
$FILE is $1 is the script used in Textmate
Thanks
Alain Matthes
I just created a new PHP file in TextMate, and the file type popup at
the bottom was set to Cake, and not HTML (which I assume is correct
for a PHP file). The Cake bundle does claim PHP in it's filetype list.
Is this correct?
Thanks!
jt
Hello,
I've been fooling around a little with trying to create a language
grammar for guitar tablature, and I ran into a problem with matching
something like this:
E 0-------|--------|--------|
B --0-----|0-------|--------|
G ----0---|--0-----|0-------|
D ------0-|----0---|--0-----|
A --------|------0-|----0---|
E --------|--------|------0-|
I should probably know my TERMINOLOGY better in order to do this, but
I'm calling this thing a "block" for now. Every document will have 1
or more of these. I attempted to write a rule that would match one
these things:
{
name = 'block.tablature';
match = '([A-G].+\n){6}';
}
This doesn't seem to match a section like this, but if I use the find
command with that regexp, the "block" is found and selected. What am
I missing?
-- Michael
A couple of days ago I checked in a new CSS bundle command for doing
a preview. You can find this in the macromates.com subversion
repository:
http://anon:anon@macromates.com/svn/Bundles/trunk/Bundles/
CSS.tmbundle/Commands/Preview.plist
The goal was to generate a preview HTML page from the CSS rules
declared. It's not perfect, but it's a first stab at it. I've seen
similar functionality in TopStyle (for Windows) and a single-item
preview in CSSEdit (for Mac). The command is bound to Ctrl+Option+Cmd
+P. Note that since it is scoped to source.css, hitting this key
within an HTML document with the caret inside a CSS block will also
invoke the CSS Preview. If this happens, it will submit the contents
of the CSS block as the input to the command (using the new 'Scope'
input option). The command also works on a selection; so if you have
a few CSS rules you want to preview, you can select them first.
Feedback as always is appreciated-- there are still some rough edges
(ie, how to handle absolute-positioned rules or floats), but it's
pretty useful to me already.
-Brad
Is it possible to have certain drag commands that react to URLs being
dragged there from a browser or any other way?
I would love to have a drag command for markdown… but I suppose it
would also be very useful for the HTML bundle etc.
Dan
Hi
I know Textmate has folding, but does it have a feature that old-
school folding editors called "enter fold"
i.e. the ability to hide everything *but* the contents of the fold.
Folding mode in emacs has this - I think the emacs term is
"restricting" the buffer.
I live by this feature - with the right keyboard shortcuts you can
fly around the file without ever scrolling.
If textmate has this, I'm probably going to switch, if not, is there
much chance of it making it into 2.0?
Tom.
There was some talk not too long ago about keyboard-only commits in
the Subversion bundle [1]. Chris Thomas said he would set up the
Enter key (not to be confused with the Return key) to act as the
commit button. However, this only works if you have an Apple
keyboard. Some of us (hint, hint) use non-Apple keyboards, and even
the ones that are designed for the Mac (they have a little Apple icon
on the command keys, for instance) may not have an Enter key [2]. Is
there anything that can be done to accommodate us?
Trevor
[1] http://one.textdrive.com/pipermail/textmate/2005-March/003341.html
[2] http://www.amazon.com/gp/product/B00006FRUI/002-4902042-8352038
On May 12, 2006, at 4:00 AM, textmate-request(a)lists.macromates.com
wrote:
> I suggest the following:
>
> #!/usr/bin/env python
> import sys, os
>
> oldtask = os.environ['TM_CURRENT_LINE']
> sys.stdout.write("DONE " + oldtask[4:])
>
> -Jacob
Jacob -
Cool! I haven't done much coding lately and I guess it shows.
Thanks for the help.
Mike
On May 12, 2006, at 2:01 AM, textmate-request(a)lists.macromates.com
wrote:
> To: TextMate users <textmate(a)lists.macromates.com>
> Subject: Re: [TxMt] Linefeeds in commands & snippets
> Reply-To: TextMate users <textmate(a)lists.macromates.com>
>
>
> This is a Python issue. Python writes a newline to the end of all
> print statements, which is where this is coming from. You could write:
>
> print newtask,
>
> which would not write a newline, but would add a space. In order to
> write -just- the text, this would work:
>
> #!/usr/bin/python
> import os,sys
>
> def texter():
> oldtask = os.environ['TM_CURRENT_LINE']
> # oldtask = "Alligator"
> newtask = "DONE "
> for i in range (len(oldtask)):
> if i > 4:
> newtask = newtask + oldtask[i]
> sys.stdout.write(newtask)
>
> texter()
>
>
> Lindsay
Lindsay -
Thanks for the help, I thought it was something I was doing wrong in
TextMate.
Mike
A while ago, I was try to make a command to add height and width information
to turn a selected word " LBC0001A-1.tif " into code like:
<img src="LBC0001A-1.tif" height="800"/>
"sips", a built in command line tool seems to provide the required
facilities, if anyone is interested in making such a command.
sips -g all /Users/tim/Sites/favicon.png
pixelWidth: 16
pixelHeight: 16
typeIdentifier: public.png
format: png
formatOptions: default
dpiWidth: 95.987
dpiHeight: 95.987
samplesPerPixel: 4
bitsPerSample: 8
hasAlpha: yes
space: RGB
Can also resample and rotate images, etc.
tim
1) The age old problem of tabs versus spaces. Is there a way to have
a command run at file open to convert tabs to spaces or vice-versa?
2) Has anyone put out a bundle to allow hooking into the debugger?
3) Any Zope/Plone bundle in progress? I can't seem to find any.
Thanks.
After using the 'Xcode/Import Frontmost Project' command, for
commands in the newly imported project TM_PROJECT_DIRECTORY is set to
'/'. I think that is an unfortunate choice. If for whatever reason it
can not be set to the 'real' project directory, I think it should
either not be defined at all or empty.
Gerd
I am trying to create a command that will replace text on a line with
new text (actually modified text from the current line). Here is the
code that I am using:
#!/usr/bin/python
import os
def texter():
oldtask = os.environ['TM_CURRENT_LINE']
# oldtask = "Alligator"
newtask = "DONE "
for i in range (len(oldtask)):
if i > 4:
newtask = newtask + oldtask[i]
print newtask
texter()
The problem that I have is that it inserts a line feed at the end of
the new text. Is there a way to prevent that? Thanks.
Mike
Hi,
I recently opened some BibTeX documents in TM (which I normally don't
do since I use BibDesk) and recognized the following problem:
TM tries to fold the BibTeX code, but the end of the BibTeX entries
are not reocgnized correctly.
My entries look like this:
@book{ros:02,
Address = {London},
Author = {Corey Ross},
Title = {The East German Dictatorship. Problems and Perspectives in
the Interpretation of the GDR},
Year = {2002}}
So, the fields are pretty-formatted by BibDesk, they are preceeded by
a tab.
This causes TM not to recognize the end of the entry.
If the entry looks like this:
@book{ros:02,
Address = {London},
Author = {Corey Ross},
Title = {The East German Dictatorship. Problems and Perspectives in
the Interpretation of the GDR},
Year = {2002}}
or like this:
@book{ros:02,
Address = {London},
Author = {Corey Ross},
Title = {The East German Dictatorship. Problems and Perspectives in
the Interpretation of the GDR},
Year = {2002}
}
everything works fine.
Is it possible to change the code folding to work with the first
version?
I suppose many BibTeX users on the Mac will have this problem, since
probably almost all of them work with BibDesk ...
Thanks in advance,
best regards
Matthias
--
Matthias Damm
mad(a)macpla.net
PGP key: http://macpla.net/MatthiasDamm.asc
PGP fingerprint: CED3 6074 7F7D 3148 C6F3 DFF2 05FF 3A0B 0D12 4D41
I always thought this was some simple text-formatting to do list,
much like iCal or any such thing, but it seems to possibly be a code-
centered project something TODO? Is there any way I can get some more
info?
(basicly, I did google a bit and didn't find anything, so I'm looking
for that "you should've found this googling you idiot"-link)
Andreas
Is there a bundle or macro available which would enable me to write
footnotes in plain text/markdown? In markdown there is a footnote
notation for hyperlinks, but I haven't seen any easy way to use it in
Textmate yet. ;)
Dan
On May 10, 2006, at 5:19 PM, textmate-request(a)lists.macromates.com
wrote:
> To: TextMate users <textmate(a)lists.macromates.com>
> Subject: Re: [TxMt] What is TODO?
> Reply-To: TextMate users <textmate(a)lists.macromates.com>
>
>
> On May 10, 2006, at 3:43 PM, Niko Dittmann wrote:
>
>> "todo" searches project-wide for code-comments with the strings
>> "todo", "fixme" and "changeme" and presents a list with the lines
>> and links to the files. very convenient to keep track of...
>> well... things you still have to do. try it!
>
> There is another one called "RADAR". I assume that's some sort of
> bug-tracking tag. Does anyone have more details about it?
>
> Trevor
I have been playing with TODO (actually, I'd like to build a GTD
bundle based on it). For some reason, nothing I label as RADAR shows
up in the TODO list.
Mike
I have read and seen the "edit in TextMate" functionality, but would
rather than having a hack use the Services menu for this. I have also
read that this was a functionality before that was removed. Is it
possible to add that back in easily? Those who don't want to have
this Services menuitem can then use e.g. Service Scrubber (http://
www.petermaurer.de/nasi.php?section=servicescrubber) to remove it.
Or am I missing something here?
-e
--
egil helland / it consultant (mcse, web technology)
web: ikon.as / egil.net mob: +47-91315555
> As a shell script (i.e. just paste in body of command):
>
> echo "Aprox. page #$(( (TM_LINE_NUMBER+37) / 38 ))"
> echo "Aprox. total pages $(( `wc -l` / 38 + 1 ))"
Allan, I could kiss you. But I won't.
A quick addition to the LaTeX Bundle -- there was some mention of
"texdoc" on the TeX on OSX-Mailing list:
Command: "Lookup documentation of current word/package"
Shell script: texdoc $TM_CURRENT_WORD (no input, no output)
Scope: variable.parameter.name.package
with an addition to the language definition: (although I don't know
if the scope names are valid TextMate-speak)
{ name = 'meta.label.package.latex';
begin = '(\\(?:usepackage)\{)';
end = '(\})';
patterns = (
{ name = 'variable.parameter.name.package';
match = '[a-zA-Z,:0-9]+';
}
);
},
This command will then open the corresponding help file for a
selected package.
greets,
Dan
I don't speak any scripting language so I was hoping you all could
help me out with two simple commands.
1. Take the current line number, divide my 38 and display the result
as a tooltip that reads: Aprox. Page-Count for Current Line: XX
2. Take the total number of lines in the document, divide my 38 and
display the result as a tooltip that reads: Aprox. Page-Count for
Document: XX
Thanks in advance!
—oliver
> This should do what you need:
>
> npp=38
> res=$(echo `wc -l`)
> pretty () { rev <<<$1|perl -pe 's/(\d{3})(?=.)/$1,/g'|rev; }
> total=$(pretty $(cut <<<$res -d\ -f1))
> php -r "echo ceil($TM_LINE_NUMBER/$npp).'/'.ceil($total/$npp);"
I get the following error:
> Warning: Wrong parameter count for ceil() in Command line code on line 1 58/
I put together a simple bundle for editing Greasemonkey scripts:
http://adamv.com/dev/textmate/greasemonkey
The page documents the new scopes and snippets.
Not a lot to it, but editing a Greasemonkey script is mostly just
editing Javascript.
I can put it in the repository if anyone else wants to hack on it.
-Adam V.
http://adamv.com
Have you ever wanted to publish your source code with your syntax
highlighting intact? That is, formatted the way that TextMate sees
it? Well, thanks to a recent update to TextMate[1], it's now
possible. I've created two commands that are in the TextMate
subversion repository[2] that are in the Experimental bundle:
Create HTML from Document / Selection:
This command will take your entire document and create a new one
that is an HTML file which recreates the view of your document as
TextMate renders it. It also preserves the colors that you're using
as your current TextMate theme, since it generates the CSS from your
theme file. If you have a selection, this command will only output a
'<pre>' block for that section (instead of generating a full HTML
document plus stylesheet).
Create CSS from Theme:
This command creates a new CSS document that is based on your
current theme.
So, what is this good for? Well, if you want to publish snippets of
code, nicely highlighted, but don't want to create images. Besides,
textual examples are better than images since they're searchable.
So, you could create the CSS rules based on your theme, then add it
to your existing site's stylesheet. Then, you can invoke the "Create
HTML..." command to create the HTML.
Why did I do this? There are many syntax highlighting solutions out
there (indeed, TM itself has a few commands that do this kind of
thing, but they don't reliably reproduce the document the way TM sees
it). But this one leverages the document parsing TM does-- and
therefore, it works with any language definition that is in your
TextMate bundle set. It also doesn't require any additional software
to be installed.
Please report any errors you find to me. And thanks again to Allan
for adding support necessary to do this.
Brad Choate
http://bradchoate.com/
[1] - Release 948's "One can now access the document as parsed by
TextMate." new feature. So these commands require that release or later.
[2] - http://anon:anon@macromates.com/svn/Bundles/trunk/Bundles/
Experimental.tmbundle/Commands/
Eric thanks for the widget. It's great.
I have made a few small changes to the widget.
It perhaps looks slightly better, is resizeable, sorts the projects by name
(ignoring case) and only searches in the users home directory.
It can be found here:
http://email2ants.googlepages.com/TextMateProjects.wdgt.zip
Regards,
Anthony
-----Original Message-----
From: textmate-bounces(a)lists.macromates.com
[mailto:textmate-bounces@lists.macromates.com] On Behalf Of Eric Coleman
Sent: 08 May 2006 15:20
To: TextMate users
Subject: [TxMt] Anyone interested in...
A Dashboard widget that listed your textmate project files? I have a
saved search right now that lists all the textmate project files, and
thought a widget would be nice.
If anyone's interested, I'll toss something together ;)
Regards,
Eric
http://www.theaftermac.com/interview-allan-odgaard/
I still can't your product convinced me to move away from my beloved
Zend Studio. I've used the IDE since they day it came out (until I
discovered TextMate and was blown away)
Eric Coleman
Selecting text from the right to the left, stopping the selection
before the tab trigger does in fact allow for tab triggered snippets
with a selection.
tab_trigger<Selection_end>SELECTED_TEXT<Selection_start>
There are a couple of bad things about this.
There is no way to know how your selection was made, since you can't
see the caret when you have a selection.
That, and the TM_SELECTED_TEXT variable isn't available.
Making the TM_SELECTED_TEXT variable work shouldn't be too difficult
(I would imagine).
But making the caret visible with a selection would really be weird.
I'd still like it, but i may be the only one.
thomas Aylott—subtleGradient—oblivious(a)subtleGradient.com
A Dashboard widget that listed your textmate project files? I have a
saved search right now that lists all the textmate project files, and
thought a widget would be nice.
If anyone's interested, I'll toss something together ;)
Regards,
Eric
Is it possible to have Python fold a complete class
definition, rather than just the "class ..." statement
and the docstring? I looked at the bundle source code,
and I don't know if a regex (or more) can do it. It
seems like a Python parser is needed.
Just curious,
--Dave
Is there a way to automatically have TextMate change to a specified
theme based on the bundle that is selected?
An example is, when I select to make a Screenwriting bundle file, I'd
like it to automatically change to my screenwriting default theme
instead of whatever is currently there.
I've been extremely frustrated trying to figure this out.
Thanks in advance!
I have a SVN project with a few externals. Every time I go to
commit, it automatically includes these external folders in the
window and marks them with and X. What happens, is that if im not
actually commiting inside one of the external directories, the commit
fails.
What I want to do, is that if there is an "X" item, I want it
deselected by default. If you need a screen shot to understand what
I'm talking about, I can give it up.
If someone could either fix it or toss the code my way so I can mess
with it, it would be greatly appreciated.
Eric Coleman
I don't really understand why, but the "Edit in TextMate" command
works for me in Firefox, even though it is not visible from the Edit
menu at all. Or, more specifically, it works in my blog's post
composition window (Wordpress 2).
Does anyone know why?
Dan
It works fine from TextEdit. What might be up? Thanks,
Ben
___________________
Ben Jackson
Diretor de Desenvolvimento
ben(a)incomumdesign.com
http://www.incomumdesign.com
Running the Show TODO List command, I get the following error:
/tmp/temp_textmate.jfDKQP:25:in `initialize': No such file or
directory - /Users/markkalderon/Documents/TheHub/Research/
ColorPluralism/Drafts/Trunk/Philosophy.bib (Errno::ENOENT) from /tmp/
temp_textmate.jfDKQP:25:in `open' from /tmp/temp_textmate.jfDKQP:25
from /tmp/temp_textmate.jfDKQP:24:in `each' from /tmp/
temp_textmate.jfDKQP:24 from /tmp/temp_textmate.jfDKQP:23:in `call'
from /Library/Application Support/TextMate/Support/lib/textmate.rb:
63:in `scan_dir' from /Library/Application Support/TextMate/Support/
lib/textmate.rb:56:in `each' from /Library/Application Support/
TextMate/Support/lib/textmate.rb:56:in `scan_dir' ... 10 levels...
from /Library/Application Support/TextMate/Support/lib/textmate.rb:
56:in `each' from /Library/Application Support/TextMate/Support/lib/
textmate.rb:56:in `scan_dir' from /Library/Application Support/
TextMate/Support/lib/textmate.rb:73:in `each_text_file' from /tmp/
temp_textmate.jfDKQP:23
I am using TM 1.5.1 (985) on OS X 10.4.6. Any help would be appreciated.
All the best, Mark
I typically use TextMate for two different things: administrating/
updating websites and LaTeX. For Websites I use UTF8, but for LaTeX I
have to use Latin1 (since this is what my co-workers use).
However, when I load the website project, every time a file is saved,
Latin1 is used instead of UTF8. Is there a way to make that encoding
stick, preferably on a per-file basis (at least on a per-project
basis)? I suspect that this should be very easy to implement (via
metadata) …
Or is there another way to make TextMate respect my choice of encoding?
Thanks a lot.
Max
A newbie question. I'm looking for a way to update bumdles
automatically. I don't know much about subversion, but I got it
working, and could download bundles without a problem. Now I would
like to automatize this workflow. Copying the text onto Terminal
window is a little hassle. I tried saving the terminal window, but
only could save the Window Setting.
--
Teck
Hi,
I committed a complete rewrite of the Mercurial[1] bundle to the
repository.
The Mercurial shortcut is now ctrl + shift + M. I know this key
equivalent is already used in some other bundles, but it's the best
we could find.
I don't know if there are many Mercurial users here, but if you are
one, please give me your feedback.
[1]http://www.selenic.com/mercurial/
--
FredB
Not sure if this fits anywhere in the bundles, but I've added a
BalanceJr-like command to my personal bundle that makes navigating
Ruby, HTML and XML code a lot easier. Check it out if you're
interested: http://blog.inquirylabs.com/2006/05/02/new-feature-
intelligent-jump/
Duane Johnson
(canadaduane)
http://blog.inquirylabs.com/
I've noticed that the HTML comments are slightly restrictive. If I
have the following code:
<p>
some text, <!--- order now --->
</p>
<div class="msg">
....
it will highlight everything from the start of the comment, to the
end of the page. How do I fix that without going through all the
flies to fix the comments?
Eric Coleman
> I'm observing some strange behaviour with the YAML folding markers:
> the folding stop marker does not appear when there is some whitespace
> on the closing line this despite of the regex matching \s*. It works
> fine if the line is completely empty, however.
I haven't found a way around this. The problem is that if you have
nested folds:
key: "value"
another_key:
yet_another_key: "another_value"
It needs to choose one to fold to. In order for this to work it
matches the indent levels of the start and stop lines.
> I also thought it helpful to add [^#] after the initial ^ in the
> folding start marker regexp so that comments containing words
> followed by colons do not appear as folding markers (as with the
> default database.yml that Rails 1.1.2 generates).
Just added it to the repo now.
___________________
Ben Jackson
Diretor de Desenvolvimento
+55 (21) 2256-1022
ben(a)incomumdesign.com
http://www.incomumdesign.com
I'm observing some strange behaviour with the YAML folding markers:
the folding stop marker does not appear when there is some whitespace
on the closing line this despite of the regex matching \s*. It works
fine if the line is completely empty, however.
I also thought it helpful to add [^#] after the initial ^ in the
folding start marker regexp so that comments containing words
followed by colons do not appear as folding markers (as with the
default database.yml that Rails 1.1.2 generates).
foldingStartMarker = '^[^#]\s*.*:(\s*\[?| &.+)?$';
-- Paul
If one opens a file in TextMate and then renames that file in the
Finder, TextMate does not pick up the change and saving the opened
file will result in the file being saved with its original name.
I only mention this as I am user coming from BBEdit and am used to it
picking up file name changes upon activating the editor window.
I'm not sure which is the best approach but I like the idea of files
not being dependent on their name; the ability to re-open a file
despite its name having been changed is a great thing so perhaps this
should apply to when a file is currently opened?
Thanks in advance,
-- Paul
I often hear in this list how Command-/ comments/uncomments the
selection with the appropriate commenting characters, however,
anytime I use it it _always_ uses C-style comments (/*...*/).
I have an up to date /Library/Application Support/TextMate checked
out from Subversion and I've poked at ~/Library/Application Support/
TextMate and couldn't find anything there that would create this
behavior.
Is there anything I need to do to enable this smart comments. And if
not, how can I debug this?
Thanks,
-Oscar
--
pgp fingerprint: BC64 2E7A CAEF 39E1 9544 80CA F7D5 784D FB46 16C1
sorry for so many messages...
>> I don't speak Perl, so I was just talking generally... but each of
>> those \t's is a tab, so maybe remove two?
>Yeah, it works to remove two of the tabs, but since I also don't speak
>Perl I can't tell why it's doing that. And that sort of bothers me,
>that it is clearly marked as inserting two, but it actually inserts
>four.
So it works when there is text to paste in, but when it falls back to
just positioning the cursor, only two tabs are inserted.
Hi list -
"xhtml2article" (in the Markdown bundle) has definitions to transform
xhtml meta-tags/info into LaTeX definitions/tags. Can I define this
meta-information, such as the author, in the Markdown file? If not,
how do I get this meta-info into LaTeX?
Thanks for any hint.
With regards
- Stefan
> I don't speak Perl, so I was just talking generally... but each of
> those \t's is a tab, so maybe remove two?
Yeah, it works to remove two of the tabs, but since I also don't speak
Perl I can't tell why it's doing that. And that sort of bothers me,
that it is clearly marked as inserting two, but it actually inserts
four.
Anyone speak Perl?
> Set the output to "Insert as snippet" and wrap it in ${0:...}? you'll
> need to escape the ... bit of course.
Do you mean this:
#!/usr/bin/perl -w
$m1=$m2='';
$c=1;
while(<>)
{
if(/^\t{4}(.+)[\r\n]+$/)
{
$m1=$m2;
$m2=$1;
}
$c++;
last if($c==$ENV{'TM_LINE_NUMBER'});
}
print "\n\n\t\t\t\t\${0:\$m1}";
...'cause that seems to work but inserts two too many tabs now.
First off, Allan, for build 989 you're my hero.
Second,
> If I understand the problem correct, the script below does that.
> Input set to 'Entire Document', Output to 'Insert as Text'.
> Gerd
Seems like you understand it quite well. I'll test it over the next
few days to see if it holds up. Looks like it will.
One small thing... Ideally, the text that is grabbed and placed via
the script should end up being selected so that it can easily be
over-ridden. Is there an easy fix for the script that will do that?
Thanks a lot guys.
If you try to run an untitled Ruby file, the Ruby bundle saves a temp
file, and then runs that. In Python, we are first required to save the
file somewhere. I find myself saving lots of files in the trash or in
/tmp. What do people think of changing the Python run command to mimic
the Ruby run command? I would just change it myself, but perhaps
someone has a reason to prefer the existing behavior.
-Jacob
Allan recently isolated a bug I found to be in the regular expression
library TextMate uses and we're waiting for a response. While we wait
I was looking to implement the feature that crashed TextMate and I
hoped you all could help me out with some ruby or perl (or whatever)
voodoo.
The bug is explained here: http://ollieman.net/videos/find-bug.mov
The expected behavior is explained here: http://ollieman.net/videos/desired.mp4
It works the rest of the time, it's just when at the beginning of the
document that it crashes.
Thanks in advance for any help.
--oliver
P.S. Are these videos a good way to ask questions? I feel like it's
difficult to articulate without actually showing you.
> 1. When triggered the macro looks backwards from
> the cursor position for lines beginning with four tabs?
Yes. Specifically, four tabs followed by a letter, number or punctuation mark.
> 2. The first such line is skipped and the second such
> line inserted where the cursor is.
Two lines down from where the cursor is, yes.
> What is supposed to happen if there is only one such line
> in the document. (I know it crashes, but what is it suppose
> to do?)
Just insert the cursor in the expected position (two lines down and
four tabs in) with no text.
Hello all,
I'm relatively new to TextMate, only been using it for a few weeks,
and I have decided it quite possibly the best way for me to develop
my games, programs and websites in. Unfortunately it when I
downloaded it did not do any BlitzMax, which is one of the main IDE's
I use. I began to look around and I couldn't find one anywhere.
Anyway I began to develop my own, and I have just today gotten it to
a working stage. There are still limitations in it, which I'm looking
in to on how to correct.
Anyway, here is a link to a post on my blog about it, and where you
can download it. I hope people like it, as it has taken quite a bit
doing and learning of TextMate's bundle system.
Tom
http://www.freepgs.com/bluelaser/blog.php
When a snippet with the same tab trigger/key command is activated you
get a menu item with which one you would like to select.
Unfortunately you can't use [C-n or C-p][1] so you must either use
the mouse or the arrow keys. How about each snippet is assigned a
number which would activate the snippet?
[1]: Please fix this :)
-- Daniel
A new TmCodeBrowser version is available here:
http://www.cocoabits.com/TmCodeBrowser/
This update is recommended to all TmCodeBrowser users. It deals with
ctags occasionally hanging and prevents TextMate to hang also when
this happens.
To install:
- Save all open files in TextMate (just in case)
- Download and open the dmg
- Double-click on the bundle
TextMate will take care of the installation.
Gerd
When I watched the sqleditor screen-cast, I swear I watched him open
a per-project variable list (like the Preferences -> Advanced ->
Shell Variables).
Why don't I see this? and if it's there, how do I open it? I want to
set a bunch of variables per-project instead of globally.
Regards,
Eric Coleman
Greetings everybody,
When you're recording a macro, an ugly logo, which seems to be partly
taken from iPhoto's, appears at the bottom on the right hand corner
of the window. I replaced it with a beautiful red dot and here's the
result :

Of course, it's also pulsating, like the previous one.
If you like it, here's the file that you have to put in TextMate.app/
Contents/Ressources. Hit "Replace" at the message the Finder will
prompt.

Urbanose
POST
User-Agent: Xnntp/beta04 (PPC Mac OS 10.3)
Dear List,
I've recently discovered TextMate and am – so far - quite impressed because it
integrates so well with the environment (vim and emacs don't [yet]) and still
has some useful features and extensibility.
However, I have got two simple questions, to which I don't really find a good
answer on the web (my fault, probably):
– I'm not sure who develops the R bundle; the highlighting is quite okay, the
comments aren't (commenting uses C style by default; this doesn't work). I
copied over the Python or Perl definitions (#) with the right scope marker.
Is such a trivial change this worth asking for a svn account, or where should
such suggestions be directed?
– One feature from Emacs' reftex mode (for LaTeX) I'd like to have in TextMate
would be the recursive scanning for section commands, i.e. seeing all the
sections etc. from the current master document and all (recursively) included
files. Is this possible and I am to stupid to find it (perhaps using the
wrong search terms)? This is an extremely practical thing for longer
documents, because one can go from (the file containing) part I (or a file
included by it) to a chapter in (the file containing) part III (or a file
included by it).
Have a nice Labour Day,
Cheers,
Theorik
I seem to have discovered an infinite loop bug in ctags, which
TextMate depends on.
1. Create a new document
2. Paste in the text "This is a buggy <Java> program"
3. Change file type to Java
4. Save
At this point, TextMate beachballs and I have to force quit. After
that, I find that a ctags process is still running and consuming 100%
of the CPU. Can anyone reproduce this?
Trevor
P.S. TextMate 1.5.1 (948)
Hi all,
I've just watched the insert_html_tag movie, and I cannot reproduce the
"overtype the tag name"
action, where replacing the opening tag - p by div - is mirrored at the
closing tag.
When I do it, the closing tag is not modified.
"tab into the body of the tag" doesn't work either (it just inserts a
tab character, instead of having the cursor jump into the tag body area).
What am I doing wrong?
Alain
Hey all,
This is a bit OT, as I'm pretty sure the problem is not restricted to
the mate binary, but seems to be affecting any shell command that
triggers a GUI event. /usr/bin/open is throwing the same error, as is
growlnotify.
Does anyone have any idea what this might be related to? Thanks,
Ben
___________________
Ben Jackson
Diretor de Desenvolvimento
ben(a)incomumdesign.com
http://www.incomumdesign.com
Regarding the recent R discussion, this came across the R users list
today. The author has put together some scripts that interacts with
the console version of R via vim. He's reported that it doesn't yet
work on OS X, but perhaps his code may be useful for working out some
of the problems/goals that people have been raising with TextMate/R.
http://www.uft.uni-bremen.de/chemie/ranke/index.php?page=vim_R_linux
Cheers-
-Alan
Explain this, anyone!
Type "chocolate" then press the keyboard shortcut for "Insert Open/
Close Tag (With Current Word)" ("^-<).
I get
<chocolate />
When I expected to see
<chocolate></chocolate>
eh?
"pudding" gives me
<pudding></pudding> but
"chocolatepudding" gives me
<chocolatepudding />
Is this one of them Easter Eggs? ;)
eo
Hi,
I just tried dragging several selected image files from a Finder
window into an HTML document, and the code it generates is very
incorrect:
<img src="/Users/john/Pictures/P1010012.JPG" width="1024" height="768"
alt="<img src="/Users/john/Pictures/P1010013.JPG" width="1024"
height="768" alt="P1010013" />" />
It looks like it's putting the second image tag into the placeholder
for the alt attribute. Dragging more will continue the problem over
and over.
Is this a known problem?
Thanks!
jt
Hi,
Just for the record, what is the "official" convention for naming
snippets? For example, I have a snippet like this:
array date(${1:\$array}; 0)
set array($1; ${2:date})
What should the associated snipped be named?
Regards,
Aparajita
www.aparajitaworld.com
"If you dare to fail, you are bound to succeed."
- Sri Chinmoy | www.srichinmoylibrary.com
There seems to be a bug in the HTML display window of TextMate.
1. Save the following Java code as test.java (the misspelling of
"String" is intentional):
class test
{
private java.util.LinkedList<Strin> blah;
}
2. Open the file and hit Command-B to build
On my TextMate, I see a line that looks like this:
private java.util.LinkedList<Strin> blah;
It looks like TextMate is properly escaping the greater-than
character but forgot about the less-than character. Is there a way to
fix this on my end, or do I have to wait until the next bug-fix
release of TextMate?
Trevor
I'm thinking about buying TextMate and am curious
about future versions - such as:
1. What's planned? Is there a roadmap somewhere?
2. When?
For me, sftp integration is a big deal. Right now I check out locally and use
rsync to update the server (before you make other recommendations, I've tried
cyberduck, interarchy, I DO use SVN, etc.), and it's borderline tolerable.
Joe
I know this doesn't belong here, but Im looking for some quick
information:
I have the following structure:
branches/
tags/
trunk/
In my repository. Inside trunk is version 1 of our application. I
want to start on 1.1 which is actually a major rewrite of almost
everything.
So I create a 1.1 branch. and remove all files in the branch
Now, when I'm finished with the 1.1 branch, how do I merge it into
trunk? can/do I just remove everything in trunk and merge the branch
stuff down? The entire file structure is changing for version 1.1
Any insight would be appreciated :)
Eric Coleman
I have a follow-up to Aparajita's recent thread about adding
FileMerge support to TextMate. I really like the idea, but as Chris
pointed out, it shouldn't be necessary to clone the Subversion bundle
or add special environment variables to TextMate. That's because
Subversion isn't hard-coded to use diff; it can run any utility you
want, as long as its arguments are diff-compatible. All you need to
do is add a diff-cmd setting to ~/.subversion/config.
The problem, though, is that TextMate is hard-coded for diff. If you
look at the svn_diff.rb file in the Subversion bundle, it forces svn
to run diff instead of the user's diff-cmd. I think the best
solution, then, is to change this file so that it's not hard-coded.
Not only would this add support for FileMerge [1], but it would add
support for any other diff utility, as well.
With that goal in mind, I've modified svn_diff.rb and posted my
changes here:
http://vocaro.com/trevor/files/svn_diff.rb
To try it out, simply replace your existing svn_diff.rb with this
one. You'll then be able to specify a custom diff utility by setting
the diff-cmd variable in ~/.subversion/config [2]. The next time you
run a Subversion diff command, TextMate will automatically run your
preferred diff utility. If you comment out the diff-cmd line (or
delete the config file entirely), TextMate will go back to using the
standard diff utility as before.
The only functional change here is that if you specify a custom diff-
cmd and a file has no changes, you'll see no output when doing a diff
on it, not even a tooltip [3]. The problem here is that with the
regular diff, no output means no changes, but with custom (graphical)
diff utilities, usually nothing is printed to stdout, even when there
are changes. So, the command can't simply look at stdout and know
whether changes were detected or not.
With that caveat, I hope some of you can try this out and let me know
what you think. I'm hoping that with the proper vetting it can be
checked into the repo. After all, it's a pretty low-impact change. No
new bundles, no new commands, just different behavior when specifying
a custom diff-cmd. (If none is specified, TextMate works exactly as
it did before.)
Trevor
[1] Unfortunately, opendiff (FileMerge's command-line launcher) is
not diff compatible. You'll need a wrapper script like this one:
http://vocaro.com/trevor/files/filemerge (It's buggy, though.
Although it works great for diffs against BASE, whenever the network
is involved, such as diffs with HEAD or PREV, it sometimes works,
sometimes doesn't. Can anyone help?)
[2] I've posted an example config file here: http://vocaro.com/trevor/
files/config
[3] When no custom diff-cmd is specified, you'll get a tooltip that
says "No differences found."
Three times a charm, or so they say. Now properly:
I've created a bundle for textmate that allows one to edit data (for instance, html templates) stored inside a MySQL database. More info and a simple screencast can be found at http://vivified.net/journal/sqledit-textmate-bundle
I hope someone finds this useful -- I did.
cheers,
Bastiaan Terhorst
Hello,
Is there anyway for texmate to have the gutter stick to the left side
of the window even when scrolling horizontally? I've seen it
mentioned several times in the wiki and the consensus seemed to be
that it would be added in 1.3, but in 1.5.1 I still can not find it.
Thanks
Mark
I'm interested if anyone else can duplicate this behavior.
It seems like I'm hitting some kind of performance ceiling when typing
in lines with more than 400 characters.
1. type "lorem" then tab.
2. click in the middle of the generated text-block and repeat.
3. repeat this several times.
On my machine (with a completely fresh install of TextMate build985)
my typing slows down to about half-speed.
The key here is that the slowdown only happens when you are typing in
the middle of the text-block; that is to say, in the middle of a very
long line. When typing on a new line, everything seems normal.
Is TextMate ill-equipted to handle lines this long or is my machine
messed up? Anyone else out there see this same thing? Any suggestions?
Is it on the agenda to add support for folders within the bundles, so
we can group commands, snippets, etc.?
I've got about 50 commands in my bundle now and I'm sure they are all
very confusing to anyone that opens up the commands, but if I would
group the commands (arbitrarily) I'm sure people could find things in
the bundle much faster.
Hi,
Is there a keyboard shortcut to close the most recently opened HTML
tag? For example, I typed
<h1>something
then hit some key combo that would automatically insert the </h1>? (I
was just watching the TurboGears video and it looked like he was
auto-closing his tags. It looks like an older version of TextMate.)
I searched the online manual and did a search of this mailing list,
but couldn't find anything.
Thanks!
jt
It looks like the latest update to the Active 4D bundle has claimed
the .html extension. If I open an HTML file that wasn't created in
TextMate, the language gets set to Active4D (HTML). Sure, it's easy to
switch, but how do I change it back so it defaults to HTML?
Thanks!
jt
thanks a lot for this Chris...i will definitely be taking this for a
test drive, as i am using ExpressionEngine for a few of my current
projects...keep us updated with any enhancements/additions you make
to it....
Hello all,
I've been slowly (and I do mean slowly) putting together an ExpressionEngine
bundle over the last several months. It's mainly snippets, but it also can look
up a selected EE tag in the user manual and display it in a small TextMate
window. It has code highlighting, but I'm not sure I've set it up correctly. I
also don't have all the EE tags implemented.
Which leads me to the reason I'm writing this. I've had several people tell me
they'd love to try out the bundle, but I just don't have the time to make this
bundle work perfectly. What I'd like to do is add it to the list of available
bundles and let anyone who wants to make it better. The more people contributing
to it the better it will be.
Again, I'm not sure I've set up code highlighting correctly, so that should be
one of the first things people check out.
One note, EE tags can be used inside of other code (XHTML, XML, CSS, etc). In
order for highlighting to work correctly, I had to add an extra language inside
of the HTML and XHTML bundles called HTML (EE) and XHTML (EE). Is that the
correct way to do it or what?
Anyway, enough rambling. I'm not sure how people feel about attachments in this
list, so I didn't attach the bundle to this message. If someone could tell me
how to add it to the bundles list on the TextMate site or do it for me, that'd
be great. I'm looking forward to seeing how others improve the bundle.
- Chris
Thank you Thank you Thank you for the effort Chris I've been waiting for something like this. :)
Jamie
-----------------------------------
Email: jamie(a)methnen.com
Web: http://www.methnen.com
Sent using Chattermail with a keyboard the size of my thumb so give me a break on the punctuation and spelling. Ok?
-----------------------------------
-----Original Message-----
From: Chris Ruzin <cruzin(a)gmail.com>
Date: Saturday, Apr 29, 2006 2:44 pm
Subject: [TxMt] ExpressionEngine bundle
Hello all,
I've been slowly (and I do mean slowly) putting together an ExpressionEngine bundle over the last several months. It's mainly snippets, but it also can look up a selected EE tag in the user manual and display it in a small TextMate window. It has code highlighting, but I'm not sure I've set it up correctly. I also don't have all the EE tags implemented.
Which leads me to the reason I'm writing this. I've had several people tell me they'd love to try out the bundle, but I just don't have the time to make this bundle work perfectly. What I'd like to do is add it to the list of available bundles and let anyone who wants to make it better. The more people contributing to it the better it will be.
Again, I'm not sure I've set up code highlighting correctly, so that should be one of the first things people check out.
One note, EE tags can be used inside of other code (XHTML, XML, CSS, etc). In order for highlighting to work correctly, I had to add an extra language inside of the HTML and XHTML bundles called HTML (EE) and XHTML (EE). Is that the correct way to do it or what?
Anyway, enough rambling. I'm not sure how people feel about attachments in this list, so I didn't attach the bundle to this message. If someone could tell me how to add it to the bundles list on the TextMate site or do it for me, that'd be great. I'm looking forward to seeing how others improve the bundle.
- Chris
______________________________________________________________________ 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
Here is a useful bundle for testing out ruby snippets. It includes a
script from eigenclass.org[1].
⌘= insert/remove an eval marker for the current line
⌘E evaluates and annotate the file according to the markers
If there are errors they are placed at the end of the file.
Examples (after eval):
(1..10).each do |i|
i ** i # => 1, 4, 27, 256, 3125, 46656, 823543, 16777216,
387420489, 10000000000
end
(1..10).to_a # => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Unfortunately you can't do something like this:
(1..10).each do |i|
i ** i
end # =>
[1]: http://eigenclass.org/hiki.rb?xmp+redux%3A+expanding+test
+assertions+for+profit
-- Daniel
Hi there.
When you preview web pages containing iframes that drag in
information from the web, the frame displays as filled with unicode
characters (instead of the programmed content).
You can see this by viewing this email in textmate (cntrl-cmd-E).
Compare that to what you get if you view the email in safari (you
can't just view, as it will have a .mail extension - reveal in finder
and toggle this to html then double click.
<iframe src="http://rcm.amazon.com/e/cm?
t=thewizardsoft-20&o=1&p=8&l=as1&asins=B000BW7QWW�
38;fc1=000000&IS2=1&lt1=_blank&lc1=0000ff&bc1=ffffff
&bg1=ffffff&f=ifr" style="width:120px;height:240px;"
scrolling="no" marginwidth="0" marginheight="0" align=right
frameborder="0">
</iframe>
Last week I posted about a little tool I made to allow editing of SQL
data within textmate.
I've turned this program into a bundle, which you can download here:
http://vivified.net/files/downloads/SQLEdit-bundle-09.zip
See the help command for more information.
It seems to require Ruby 1.8.4, why this is I'm not sure yet. I'm
very much a ruby newbie.
Also, I can't seem to get rid of the HTML output window as I need the
edit process to be run in a separate
window from the main textmate window (otherwise it freezes and I
can't load anything into it). Is there a
way to spawn a new background process, and then end my initial
textmate command process?
Anyway, I'd love to hear if anyone finds this useful. I myself use it
to edit my Textpattern site's templates,
as they are all stored inside the database.
Cheers,
Bastiaan
Just to give back a little, I made a change to the Tidy command in the
HTML bundle (actually, made a new bundle and copied code and changed
it.)
When running the stock Tidy HTML command on an HTML document that was
created by saving a Microsoft Word document as HTML, it completely
deletes the contents document! In my duplicate of the Tidy command, I
added an option for Tidy to know it's dealing with a Word document.
I added: --word-2000 yes to the tidy command in the bundle. The
first few lines now are:
"${TM_TIDY:-tidy}" -f /dev/null -iq -utf8 -asxhtml -wrap 0 --tab-size
$TM_TAB_SIZE --word-2000 yes --indent-spaces $TM_TAB_SIZE
${TM_SELECTED_TEXT:+--show-body-only yes}|\
Now it cleans all of the extra MS junk that's added to a document.
There's still a little clean up to do (it doesn't delete the
<o:p></o:p> useless tags, but that's easy to do.)
Hope this helps someone!
jt
Hi,
I have created a few commands that are analogous to the Subversion
commands which diff against a revision, but instead of generating a
diff output, the result is sent to FileMerge for viewing, which IMHO
is a whole lot easier to read.
The commands look like this:
-------------
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)"
require_cmd opendiff "You must install the Apple developer tools to
run FileMerge."
"$TM_BUNDLE_SUPPORT/bin/filemerge.sh" BASE "$TM_FILEPATH"
-------------
filemerge.sh looks like this:
-------------
#!/bin/sh
#
# $1 = svn revision
# $2 = full path to file ($TM_FILEPATH)
# First see if the file is under svn control
FILE=`basename "$2"`
INFO_LINES=`svn info 2>&1 > /dev/null | wc -l`
if [ $INFO_LINES -eq 2 ]; then
echo "The current file is not under subversion control"
exit 206
fi
SIZE=`svn diff -r $1 "$2" | wc -m`
if [ $SIZE -eq 0 ]; then
echo "No difference"
exit 206
fi
INODE=`stat -f "%i" "$2"`
TMPPATH="/tmp/tm-opendiff-$INODE.tmp"
svn cat -r $1 "$2" > "$TMPPATH"
opendiff "$TMPPATH" "$2"
-----------
To create a command for a different revision, change BASE in the
command to something else (e.g. HEAD or PREV).
Regards,
Aparajita
www.aparajitaworld.com
"If you dare to fail, you are bound to succeed."
- Sri Chinmoy | www.srichinmoylibrary.com
hi,
I know that it has been discussed before -- but I have yet to find the
command or step(s) to effectively translate high-ascii characters -- like
emdashes and smart quotes -- that were written in Word tr html.
I still have stuff like the following:
s in three statesâ€"New Hampshire, Washington, and Coloradoâ€"that are
any tips?
--
dc
-----
David Clark
Web Specialist
Institute for Community Inclusion (http://www.communityinclusion.org/)
david.clark(a)umb.edu
(617) 287-4318
Hi all,
Sorry for this - it's probably something very obvious that I'm
missing - it might be a default Mac feature that I'm not aware of.
Here's the situation...
I want to check a file into subversion. I hit Shift+Control+a and
select Commit. I enter my comment in the Summary of changes panel.
Now I want to 'hit' the Commit button without my hands leaving the
keyboard (i.e. not using the mouse). I've tried every key combo I can
think of, but I couldn't find one. Anyone?
P.S. Allan, I absolutely _love_ TextMate. I would buy a Mac just to
use this program.
Carpe viam,
Mike
Michael Larocque
Chief Cook and Bottle Washer
Prolumina Communications Inc.
http://prolumina.com/~mlarocque/
I would be very very very very happy if there was a way to have a
TextMate textview totally replace the Xcode editor. I'm sure others
have asked for this, but searching through the list was painful on my
slow-ass internet connection, so I make the request here.
The idea is that you could write a SIMBL wrapper or an Xcode plugin
wrapper (the API, though private, has been documented) around a
subclass of the Xcode TextView (a dump of the framework - used to be
called PBX.framework or some such would garner the class) and then
basically do a poseAs.
I, for one, would certainly be willing to pay for this feature. That
is, I already own TM, and I would happily buy another license for
this product for $40. What are the odds, difficulties, etc of this?
vinayvenkatesh
When I try to execute a SVN command I get this error:
/bin/bash: line 1: require_cmd: command not found
Then most of the commands work fine except for svn status that gives no output.
Any clue? I already checked the various enviroment variables but
everything seems ok.
(I am using TextMate 1.5.1 (961) on Mac OS X 10.4.6.)
I see in the archives that Ke Han asked for a "bracket matching
feature" on 8th March (http://lists.macromates.com/pipermail/textmate/
2006-March/008927.html) wherein a user could double-click on a
bracket to select the enclosing content (ala BBEdit) but that the
only way to reproduce this behaviour is via the shift-cmd B "Select
Enclosing Brackets" command.
Is there any way for me to implement this behaviour as I would
greatly appreciate being able to select the contents of an entire
bracket so easily? If not, is there any chance of it appearing in a
future release of TextMate? My main use would be to quickly identify
where the closing (or opening) bracket for some code lies.
On another note, I have noticed what I believe is a bug when shifting
lines left and right:
Shifting a line to the left moves the cursor one character to the
right and shifting a line to the right shifts the cursor one
character to the left when I expected the cursor to remain relatively
stationary. More noticeably, this means that if the cursor was at the
end of the line and the user shifts left, the cursor goes to the next
line.
Thanks in advance,
-- Paul
> [CHANGED] When erasing a key equivalent (by clicking the X), the
> input control will resign as first responder (i.e. lose focus).
Thank you, thank you, thank you!
> [NEW] It’s now possible to change the key equivalent used for the
> bundle items pop-up menu in the status bar. This is done by setting
> the OakBundleItemsPopUpMenuKeyEquivalent defaults property to the
> key string. The default is "^\033" (control-Escape). This key does
> have very low precedence.
How does one find the key string value for a key? For instance F3. I
found some unicode codes here:
http://hcs.harvard.edu/~jrus/Site/Cocoa%20Text%20System.html
and also this little app that tells you various codes here:
http://www.petermaurer.de/nasi.php?section=keycodes
This program, for ctrl-escape, gave me:
Unicode: 27 / 0x1b
Keys: ^Escape
Key Code: 53 / 0x35
Modifiers: 262401 / 0x40101
And for F3 gave me:
Unicode: 63238 / 0xf706
Keys: F3
Key Code: 99 / 0x63
Modifiers: 8388864 / 0x800100
Are any of these numbers the right thing? I'm worried because I am
not seeing \033 in either of these entries.
Haris
Hi,
A newbie question. Is there any way to choose from keyboards without
arrow keys when I see multiple options.
For example, as in the Manual "5.1.2 Tab Trriggers", in CSS if I type
list and hit tab, I see 8 options. I wanna pick one up without using
arrow keys and a mouse.
Sorry if this is documented in the manual. Thanks for your attention.
Once I found in the Wiki a tip to let TextMate auto add * in C
comments. That is to say when I press return
it goes from
/*
* this is a comment...
ro
/*
* this is a comment...
*
Unfortunately I'm not able to find it anymore.
This was just a "basic" question, since manually adding * and
spaces (tab is "rigid" it adds a fixed number of spaces, it does not
seem to put the "right" number, that is to say the number that is
needed to align with the above content).
A more advanced question is: could a "Doxygen" mode be done?
Is someone doing it?
I suppose it is possible, since it should behave quite like the css
mode inside the HTML mode or something like that?
-enrico
... how I stopped worrying and learned to love absolute paths.
Hey all, new (<24hrs) TextMate user, and as a recovering emacs/Alpha
user, I am *LOVING* this thing. I have hopes for one use of the
Projects that I can't seem to get working, and my investigations make
me think that I'm just trying to abuse the poor things more than
they're intended to be.
Scenario:
I have a large (stable) code base that I'm working with, and am
doing a number of investigations into the code to figure out how the
bloody thing works. It occurred to me that I might be able to use
Projects as a way of tracking these investigations:
1) Drop top folder of source repository on TextMate.
2) Start digging through code, leaving windows open as tabs.
3) When I'm done, I have a list from left to right of the files I
ended up looking at, and the last place I looked in them.
4) Save the project with an appropriate name related to the *topic*
"DataFileSearching.tmproj" for example.
5) At later date, when I need to revisit the investigation, I have
breadcrumbs of where I went, what I looked at, etc. I also have a
timestamp on the Project file of the last time it was worked on. (I
considered using Groups in a Project, but that doesn't give me a
workset, or a timestamp.)
Now the problem... if I move the Project file, it breaks all the
folder references. My first thought was that after step 1, but
before I open any files, I just needed to select the top level in the
Project, Get Info, and then check Save as Absolute Path. I peeked
into the .tmproj file, and yup, a nice absolute path was created for
me. Moving the Project file resulted in it still being able to find
the root of the source tree. Problem one down.
Now for the second problem... if any files are open, and I save the
Project, *those* paths are *NOT* saved as absolute, and instead are
relative to where the .tmproj file resides. If I move the file, I
lose all my breadcrumbs. Bummer.
So this boils down to: am I missing something, or is this a bug to
file?
On 26/4/2006, at 18:25, Plessl Christian wrote:
> [...] Is there a way to implement this in Textmate without either:
> a) modifying all programming language modes with the new rule, or
> b) creating new language bundles C (+fixme), Java (+fixme) etc.
> that include the language definitions for C/Java and add the new
> syntax highlighting rule?
There is not, no. But a solution will appear, and is conceptually
rather simple IMO.
Currently the scope selector is disabled for language grammars, now
imagine it wasn’t, and that selector decided where to inject the
grammar!
That would allow to tear out the PHP, Ruby, and Smarty handling of
the HTML grammar, and instead have that with the language. Likewise
it allows the mentioned FIXME/TODO grammar to be in the TODO bundle,
and be injected based on a scope selector -- disabling the TODO
bundle would then disable this injection automatically.
There is a scope addition which will make this more powerful, namely
exposing arbitrary file attributes in the scope (which scope
selectors can then target), that way, the Java bundle can inject <%
java %> support to HTML files only when the file type attribute is
‘jsp’, and the Subversion bundle can inject the various svn keywords
only when the SCM attribute is ‘svn’.
> Probably I should ask this question on the mailing list, should I?
I cc’ed the mailing list, seeing how others probably would enjoy
reading my reply to this (though I think I have hinted at this
earlier, maybe only on IRC).
I hope to have the file attributes exposed in the scope already in
2.0 (this will then also allow all SCM bundles to use the same key
equivalents), but grammar injection is probably at earlist 2.1 or so…
the technical challenge isn’t that big, but I would also need to
extend scope selectors to allow an injection to stop after a given
depth, so to speak -- and I also need to only focus on one thing at a
time, to actually get anything done :)
Kind regars Allan
Is the functionality of Reformat Paragraph controlled by a bundle?
Specifically, the way it autoindents lines after a * like this:
* Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
I'd like this auto-indenting to occur after a - too.
Q
Hi.
My first post. Since I haven't received any messages from the list yet
(just signed up), I didn't know whether I had to prepend something
like [Textmate] to the Subject line, so I didn't.
I would like to to the delete the current line using Shift + Delete
First Attempt... Macro
Jump to beginning of current line, hit CTRL+K, hit back-delete, press down
This worked OK for a while, but I ran into probems when trying to
delete blank lines, and the carat position is in a less than desirable
place
2nd Attempt... Command
Got pretty far with this one. I read in the entire document into an
array, sliced the line, and set the output to replace the document.
However, couldn't place the carat position anywhere. I believe you can
only define the carat position when inserting as a snippet, not
replacing the document.
Of course, there may be an even easier way to do this, but I don't know it.
Hi,
I don't like pyunit, so use py.test instead. It was really simple to
wire py.test into the Python bundle, but it was also really ugly
using the "Text Window."
Based on some feedback from the IRC channel, and the excellent
example of PyMate, I cobbled together PyTestMate which allows you to
run py.test unit tests directly from within TextMate, and get lovely
formated results from those tests.
It's still a work in progress, but it does work quite well, in fact,
the unit tests for PyTestMate were all written using PyTestMate.
If you'd be interested in taking a look at it please let me know and
I'll forward you the code.
--
Stand Fast,
tjg.
Timothy Grant
As discussed previously on this list, I have made a bundle of all my
Ruby shortcuts and made it available to all. Bundle and detailed
description can be found at:
http://blog.grayproductions.net/articles/2006/04/12/ruby-idioms-
bundle-for-textmate
Enjoy.
James Edward Gray II
I'm new to TextMate and can't figure out how to change the width of indentation.
It's currently 4 and I'd like it to be 2. How's it done?
Also, how can I get TM to insert spaces rather than tabs?
Thanks,
Joe
So I bounced this idea off of Soryu and it seems this hasn't been
discussed much. What if you could add multiple carets to the current
document by command-clicking? I imaging this to work in a way almost
identical to that of the current snippet mechanism. For example:
choose three caret locations, start typing, and in each location your
text will show up. Press tab and the caret will focus in on the
second of the two locations, highlighting the newly typed text (if
any). Tab again and it moves to the third.
It would also be ideal to be able to highlight multiple selections in
the same way--kind of like a powerful replace mechanism. Command-
click and select three words in the document, then type one new word,
and incrementally, all three words change to the new one.
Has this been discussed before? It seems plausible given the
powerful way we can already "insert as snippet" to the document.
Hi,
In my FileMerge bundle support script (Support/bin/filemerge.sh) I
call opendiff. If FileMerge is not already open, 2 seconds after it
launches TextMate displays the spinning beachball. Quitting FileMerge
makes the beachball go away.
I have tried using & to execute opendiff as a background process, but
that didn't help. Any ideas?
Regards,
Aparajita
www.aparajitaworld.com
"If you dare to fail, you are bound to succeed."
- Sri Chinmoy | www.srichinmoylibrary.com
Hi,
I've been using the bundles from SVN for some time, but have only
just noticed the snippets for django (slow, I know). I've noticed
that the django bundle seems to have syntax for the magic-removal
branch of django. Do the creators of this bundle (Wilson Miner and
Paul Bissex, I believe), have an older bundle which is relevant for
django 0.91? It would be very useful for me (and perhaps others) to
have this.
Best Regards,
David
--
David Reynolds
david(a)reynoldsfamily.org.uk
I keep seeing references to using TM as an external editor for Mail.app and
other places, but I have yet to find the (plugin) way to make it happen. Can
someone post a pointer to the necessary pieces?
Lewy
My switch/case blocks (in Java, for example) normally look something
like this:
switch (foo)
{
case A:
bar();
break;
default:
baz();
}
Note how the lines after "case" and "default" are indented. (They're
not flush with the line above.) I believe this is a pretty standard
formatting convention.
However, it seems that TextMate doesn't know about this convention.
If, for example, you were to type the above snippet, typing "case A:"
and then hitting Return puts the cursor flush with the line above,
rather than indented. Likewise, if you were to take the above
snippet, copy some random text (that has a different indentation),
then paste it between the "case A" and "bar" lines, TextMate's smart-
indent feature makes the pasted text flush with "case A", rather than
indented.
Considering that TextMate is smart about indentation in many other
ways (such as when you type "{" and then hit Return), I was hoping it
could be smart about indenting switch/case blocks, too. Is that
possible? Perhaps there is something I could add to the language
definition? Thanks,
Trevor
Hello,
I've written a small tool that allows you to edit a specific cell (field of a row) in Textmate.
When you save the changed document in Textmate, the database is updated.
For a short clip showing it in action, and the download: http://vivified.net/journal/sqledit/
I've briefly looked into making it into a bundle, after discovering the SQL table browser,
but that has not really materialized yet. Shouldn't be that hard though.
Would anyone be interested in this as a bundle? Rather keep it separate?
Anyone think this is useful at all? :)
Cheers,
Bastiaan Terhorst
Hi, I have done a macro which uses a snippet and a command. The
snippet adds the line:
std::cout << "" << std::endl;
And the command checks if iostream is included (using scopeHandler)
and if not it includes it.
For this to work I have to first run the command and after that
insert the snippet. The problem is that if the command inserts the
#include <iostream> , the caret moves to the previous line, inserting
the snippet there.
I have tried with this line at the end of the command (which is in
Ruby):
`/usr/local/bin/mate "$TM_FILEPATH" -l $CARET'`
but it makes TextMate freeze.
Anyone knows how to do this?
Thanks in advance
José Manuel
Polytechnical University of Valencia
Spain
I can no longer use these handy shortcuts for
<%= ... %>
and
<% ... %>
I've checked the rails bundle and it looks fine. Any ideas?
:-/
Sean
:::: DataFly.Net ::::
Complete Web Services
http://www.datafly.net
I sent this already, but I think I sent it slightly before I was added to
the list and I don't see it on the archives.
How does TextMate determine if a particular bundle is applicable to the
files I'm editing? I can insert snippets that are in the Ruby bundle, but
the Rails bundle snippets never expand when I hit tab.
Thanks,
Justin
Hi,
I've noticed that the TextMate Ruby bundle doesn't recognize .rjs file
as Ruby(/Rails), and chooses Plain Text.
I found directions here:
<http://www.memerocket.com/2006/02/10/tell-textmate-about-your-rjs-templates/>
that tell how to modify the bundle to add .rjs. But I'm concerned that
doing so will interfere with doing svn updates to get the latest and
greatest bundle updates.
Is there any plan on adding this to the official Ruby bundle?
Thanks!
jt
I was just watching Allan's latest screencast and wanted to add
support for some of the techniques used in block comments. However,
I noticed that the Javadoc blocks are scoped with
comment.documentation.java. I probably created it that way, but it
seems like it should really be "comment.block.documentation.java".
/*
* this is a block comment
*/
/**
* this is a javadoc block comment
*/
I could scope the snippets for comment.block and
comment.documentation, but I still think the latter should extend
from the former. Is this the desired scope for those types of doc
comments, or was this overlooked?
--
Brian Lalor
blalor(a)bravo5.org
Hi,
I'm new here. Can you let me know the entire list of Emacs
keybindings that work on TextMate?
I found a default Cocoa/Emacs keybidings information at <http://
developer.apple.com/documentation/Cocoa/Conceptual/BasicEventHandling/
Tasks/TextDefaultsAndBindings.html>, but could not open the file
specified (i.e., /System/Library/Frameworks/AppKit.framework/
Resources/ StandardKeyBinding.dict) with appropriate encodings.
I searched this list and wiki, but couldn't get the answer.
Thanks for you attenstion,
Teck
>[2006-04-10: REVISION 961]
>...
>[CHANGED] The scope of the caret is now that of the character to the
>right of the caret, rather than that on the left side.
I have a snippet that inserts a '_' in 'variable.other.php' scopes with
the spacebar. However, now that the scope is that which is to the right
of the caret, it doesn't work!
Shouldn't the current scope be set to "that text which is currently
being typed?" Either way, maybe you setup a pseudo selector to specify
which side of the caret to use, for example:
variable.other.php<
-variable.other.php
variable.other.php[left]
... for left side of caret, and ...
variable.other.php>
+variable.other.php
variable.other.php[right]
...for the right side?
Q
Hi,
I've a project containing about 1.5 M lines of C++ in about 6200 files.
When I try project wise search TextMate crashes on a 2GB MacBook. Is this
to be expected?
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
Dear all,
I've recently switched to using mutt to handle my mail, which was getting a
bit out of hand.
As a result, I now use TextMate when writing emails and it occurred to me
that it would be lovely if TM supported format=flowed text.
The basic idea is this: instead of the horrible quoted mess that often
results in long threads, where some lines miss the quoting etc etc.
A full description can be found at http://joeclark.org/ffaq.html, and
technical details at http://www.eudora.com/techsupport/kb/1625hq.html and
http://www.ietf.org/rfc/rfc2646.txt
My question is this: would it be feasible to implement this in TM, either in
the core or as a plugin, so that f=f text can be displayed, rewrapped and
reflowed? I suppose since the format=flowed headers come within the text of
the document, it would make more sense if it were a plugin, to be switched
on and off at will.
Anyone have any comments/suggestions?
Regards,
Nick
i am a relatively new user of Textmate, and have it installed on 2
machines...for some reason, i can use 'command+/' to toggle comments on one
machine, and not the other...i suspect i may have messed it up with an edit
or addition i made in the bundle editor...how can i add this functionality
back?..thanks for any help....
Hi
I searched the archives but didn't see a good answer to this. Is
there a way to map auto-completion from ESC to something a bit more
ergonomically friendly?
thanks,
Rob
--
http://www.robsanheim.com/
Howdy
I code in the K&R style. "the first opening brace on the same line as
control statement"
codeCodeCode {
Code...
}
My co-worker uses BSD/Allman style "the brace associated with a
control statement on the next line, indented to the same level as the
control statement"
codeCodeCode
{
Code...
}
We both have extremely strong feelings about our style. I have
decided to be diplomatic and use his style.
I want to be able to fold on the line before the opening brace "{" .
But I haven't been able to come up with a foldingStartMarker that
works for it.
My guess is that the foldingMarkers are stuck on single line mode.
Can anyone help? This is really starting to annoy me.
Thanks
thomas Aylott—subtleGradient—oblivious(a)subtleGradient.com
Hi,
I have the following rule for a block comment:
{ name = 'comment.block.active4d';
begin = '/\*';
end = '\*/';
patterns = ( { include = '#fusedoc'; } );
}
Within a block comment, the fusedoc rule looks for some xml:
fusedoc =
{ begin = '^\s*<fusedoc ';
end = '^\s*</fusedoc>';
patterns = ( { include = 'text.xml'; } );
}
The problem is that I want the text.xml language parser to parse the
line on which '<fusedoc ' is found. However, it seems that it will
only parse the lines between the begin and end lines.
Is there any way to have the first and last lines of the fusedoc rule
be parsed by text.xml?
Regards,
Aparajita
www.aparajitaworld.com
"If you dare to fail, you are bound to succeed."
- Sri Chinmoy | www.srichinmoylibrary.com
I'm using TextMate to keep my daily log book - I have a
'Journal' template, language and snippets and it all works
very nicely.
What I'd really like is that when I create a new file from
the template, it immediately gets a filename based on
the date - eg. 060418.txt - so I don't have to enter that
manually when I go to save it.
The template creates the new file in the usual way, by
copying some standard contents to $TM_NEW_FILE.
I was hoping that I might then be able to call osascript
and do something like
tell application "TextMate" to save the document
of front window in "060418.txt"
but it doesn't seem to work.
Any suggestions most welcome!
Hello everyone. I'm trying TextMate out and so far I'm very impressed.
But today I noticed this problem. Apologies if it's well known already:
When I am in overwrite mode (Cmd-Opt-O) and press an opening bracket,
TextMate avoids adding the closing bracket if it would overwrite a non-space
character. This is rather clever. However, when it decides there _is_ space
to add the closing bracket, it mistakenly *inserts* it rather than
overwriting. It kind of defeats the point of overwrite mode, and it's extra
annoying because you have to leave overwrite mode to delete the extra
character again!
Actually adding closing backets in overwrite mode is hardly ever useful,
because if you keep typing you immediately overwrite the closing bracket. My
suggestion would be for TextMate generated the closing bracket but allowed
you to keep typing and "pushed" the bracket to the right (until it reached a
non-space character or you typed the matching bracket). Of course the
pushing behaviour would only be right when you have just typed the opening
bracket.
r/
I promised I'd be back!
I'm working on a bundle for Erlang [1], a nice functional language
that focuses on multithreading and distributed programming. It's
mainly used in embedded programming of telephony equipment, but you
might have heard of ejabberd (a Jabber server written in — guess what
— Erlang). this is a first rough draft -- there's only a basic syntax
description. when it gets good enough I'll add it to the repository,
if you wish.
in order to improve it, I need some help on automated indentation.
this is a typical (small) Erlang module:
> -module(sample).
> -export([fact/1]).
>
> fact(0) ->
> 1;
> fact(N) ->
> N * fact(N - 1).
I'd like to increase indentation of the next line if the current line
ends with -> and decrease indentation of the next line if the line
ends with "." or ";". still, I wasn't able to tweak the prefs in
order to achieve this... (I tried and I tried, man, but I just wasn't
up to the task.) help? help?!? HEEEEEELP! ;)
ciao,
Domenico
---
[1] http://www.erlang.org/, http://www.erlang.se/
Hi,
If I'm not mistaken the pattern match for the second meta.tag.xml
rule is missing _ as a valid character for the attribute name. The
correct match should be:
match = ' (?:([-_a-zA-Z0-9]+):)?([_a-zA-Z-]+)'
Regards,
Aparajita
www.aparajitaworld.com
"If you dare to fail, you are bound to succeed."
- Sri Chinmoy | www.srichinmoylibrary.com
How does TextMate determine if a particular bundle is applicable to the
files I'm editing? I can insert snippets that are in the Ruby bundle, but
the Rails bundle snippets never expand when I hit tab.
Thanks,
Justin
I'm using TextMate a lot these days to write code for R and I'd like
to see if there's a way to make an improvement.
The existing command in the R bundle works fine as long as I'm
sending just a handful of lines to the R application, but TextMate
gives me the beach ball for as much as a minute when I send lots of
code over, and then suddenly dumps all the code into R. For
reference, here's the short R command:
osascript -e 'tell application "R" to activate' -e "tell application
\"R\" to cmd \"${TM_SELECTED_TEXT//\"/\\\"}\""
I'm guessing that TM itself doesn't have a problem with the amount of
text, and that the bottleneck is in the applescript. Is there any way
to speed up how this is done in the event of a large set of commands?
For example, could the command be split into an array and run line-by-
line? (Would this result in an increase in speed? I have no idea --
just thinking out loud.)
Thanks for suggestions. Cheers-
-Alan
Hi All
Version 1.5.1 (948) has been crashing for the past few days. i'm not
sure if its textmate or OS X as i updated both sometime during the week.
the crash seems to happen when i press "tab" in the find&replace window,
but not all the time.
thanks
/V
Apologies in advance if the answer to my query is blindingly
obvious---I am a UNIX newbie.
I am trying to implement Fletcher Penney's variant of Markdown,
MultiMarkdown (http://fletcher.freeshell.org/wiki/MultiMarkdown), as
a TextMate bundle. The basic idea is to convert a Markdown document
into a full xhtml document and then to use xslt to convert it into
different formats such as LaTeX.
I have written TextMate commands for each step of the process, and it
all works fine, but I would also like to add commands that string
these steps together. But there is a problem. For example, while the
following two TextMate commands work:
Save: Nothing
Command(s): #!/bin/bash
/usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH"
Input: None
Output: Create New Document
Save: Nothing
Command(s): #!/bin/bash
/usr/bin/xsltproc -nonet -novalid /usr/local/bin/xhtml2article.xslt
"$TM_FILEPATH"
Input: None
Output: Create New Document
the following fails---it generates an empty file:
Save: Nothing
Command(s): #!/bin/bash
/usr/local/bin/MultiMarkdown.pl "$TM_FILEPATH" | /usr/bin/xsltproc -
nonet -novalid /usr/local/bin/xhtml2article.xslt
Input: None
Output: Create New Document
Any ideas? Thanks in advance.
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
Hi there!,
I have some automatically generated text files with very loooong lines (+4000
characters). When editing those files in TextMate the horizontal scrolling
stops at column 625.
Is this a bug? a feature? a customizable setting?
Thanks!,
/AITOR
No no no no, no background on the tags like that!
(which in "let's not make enemies"-speak translates to, I don't
exactly fancy the new background colour on the html-tags)
Andreas
I thought I'd share this useful transformation. It replaces all - or _
with a space and makes the first character uppercase.
<label for="${1:some_field}"><?php echo _("${3:${1/(^[^-_]+)?([-_]+)?/(?
1:\u$1)(?2: )/g}}"); ?></label>
...would generate something like...
<label for="funky_monkey"><?php echo _("Funky monkey"); ?></label>
Q
Sweet. I couldn't get it to work exactly as described (I had lots of
problems with getting the scope of the caret right), but with some wrangling
- and making sure that certain rules came in the right order - it seems to
be working. I was even able to get "smart deletion" (where backspace deletes
both your smart quotes) with a similar trick.
rock!
> ---------- Forwarded message ----------
> From: Allan Odgaard <throw-away-1(a)macromates.com>
> To: TextMate users <textmate(a)lists.macromates.com>
> Date: Fri, 14 Apr 2006 12:24:15 +0200
> Subject: Re: [TxMt] Bundle for Remind
> On 13/4/2006, at 5:49, Rupa Deadwyler wrote:
>
> > I need to figure out how to scope functions() that have other
> > functions inside them, my first regex was not good at all. And I
> > wish I could get %" to be completed as Smart Typing Pairs, but it
> > seems you can only have one character in them :(
>
> You sort of can. You need to add a rule to the language grammar, e.g.:
>
> { match = '%(\s)';
> captures = {
> 1 = { name = "meta.incomplete-string-or-whatever"; };
> };
> },
>
> Now when you enter % in the source, the scope of the caret should be
> the one shown above. So create a snippet which inserts whatever needs
> insertion ("$1"%) and give that snippet a key equivalent of " and
> scope of source.remind meta.incomplete-string-or-whatever.
>
> Then if you type %" in a source.remind file, you should get %""% with
> the caret in the middle, and you can press tab to skip out of this
> string.
>
> The rule is made so that this only works when the character following
> the % is a whitespace character (which includes newlines, so it also
> works when typing at the end of a line).
>
> As for how to go about this, I attached a bundle with a macro and a
> script, the macro does:
>
> 1) replace all in selection, adding 0xFFFC as the first/last
> character (this is the unicode object replacement character, so I’d
> be surprised if your script already have such characters)
> 2) select all
> 3) call transform.rb with input set to document and output to
> insert as snippet
>
> The transform.rb script then reads stdin, does a split on 0xFFFC
> (resulting in an array with the before/selection/after), snippet-
> escapes each of the 3 parts, and then inserts a snippet which puts
> >>> and <<< around the selection, but leaves those added characters
> unselected, when replacing the document.
Nice!! +2 for Allan :D
> Couldn't you use a macro that selects the entire document and then
> calls a command that has output "insert as snippet" ?
Yeah, but that's a bit too roundabout for my taste ;)
Seriously, I could in theory do this, but to get the same effect I'd
have to copy the text to the clipboard, then select all, then run the
command, and I'd have to change the command to use TM_CLIPBOARD_TEXT
instead of TM_SELECTED_TEXT. I may get around to it at some point,
but unless this feature gets pushed to 2.0, I can wait for a more
elegant solution.
Don't want to sound like a whiner, but that's my excuse FWIW.
- Ben
http://www.unfitforprint.com/articles/2006/04/15/pimping-my-editor-
refactoring-take-1
I'm working on a set of refactoring commands for AS2 using the new
XML input mode. This is the first nugget... hope you enjoy it.
Any chance we'll see "Replace Document with Snippet" anytime soon,
Allan? Best regards,
Ben
I recently purchased Circus Ponies Notebook software to help me stay
more organized (it rocks by the way). I want to be able to keep a
'notebook' in each of my project directories. The problem is that a
'notebook' doesn't appear as a regular file in the TM drawer -- it
appears as a directory full of my notebook contents. The reason why
that's a problem is because it means I can't just double-click the
notebook to open it in circus ponies software. Instead I have to go
find it in the Finder, and launch it from there.
Anyway to fix this?
Also, is anyone else using CP Notebook for project documentation?
Cheers,
Sean
:::: DataFly.Net ::::
Complete Web Services
http://www.datafly.net
hi,
I have a problem when i try to create a new file from any predifined template.
Nothing is happen no file,
was created. Did somebody have any clues to hellp me or a similar problem ?
Thanks.
Hi All,
Is there a way to add other encodings to the "Re-open with encoding"
menu? I only have Mac Roman, ISO-8859-1 and UTF8/UTF16 encodings in
the list and I would like to add something like KOI8-R, CP-1251 etc.
How can I do it?
Boris./
Hi all,
Watch out if you update to the latest TextMate bundles and themes (via svn)
- revision 3030. The Eiffel bundle includes a theme that has the same UUID
in it as the MacClassic theme (most likely the author copied the theme and
changed the elements, but didn't change the UUID.)
This results in the Mac Classic theme not appearing in the Theme menu in the
preferences. I went into the file itself and changed one digit of the UUID,
and now both appear in the menu.
Just a heads up! Hopefully the author is on this list and will see and
correct it.
jt
I like the use that Textmate makes of the help key, but I have one
suggestion as an addition. Could it suggest possible spellings of a
misspelt word too?
Best,
N
I'm trying to create a snippet that will create the following:
list: foo / bar / foo
foo does:
foo does not:
bar does:
bar does not:
foo does:
foo does not:
that automatically builds itself based on the number of items in the
slash-separated list ...with tab-stops after all the items.
What I've come up with is:
$1
${1/\/\s*/\n/g}
Which can do this:
foo / bar / foo
foo
bar
foo
but not much else. So I ask you, whose kung-fu is much better than mine.
P.S. - Can you have a transforming snippet that inserts tab-stops for
you? I don't think I've seen that anywhere. That would be awesome.
Yeah I have little idea of how the syntax works - I just tried to make it
look decent and I wasn't sure how important it would be to separate scopes
out for such a little language. Thanks for your bundle - I added some stuff
and made a bunch of changes to mine on the strength and maybe it's a little
better now. I imagine it's still pretty off though - I'd welcome some input
from someone that knows their languagey stuff.
I need to figure out how to scope functions() that have other functions
inside them, my first regex was not good at all. And I wish I could get %"
to be completed as Smart Typing Pairs, but it seems you can only have one
character in them :(
Thanks for that. It's good to see that others use TextMate and remind.
>
> The language grammar needs work I think. It is less than optimal to
> group everything into keyword.operator.remind and
> constant.language.remind. I put together a language grammar awhile
> back before the naming conventions matured. I haven't posted it,
> because it should be updated to conform to these. But one advantage,
> I think, is that it had a better "spread". I attach it in case you
> want to have a look at it.
>
>
> Another minor thing that I also did that I find useful is to display
> monthly calendars with TM's browser using rem2html.
>
> All the best, Mark
>
I know some form of chunky undo (as opposed to the current char-by-char
undo) is on the to-do list (yaay) and and I had a thought about it:
Might it makes sense to offer both, in an attempt to get the best of
both worlds? For instance one could type cmd-Z to get chunky undo, then
cmd-option-Z to get char-by-char. Basically this lets one make big jumps
to get to approximately the right spot, then inch along to get to the
precise spot.
An undo history could be even faster to navigate, but that sounds like a
much more complicated programming problem. I've seen a history in at
least one CAD program, but never a text editor.
-- Russell
Hi,
I'm currently extending the JavaScript and the "Prototype &
Scriptaculous" bundles [1] but noticed one thing. When a language has
a "sub scope" like in this case (since prototype is a JavaScript
framework, the parent scope is JavaScript") shouldn't the scopeName
be 'source.js.prototype' instead of 'source.prototype.js'?
Otherwise the reglar JavaScript bundle items wouldn't work, would
they? See the attached plist file,
Ciao
Martin
[1] http://encytemedia.com/blog/articles/2006/01/03/textmate-vibrant-
ink-theme-and-prototype-bundle
As some of you probably know, since revision 948, TextMate supports
the ability to have the entire document together with all the scope
information as input for command. This is done by setting a key
"inputFormat" with value "xml" into the plist file for the command,
and setting the input to the command to be the entire document. This
will input the document in a "pseudo-xml" format, of the type:
<scopename>text</scopename>, with nestings etc.
The ScopeHandler class is a Ruby class I just put together that
offers you an easy interface to this “xml”-style input. I've set up a
home page for this class with a couple of descriptions and examples
here:
http://skiadas.dcostanet.net/afterthought/the-scopehandler-class/
The actual file can be found here:
http://skiadas.dcostanet.net/uploads/scopeHandler.rb
Use at your own risk. Let me know if you do. Feel free to suggest
additions/corrections/more examples/ideas for use.
Haris
I'm not groking the current implementation of stracc in the objc bundle.
- (NSString *)${1:thing}
{
return ${2:f${1/(.)(.*)/\U$1\E$2/}};
}
- (void)set${3:${1/(.)(.*)/\U$1\E$2/}}:(NSString *) $1
{
NSString * old${3:Thing} = ${2:fThing};
$2 = [${1:thing} copy];
[old${3:Thing} release];
}
Clearly fThing is not defined so return fThing makes no sense in a
getter accessor method. Nor does instantiating another string object
in the setter method.
A "working" objc stracc:
- (NSString *)${1:thing}
{
return ${2:${1/(.)(.*)/$1\E$2/}};
}
- (void)set${3:${1/(.)(.*)/\U$1\E$2/}}:(NSString *)${4:a$3}
{
$4 = [$4 copy];
[$1 release];
$1 = $4;
}
[This models the string accessor implementation defined in
Hillegass ... if it's not correct, maybe someone should tell Aaron.]
Refactoring and/or explanation as to the current defined stracc is
welcome/encouraged.
--
Mark Grimes
Stateful Labs
mark(a)stateful.net
> Since we can match the newline character,
> this change still allows us to decide the
> scope of the caret when it is at the end of a
> line, by assigning the scope to the newline.
> So the change didn't just shift the problem
Makes perfect sense.
By default XSL bundle doesn't threat "-" as word character, which impairs
auto-complete feature (instead of getting "apply-tempaltes" I have to
autocomplete "apply", add hyphen and choose between "template" and
"templates").
Is it possible to have "-" as word character for XSL only? I'm using other
languages at the same time, so I don't want to change prefs back and forth.
--
regards, porneL
It's funny how just a one line comment about a new version of the app
can break almost every scope you've got....
> [CHANGED] The scope of the caret is now that of the
> character to the right of the caret, rather than that on
> the left side.
Just a heads up to all you bundle developers, check your scopes to
make sure this doesn't effect you. Particularly if you have macros or
snippets that only take effect at the end of a line.
^[a-z\s\.]{,15}$ ...will no longer work. Removing the "$" will fix
it (in this case).
I haven't seen anyone talking about this, but it strikes me that it
could adversely effect many people. Why has this change been enacted
(yes, I realize it's "nightly-build" only at this point. Is this a
good thing? Does this force our scope selectors to be more precise?
Am I wrong?
Here's a strange thing. I'm using ProFont, unaliased, and the tool tips
look weird. Attached is a screen capture showing the same output as
normal window text and tool tip text. Notice spacing issues and some
characters running together ("fi" of file), neither of which are a
problem under monaco.
I understand this probably because ProFont is just a somewhat roughly
built font, but weird and relevant enough I should share.
Q
This is a more detailed explanation of how the scope selector change
in rev961 has effected me, and how it will effect you.
say you have this example:
name = 'meta.test.comment';
match = '^\s\*\s.*';
and when you press return you want to insert a newline, space, and
asterisk to continue the comment (or whatever). A common snippet.
With the change in rev961 it is now necessary for the match string to be:
name = 'meta.test.comment';
match = '^\s\*\s.*\s*';
notice the "white-space character any number of times". This may be
obvious to more experienced programmers but to someone like me I had
forgotten that the '.*' search doesn't include newline characters. And
the previous version of TextMate was forgiving in this regard.
So I guess the change is a good thing. But I foresee lots of snippets
and macros breaking in not-so-great-coded languages because of this.
Just a heads up to you guys, check your code.
Good to see Allan and others checking in lots of changes to the Ruby
bundle lately. Is there any popular support to extending folding
markers to do/end, if/else, while loops etc. like we have in most
other language bundles?
sebastian
Hello list,
I thought it was annoying to edit the Lighttpd configuraton file
using the Apache syntax, so I've made a small bundle for Lighttpd.
It's available at <http://amonre.org/pub/textmate/bundles/>.
This is my first attempt at a bundle, so don't expect much. It
contains nothing more than a syntax definition so far. No macros, no
snippets, etc yet.
Let me know what you think.
Regards,
Denis Defreyne
--
mail: amonre(a)amonre.org
web: http://amonre.org/
copied my project files over from another computer and the project opens
fine except the bookmarks are no longer there. where is the bookmark info
stored?
thanx....
Using TextMate 1.5.1 (948), I've observed some behavior that I wasn't
expecting. Specifically, when I set the command's input to Entire
Document, my command seems to get less than the entire document on
its stdin.
I'm curious whether anyone else is seeing the same thing. Here's an
easy way to test.
Create a new command (MyCommand) with the following settings:
Save: Nothing
Command(s): cat
Input: Entire Document
Output: Create New Document.
Unless I'm missing something, this command should simply copy the
command's input, the entire document, to a new document, using the
shell "cat" command. However, the command's input seems to begin at
the character immediately following the first ) character in the
document. If there is no ) in the document, nothing is copied.
I don't know if there is something specific to my environment that
may be causing it, or if it's a bug, but this behavior wreaks havoc
with the built-in Ruby "Run Script" command (which uses cat), causing
it to overwrite saved Ruby source files with less than their full
content.
--David W. Body / Big Creek Software, LLC
Hi all,
FWIW, I put together a bundle for remind - it's probably pretty terrible
(I'm not to clear on language.element.naming) but since no one's done it yet
I thought I'd let you guys know. It seems to work ok, I'd welcome any input
and I can throw it in your svn if you like it.
http://code.cutup.org/remind
Hello all, this is my first post here, feel free to point any mistake.
So… I installed Allan's Theme Builder bundle but it always spit the
same error message :
/tmp/temp_textmate.Z1KGTa:3:in `require': No such file to load -- set
(LoadError)
from /tmp/temp_textmate.Z1KGTa:3
Any idea what's causing this problem? Is it in TM or in Ruby?
My specs:
PM G5 2x1.8GHz
Mac OS X 10.3.9
Textmate 1.5.1 (v948)
ruby 1.8.2 (2004-12-25) [powerpc-darwin7.8.0]
Thanks, Romain.
I am using TextMate Version 1.5.1 (961). Just noticed that a number
of built in keybindings no longer work. None of keybindings for
Text:Convert:to Uppercase, to Lowercase, etc. work (though selecting
the commands from the menu does). Autocompletion doesn't work either. :(
Any ideas about how to diagnose what is going on?
Thanks in advance. 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
Hey folks,
I just hacked together a quick language grammar for LaTeX log files
to better see where things are odd ;)
Dan
PS: I am not really sure if the naming below makes sense from the
naming convention's viewpoint, but it does the job of generating markup.
{ scopeName = 'source.log.error.latex';
fileTypes = ( 'log' );
foldingStartMarker = '/\*\*|\(\s*$';
foldingStopMarker = '\*\*/|^\s*\)';
patterns = (
{ name = 'invalid.deprecated';
match = '.*Warning:';
},
{ name = 'invalid.illegal';
match = '.*Error';
},
{ name = 'entity.name.function';
match = '.*\.sty';
},
{ name = 'entity.name.class';
match = '.*\.cls';
},
{ name = 'entity.name.tag.configuration';
match = '.*\.cfg';
},
{ name = 'entity.name.tag.definition';
match = '.*\.def';
},
{ name = 'comment.documentation';
match = '.*Info.*';
},
{ name = 'meta.log.latex.fixme';
match = '.*FiXme:';
},
{ name = 'meta.log.latex.hyphenation';
begin = '(Overfull|Underfull)';
end = '(\[\]\n)';
captures = { 1 = { name = 'keyword.control.hyphenation.latex'; }; };
patterns = (
{ name = 'variable.parameter.hyphenation.latex2';
match = '[0-9]+\-\-[0-9]+';
}
);
},
{ name = 'meta.log.latex.filename';
begin = '(<)';
end = '(>)';
captures =
{ 1 = { name = 'string'; };
2 = { name = 'storage'; };
3 = { name = 'string'; };
};
patterns = (
{ name = 'support.function.with-arg.latex';
match = '(.*/.*.pdf)';
captures = { 1 = { name = 'entity.name'; };};
}
);
},
);
}
As far as I'm aware there isn't any way of optionally ignoring the
additional word characters specified in
Preferences when trying to select words.
I'm often wanting to copy, change or set search selection, part of a
variable name which doesn't include a dash, underscore, etc., though
most of the time I do want it to include those elements as part of a
single word.
One solution would be to use a modifier key: So, in my world, Cmd-Opt-
Shift + Right or Left arrow would ignore the additional word
characters and Cmd-Opt double-click and Cmd-Ctrl W would also work
the same way (there may be better modifiers!)
The alternative would be to toggle the additional word characters
option in the Edit menu, which would have the downside of not
allowing you to dynamically change your specification in mid-
selection, but may be simpler to implement.
I've wanted this for a long time and am surprised it hasn't been
suggested before (as far as I can remember) which probably means a)
that the functionality is there and I just haven't figured out how to
open my eyes yet, or b) it's a really crap idea.
Any thoughts?
James
I always download themes with safari, holding down option and
clicking, and it saves it with an appended .txt extension. Sure, I
can go in and rename it, but it's frustrating :)
Any thoughts.
Andreas
Duane,
since most people prolly manage their rails projects with subversion,
do you think you could add an --svn option for the Rails generators?
I guess, this little edit in generator.rb should do the job by simply
applying the --svn flag for all projects under subversion (testing
for .svn folder in the app root):
svn_option = File.exist?("#{rails_root}/.svn") ? "--svn" : ""
command = "\"script/generate\" #{generators[choice].name} #
{svn_option} #{name} #{options}"
Thanks,
Sebastian
Hi all,
Is anyone else seeing this?
$ pwd
/Library/Application Support/TextMate
$ svn update
svn: Can't convert string from 'UTF-8' to native encoding:
svn: Bundles/CAKE.tmbundle/Commands/Paste Line : Selection to IRC?
\226?\128?\166 (CakePHP Paste).plist
$
Any idea what's causing this?
Carpe viam,
Mike
Michael Larocque
Chief Cook and Bottle Washer
Prolumina Communications Inc.
http://prolumina.com/~mlarocque/
Hi,
In html preview mode, how do you force the preview window to update elements
called by the document? (images .css files etc.)
In Safari, I would use cmd-R to refresh the window.
It would be nice if Textmate asked webkit to do a deep flush when you
clicked the refresh icon with a modifier key down.
Tim
Textmate hint of the day: cntrl-S gives you an incremental search (like / in
Firefox, or Safari if you install acid-search)
Hi,
After a lot of reading the documentation on textmate language
bundles, grammar and scopes and regular expressions, I (just|finally)
began making my own bundle for the cheetah templating language. My
first post on this list is the following question:
How can I name the scope from when I include an other language in my
language bundle?
To explain this a bit:
My quest comes forth out of an esthetic desire to color the
background of embedded html in the cheetah template, just like the
"Embedded source" scope 'text source, string.unquoted' can colorize
the embedded javascript or css in a html document.
In my cheetah language grammar I have a pattern:
{ name = 'source.embedded.html';
include = 'text.html.basic';
},
But in the document, the scope (ctrl shft P) just says
"source.cheetah", or "source.cheetah meta.tag.structure.any.html"
when my caret is within a html tag. I don't see anything of that name
'source.embedded.html' reflected in the scope.
Is it possible to give an embedded (or included) language an extra
scope layer name, so I can use that in a theme?
I tried 'source.cheetah source.embedded.html' but that didn't do
anything. For now I use 'source.cheetah meta', but that means I am
missing a lot of non-cheetah-html stuff, like html comments, or (in
html) embedded css or javascript.
I hope that my question is somewhat clear.
thnx
dirk
-----------------------------
Dirk van Oosterbosch
de Wittenstraat 225
1052 AT Amsterdam
the Netherlands
http://labs.ixopusada.com
-----------------------------
>
> > There is a Doxygen bundle at the svn repository.
>
> I saw it. However it does not do no syntax highlight.
Enrico, if you want to look at adding or updating the doxgen bundle let me
know. I added it as a starting point, but have no feeling of ownership if
you want to take it over or extend it together let me know.
I use it very lightly and would love to see it get better.
Sam D
Uh-oh!
As recommended, I've svn co'ed the bundles into my ~/Library TM
directory in anticipation of using svn to merge updates into my custom
stuff (bundle items).
However, I already *have* tons of custom stuff, so I tried merging my
old stuff into the svn working directory using rsync -au. I followed
this with some diff-ing to merge the language files and other conflicts.
The only stuff I didn't merge were all the UUIDs.
And as you can guess, some of my old stuff has reverted back to the
originals. Some stuff isn't showing up in the bundle editor (for
example, both files exist: "PHP if( ).plist" and "if .. (if).plist", but
the latter file is not available.
Any suggestions how to cleanly merge my old stuff into the svn co? Any
way to completely reset all UUIDs? (I've already tried deleting the
bundle Info.plist files, but the missing stuff doesn't appear...just
everything goes out of order.)
Q
Allan,
I am using "Edit in Textmate" for most of my emails now, but I am
finding out that there are some caveats that will kill your email
message; namely switching between windows and/or applications too
often results in your text being lost and not placed back into the
email when you close the TxtMte-Window. Right now I am placing the
email message into the clipboard as a backup, but clearly there is
something odd here ;)
Dan
#Wishlist
I would love to have a workflow like this:
* extract a listing of scopes from a bundle
* create a set of styles
* and then have a listing with styles on the left, scopes on the
right with some form of connectors between them to assogn styles OR
definitely some way to see which scopes have which styles applied
* (and possibly some way to easily change a *whole theme's colors*:
like convert all R values to G values… ;))
A thing I have noticed during my attempts to get some more specific
styling for my LaTeX stuff is that there are so many themes out now,
and so many bundles it is almost impossible to create a theme that
*really* applies to all languages. What would be very useful to try
and play with themes would be some way to assign relationships
between scope selectors for themes to substitute missing elements.
This would look like some list that a user or a bundle could provide
which says:
“if your theme does NOT know about meta.scope.obscure then please
have it handled like meta.scope.common, as these are related or at
least the style markup would indicate a similar importance.”
Possibly add some way of indicating those *placeholder* assignments
in the theme editor by creating blanks that could be filled in or so.
(This would in a way be similar to a situation where bundles do not
use their own but a limited namespace. But would also allow for a
much more sophisticated access for styling as well as for mixed
language situations or for purely aesthetic reasons [like in
Brilliance Black where you have different color “mini-themes” for
different bundles/languages]).
Am I still making sense?
Dan
PS: I do realize this will end up very low on the “wishlist” ;)
From one of today's TextMate Blog entries:
"By default, pressing ⌃H on a tag name will show the W3C
documentation for that tag, this also works for CSS selectors, PHP/
Ruby functions, Cocoa stuff, and outside of HTML, things for which
there is a manual page, etc.)"
Until today, I somehow never realized TextMate had this feature, and
I was happy to see it works for Java, too. At least, it's supposed
to. I can't get it to work. It seems that the command requires an
index.html file in the Java API docs directory, but on my Tiger
installation of Tiger (that is, Mac OS X 10.4 and Java 1.5/5.0),
there doesn't seem to be any index.html in that directory. There's an
index-files subdirectory, but no root index.html file. Is there
something wrong with my installation of Java?
Trevor
This Java program prints nothing when run using Compile & Run Single
File.
public class test
{
public static void main(String[] args)
{
System.out.println("<hello>");
}
}
Apparently the output is being squelched because it looks like
markup. Is there a way around this? Or is it just a bug?
Trevor
This seems like it should be obvious, but I can't work it out.
What do I set the Scope Selector to on a command I want to be available
everywhere? My first intuition is just to leave the Scope Selector field
blank, but it's not working.
I have several commands in the text bundle using apple-shift-option-P,
and one in the HTML bundle. While editing a HTML document when I hit
this key combo I only get the HTML command, not the others in the text bundle.
Hmmmm?
Q