Is there a particular reason that there aren't any snippets in the Rails
bundle for validates_acceptance, validates_each, validates_inclusion, or
validates_numericality_of?
I attached some, including versions with "if" for those that seemed
reasonable (ie, those whose closest counterparts had if versions already in
the bundle).
Small problem with the LaTeX grammar's handling of single quote
strings. The following:
'tis suppos'
as it occurs in:
'tis suppos'd
gets scoped as invalid.illegal.string.quoted.single.latex. LaTeX,
however, has no problem with such constructions. Perhaps this would
be difficult to fix and the problem is, in any case, rare. (I only
hit upon it writing a Hume lecture.) Just thought I would pass it on.
Best, Mark
I want to produce
[origin [pt x]];
using a snippet called msg (short for message) that looks like this
[${1:Receiver} ${2:message}]
When I write msg and hit tab I am presented with
[Receiver message]
where Receiver is highlighted. I write origin and hit tab. Now I get
[origin message]
and message is highlighted.
I write msg again and hit tab.
To my surprise I get
[origin msg]
with tha caret after the last bracket.
So it seems that TM is giving priority to the outer snippet??? But I think
that two other alternatives might be better
Alternative 1: Forget all tab stops for the first snippet when an inner
snippet is activated.
Another alternative is
Alternative 2: When hitting tab give priority to the inner snippet first and
when it is finished then give focus to the outer snippet and let it do its
thing.
If I am wrong in my thinking tell me why. If I am right maybe it is some
programming difficulty with nested snippets that prevents the desired
behavior.
Thanks Bob
Hi Everyone,
I am using the TODO bundle, or wish to use it, to keep track of things to do
in my thesis. My Thesis project directory is off the root directory and
contains many Latex files. The problem is when I use the show TODO list, the
command runs properly but does not show the TODOs that are present in the
project files. i.e. the read out gives 0 in the TODO/CHANGED/FIXME columns.
The bundle works fine on single files found elsewhere in my system. I have
the latest TODO bundle check out and the latest bundle support, running T
1.56. Does anyone know what I am doing wrong - why is it not working?
Regards,
Mark Perrin
I am not a computer programmer, but use TM as my word processor. I am
interested in creating a macro which selects the text from the location of
the cursor to the next period in the sentence and then deletes that text.
Can anyone tell me how I can go about that?
Thanks for the help.
Context Sensitive HTML attribute completion!!!
You'll have to have the latest copy of the support folder and the HTML
bundle.
I have tested this quite a bit on my machine, but
if you can find a way to make it break, please let me know and I'll
fix it right up.
To use: tap the space key when your caret is just before the last
character in an html tag.
It looks up a list of attribute to tag associations and only shows you
a list of the ones that apply to the current tag that you're in.
<div TAP_SPACE_HERE>
or
<img TAP_SPACE_HERE />
If you type a few characters before you hit space, it'll use those
characters to limit your list even further.
for example:
<img onTAP_SPACE_HERE />
That will limit your list of completions to anything that starts with
"on" and is applicable to the <img> tag.
Also, works with lowercase and UPPERCASE HTML tags. When you use
uppercase tagnames it'll give you upper and titlecase attribute names,
depending on what's appropriate.
This version DOES NOT look at your doctype, it just gives the same
list for all html languages.
I think I'll wait for TM2 to do the doctype thing since it'll be a lot
easier then.
I'll do an official announcement with screencast and everything once
people argue endlessly about the keybinding that it should use.
thomas Aylott — subtleGradient — CrazyEgg — bundleForge
I've just started to try out TextMate :). I've created a little snippet
called vam (short for variable and method) that looks like this
{
int ${1:var};
}
-(void) set${1:var}:(int) n;
So when I enter vam and hit tab, I am presented with the following chunk
{
int var;
}
-(void) setvar:(int) n;
where var is highlighted. If I start to type numerator the chunk changes to
{
int numerator;
}
-(void) setnumerator:(int) n;
However I would like setnumerator to be outputted as setNumerator.
Is there a way to do this?
Thanks Bob
Hey there
I recently had a look at the GetBundle bundle and liked the fact,
that you can have a look at the available bundles online and then
select which ones to install. I also like the growl notification (why
doesn't it use my default bezel?).
I'm currently updating my bundles manually via svn from http://
macromates.com/svn/Bundles/trunk and always install all bundles
including the support folder, plugins, etc. It takes up some space on
my HD but that way I'm sure, all the bundles work properly. I install
them in my "/Library/Application\ Support/Textmate/" folder. If I
remember correctly, this is the recommended place to install
additional/updated bundles. The question I asked myself is, why
GetBundle installs its bundles into "~/Library/Application\ Support/
Textmate/Pristine\ copy/Bundles"? -- It would be nice, if there was
some kind of setting or shell variable, where you could set where to
install the bundles (for all users or just the current one). The way
it's handled now, the bundles available via svn and the ones I
install manually via download and double-click get mixed up in the
same folder (Pristine copy). Also I don't now how the updating of the
Support or PlugIn folders gets handled via GetBundle. I'm reading a
lot about conflicts between wrong versions of the dialog plugin and
bundles which depend on the newest version of the plugin on this list.
Maybe someone can shed some light on these things? Maybe a help file
for this bundle wouldn't be wrong also, since it's targeted to users
which aren't familiar with svn and how this whole bundle thing works.
Thanks in advance!
Oliver
Hi everyone,
You may have followed that I recently manage to update my
bundles after a long period using outdated ones :D
And then, I noticed that snippets for inserting images and
link in the HTML bundle have dissapeared…
I created my own snippets to replace them; it's no big
deal… But I was curious why those snippets have
dissapeared ?? Am I the only one using them ? :)
TIA