The code is within an @implementation/@end.
^q works fine for a method signature, but it's still doing normal
paragraph fill inside the call itself.
if I put the caret inside the brackets, and check scope I get:
scope.objc
meta.implementation.objc
meta.scope.implementation.objc
The method call command seems to be bound to meta.bracketed.objc,
which I assume is part of the problem, but I'm not sure how to
resolve.
Oh, I'm running cutting edge 1368, although I'm starting to wonder if
my setup has gotten a little messed up -- I'm also having trouble with
the new opt-escape completion.
Thanks,
On 3/11/07, Allan Odgaard throw-away-1@macromates.com wrote:
Please reply to the mailing list!
Anyway, if I press ⌃Q inside the brackets, e.g. with caret on
'addObserver' I get:
- (void)startObservingPerson:(Person *)person
{
[person addObserver:self
forKeyPath:@"personName"
options:NSKeyValueObservingOptionOld
context:NULL];
[person addObserver:self
forKeyPath:@"expectedRaise"
options:NSKeyValueObservingOptionOld
context:NULL];
}
If I press it on the method signature, it will do a normal paragraph
reflow *unless* I add @implementation/@end, because without that, TM
will not see it as an Objective-C method implementation.
On 11. Mar 2007, at 14:20, Noel Rappin wrote:
Yep. Here's the before -- it's an example from Aaron Hillegass' book:
- (void)startObservingPerson:(Person *)person
{
[person addObserver:self forKeyPath:@"personName"
options:NSKeyValueObservingOptionOld context:NULL];
[person addObserver:self forKeyPath:@"expectedRaise"
options:NSKeyValueObservingOptionOld context:NULL];
}
And after a ^q within the second method call:
- (void)startObservingPerson:(Person *)person { [person
addObserver:self
forKeyPath:@"personName" options:NSKeyValueObservingOptionOld
context:NULL];
- [person addObserver:self forKeyPath:@"expectedRaise"
options:NSKeyValueObservingOptionOld context:NULL]; }
For what it's worth, I occasionally see the same odd behavior of
repeating the first character of the first line from ^q on paragraphs
in Markdown.
Thanks,
Noel
On 3/11/07, Allan Odgaard throw-away-1@macromates.com wrote:
On 11. Mar 2007, at 04:53, Noel Rappin wrote:
This is quite possibly a very stupid question.
I can see how to use ^q to format a method signature in the
objective
C bundle, but if I try and do the same thing on a method _call_,
I get
an ugly mess. I think I'm not pressing ^q in the right scope to
trigger the method call snippet, but I can't figure out what I'm
doing
wrong. Help?
Can you paste a before/after code example?
--
Noel Rappin
noelrappin@alumni.brandeis.edu
--
Noel Rappin
noelrappin@alumni.brandeis.edu