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