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
--
View this message in context: http://www.nabble.com/Tab-stops-work-strangely-with-nested-snippets--tf4250…
Sent from the textmate users mailing list archive at Nabble.com.
In a screencast, control -> less-than was used to change hr and img to <hr />
and , respectfully (the -> is not part of the key combination). What
happened to this feature? It no longer closes it like this: <hr />. It
only shows <hr></hr>.
--
View this message in context: http://www.nabble.com/signleton-tags-not-supported-with-control-less-than--…
Sent from the textmate users mailing list archive at Nabble.com.
A.K.A. Objective-c Annotation project,
I have started to think how I can improve the objective-c code completion,
adding additional context sensitive suggestions. Currently there are only
context sensitive suggestions for a limited set of operations inside an
Objective-C method call context.
What I would like is for constructs such as:
returnCode == NSOKButt[caret]
to be context sensitive as well, the problem is that just looking at the
type of returnCode is not going to work since it is most probably an int,
of which there are hundreds in Cocoa (counting functions that return int
and constants).
So my thinking is that using a regexp I can gather statistics from various
open-source project and make educated guesses as to what a more "detailed"
type would be, thereby being able to provide better suggestions.
for example:
-(void)openPanelDidEnd:(NSOpenPanel*)panel returnCode:(int)returnCode
contextInfo:(void*)contextInfo
{
if (returnCode == NSOKButton)
}
I would parse out the method header, the argument names + the method part
they were connected to, and then do a regexp search in the body of that
method that would check if any of the arguments are compared/assigned
against a constant/function declared in the cocoa headers. Check if this
constant/function is of a more specific type (in reality a cocoa typedef
enum).
if so add this method to a file of special cased code completions (and
ofcourse enough information to deduce what special treatment that would
be).
So now to my question to you fellow TextMate using Objective-C users:
Do you think this will help you in your coding or will it get in your way?
Have I overlooked something that makes this not viable?
Should I instead provide a special nib with a giant talking paper clip?
Thanks in Advance
Joachim MÃ¥rtensson
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