Thanks all.
The easy answer (which I missed in the rel notes) is to use
TM_FULLNAME instead.
Works a treat!
Cheers,
John.
On 30 Nov 2007, at 12:00, Allan Odgaard (via digest) wrote:
> From the r1431 release notes:
>
> [NEW] TextMate sets TM_FULLNAME (unless you set it yourself)
> to the user’s full name, so no longer necessarily to fiddle
> with niutil and dscl to obtain it.
>
> So it should not be necessary for commands/snippets to try and
> obtain the full username themselves.
YES!
You heard it here first folks.
I just added a Select Balanced HTML/XML Tag macro to the Experimental
bundle!
I've been trying different ways of making this work since I first
started using TextMate back in, what like 2004 or something?
I've tried regex, I've tried Ruby, I've tried everything I could think
of...
But finally I've come up with something very simple.
The only real downside is that it's EXTREMELY slow. Like 1 second from
running the macro until it's done. But that's WAY faster than using
the mouse to manually select that same code, or trying to use the
keyboard to manually select it.
This is frankly the #1 biggest missing feature of TextMate that
directly impacts my life.
If this breaks anything, just remember that it's undoable. Command-Z
is your friend.
Please also report and and all problems to me with an example of the
code that it chokes on.
If you only want to DOWNLOAD this macro alone, just visit this link
and double-click the file.
http://macromates.com/svn/Bundles/trunk/Bundles/Experimental.tmbundle/Macro…
—Thomas Aylott – subtleGradient—
Hi,
I only have a tiny question and I didn't find anything in the archive.
E.g. I have that grammar snippet:
name = 'meta.tag.any.html';
begin = '(<)([a-zA-Z0-9:]+)(?=[^>]*></\2>)';
end = '(>(<)/)(\2)(>)';
beginCaptures = {
1 = { name = 'punctuation.definition.tag.html'; };
2 = { name = 'entity.name.tag.html'; };
Is it possible to name the beginCaptures 1 and 2 according to values
found in the regexp groups like for group 2
name = 'meta.tag.any.html';
begin = '(<)([a-zA-Z0-9:]+)(?=[^>]*></\2>)';
end = '(>(<)/)(\2)(>)';
beginCaptures = {
1 = { name = 'punctuation.definition.tag.html'; };
2 = { name = 'entity.name.tag.html.$2'; };
or
2 = { name = 'entity.name.tag.html.$self'; };
$2 or $self referring to the actual content of the found regexp group
2 to get:
<meta.tag.any.html>
<punctuation.definition.tag.html><</punctuation.definition.tag.html>
<entity.name.tag.html.title>title</entity.name.tag.html.title>
<punctuation.definition.tag.html>></punctuation.definition.tag.html>
Thanks,
--Hans
Since upgrading to OS X 10.5 the TM_USERNAME variable used in bundles
has been unset.
The following command is the problem:
TM_USERNAME=`niutil -readprop / /users/\$USER realname`
Seems that the niutil command has been dropped from 10.5 onwards and
replaced by the dscl command.
The following gets the current users real name but prepends it with
the property key:
dscl . -read /Users/$USER RealName
returns:
RealName:
John Hunter
I'm not sure how you get the value without the key.
Has anyone got a solution to this? It affects most of the templates.
Apologies if its been covered before.
Thanks
--John
With the imminent release of Rails 2.0, I've started working on a
project in earnest on edge rails.
I'm finding some things to be broken in the Ruby on Rails bundle due
to the Rails changes. For example.
* generating a migration from textmate doesn't seem to work, it
prompts for the name, and runs but nothing is generated.
* the mcol snippet(s) get confused by the use of 'sexy' migrations
in schema.rb
* Partial extraction isn't savvy to the changes in file naming
(e.g. x.rhtml is now x.html.erb)
So what are the plans for tracking the rails changes in the bundle?
And is there any hope that the bundle can deal with multiple rails
versions? I'm sure I'm not the only one who needs to work with
different rails versions on different projects.
How are others dealing with this?
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
What is the correct policy for making change to a Bundle in the code
repositories?
I want to improve the "Bold" command in the "Dokuwiki" bundle.
Currently the command is:
**${TM_SELECTED_TEXT:text}**
Which works, but is rather simplistic. I happen to also use the
"MultiMarkdown" bundle which is intelligent, if you hit the key combo
(Command-B) while selecting already bolded text, it will un-bold it.
if you hit the key combo while no text is selected, then it places
the cursor within the bold typing area, etc.
Since "Dokuwiki" and "MultiMarkdown" use the same syntax for bolding
(surround text with double '*'), that would mean I would just need to
copy the command code from "MultiMarkdown" over to replace the
Dokuwiki bundle's version.
I don't want to step on the toes of either Bundle creator (copyright,
etc).
----
Brian H
binarynomad(a)gmail.com
http://www.binarynomad.com
Hello:)
I'm with Leopard 10.5.1 and TextMate 1.5.7 (1436).
I created a latex project : i dropped some files .sty and a folder
with subfolders in the project drawer.
my project :
file_a.sty
file_b.sty
mainfolder
file_c.tex
file_d.tex
subfolder
file_e.tex
file_f.tex
I can't remove the references to subfolders and I can't remove the
references
to a single file inside a subfolder like file_e.tex
I can't delete the reference of a file in the main folder like
file_c.tex
I can only delete the reference to the main folder
In conclusion, I can remove only the references to file_a.sty and
to mainfolder :(
When I say : I can't delete, I need to say that's when I close TM
and when I re-open , the files are always in the project drawer .
I try to save the project but the result is the same but move to trash
works well :)
Perhaps i take a wrong way to create my project
An idea ???
Regards Alain
Hi,
I use Textmate 1.5.5 on my MacBook Pro (2,33 MHZ, OS X 10.4.9) t
mamage my rails project with about 500 files in the project.
Every time I switch from the active TM to another application and then
back again, TM spins the wheel for about 5 secs. May be it is checking
files or something else.
I only installed the TmCodeBrowser additionally, nothing else.
Is there a way to make TM instantly responsive after activating it?
thanks,
Alex.
I have raised to the grade of a neophyte bundle author recently and
released my own perfect TextMate GTD bundle. It's conceptually based
on Henrik's Tasks bundle, but implemented differently to allow for
some additional features. You can find some links at beneath if you're
interested.
Now I'm interested in getting this into the official TextMate
repository. I'm quite sure that my bundle doesn't adhere to any
required style- or naming conventions and I'm keen to tackle that next.
Can you point me to some kind of guideline or other document here? I
haven't been able to find anything about the process of getting a
bundle approved and published.
Also, I'd greatly appreciate feedback, suggestions, criticism ...
regarding the bundle. I'm using it myself, but I'd love to learn what
others think about it.
Thanks a lot!
[1] about my initial motivation:
http://www.artweb-design.de/2007/11/20/taskmate-the-perfect-gtd-tool-to-be-…
[2] release announcement:
http://www.artweb-design.de/2007/11/24/taskmate-the-missing-gtd-tool-for-yo…
[3] download, install & usage notes:
http://www.artweb-design.de/projects/taskmate
[4] Henriks Tasks bundle:
http://henrik.nyh.se/2007/08/tasks-bundle
--
sven fuchs svenfuchs(a)artweb-design.de
artweb design http://www.artweb-design.de
grünberger 65 + 49 (0) 30 - 47 98 69 96 (phone)
d-10245 berlin + 49 (0) 171 - 35 20 38 4 (mobile)