From kirt.fitzpatrick at gmail.com Mon Apr 9 02:59:59 2007 From: kirt.fitzpatrick at gmail.com (Kirt Fitzpatrick) Date: Sun, 8 Apr 2007 19:59:59 -0700 Subject: [TxMt Plugins] setMark Message-ID: Does OakTextView support the setMark method from the NSResponder interface? Is there something that I can use in its place if setMark is not implemented? Here is the code I am using: NSLog( @"Trying to set the mark on the first responder" ); [responder performSelector: @selector(setMark:) withObject: window]; NSLog( @"set the mark on the first responder" ); And this is what I get in the log: 2007-04-08 19:55:01.838 TextMate[916] Trying to set the mark on the first responder 2007-04-08 19:55:01.838 TextMate[916] *** -[OakTextView setMark:]: selector not recognized [self = 0xdec3850] 2007-04-08 19:55:01.838 TextMate[916] *** -[OakTextView setMark:]: selector not recognized [self = 0xdec3850] thanks kirt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macromates.com/pipermail/textmate-plugins/attachments/20070408/2ac36e1f/attachment.htm From throw-away-1 at macromates.com Mon Apr 9 07:03:05 2007 From: throw-away-1 at macromates.com (Allan Odgaard) Date: Mon, 9 Apr 2007 09:03:05 +0200 Subject: [TxMt Plugins] setMark In-Reply-To: References: Message-ID: On 9. Apr 2007, at 04:59, Kirt Fitzpatrick wrote: > Does OakTextView support the setMark method from the NSResponder > interface? No. > Is there something that I can use in its place if setMark is not > implemented? Depends on what you want to achieve. Bookmarks work almost like marks. From kirt.fitzpatrick at gmail.com Mon Apr 9 15:16:46 2007 From: kirt.fitzpatrick at gmail.com (Kirt Fitzpatrick) Date: Mon, 9 Apr 2007 08:16:46 -0700 Subject: [TxMt Plugins] setMark In-Reply-To: References: Message-ID: There are certain vi functions that do not follow the standard NSResponder template such as moving to the beginning of the line and modifying the selection. I was hoping to use marks to handle visual mode vs command mode. Below you can see how it is used. kirt - (void)deleteRight:(NSNumber *)theIndex { if ( [router mode] == ViVisualMode ) { [responder performSelector: @selector(deleteToMark:) withObject: window]; [router setMode: ViCommandMode]; } else { [responder performSelector: @selector(deleteForward:) withObject: window]; } } - (void)deleteLeft:(NSNumber *)theIndex { if ( [router mode] == ViVisualMode ) { [responder performSelector: @selector(deleteToMark:) withObject: window]; [router setMode: ViCommandMode]; } else { [responder performSelector: @selector(deleteBackward:) withObject: window]; } } - (void)visual:(NSNumber *)theIndex { NSLog( @"Setting visual mode" ); [router setMode:ViVisualMode]; NSLog( @"Trying to set the mark on the first responder" ); [responder performSelector: @selector(setMark:) withObject: window]; NSLog( @"set the mark on the first responder" ); } On 4/9/07, Allan Odgaard wrote: > > On 9. Apr 2007, at 04:59, Kirt Fitzpatrick wrote: > > > Does OakTextView support the setMark method from the NSResponder > > interface? > > No. > > > Is there something that I can use in its place if setMark is not > > implemented? > > Depends on what you want to achieve. Bookmarks work almost like marks. > > _______________________________________________ > textmate-plugins mailing list > textmate-plugins at lists.macromates.com > http://lists.macromates.com/mailman/listinfo/textmate-plugins > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macromates.com/pipermail/textmate-plugins/attachments/20070409/532e94e5/attachment.htm From kirt.fitzpatrick at gmail.com Mon Apr 9 15:33:41 2007 From: kirt.fitzpatrick at gmail.com (Kirt Fitzpatrick) Date: Mon, 9 Apr 2007 08:33:41 -0700 Subject: [TxMt Plugins] setMark In-Reply-To: References: Message-ID: I guess if I could just get something that would allow me to flag a point in the file, and then select to that point multiple times I could achieve everything that I need. kirt On 4/9/07, Kirt Fitzpatrick wrote: > > There are certain vi functions that do not follow the standard NSResponder > template such as moving to the beginning of the line and modifying the > selection. I was hoping to use marks to handle visual mode vs command > mode. Below you can see how it is used. > > kirt > > > - (void)deleteRight:(NSNumber *)theIndex > { > if ( [router mode] == ViVisualMode ) { > [responder performSelector: @selector(deleteToMark:) withObject: > window]; > [router setMode: ViCommandMode]; > } else { > [responder performSelector: @selector(deleteForward:) withObject: > window]; > } > } > > - (void)deleteLeft:(NSNumber *)theIndex > { > if ( [router mode] == ViVisualMode ) { > [responder performSelector: @selector(deleteToMark:) withObject: > window]; > [router setMode: ViCommandMode]; > } else { > [responder performSelector: @selector(deleteBackward:) withObject: > window]; > } > } > > - (void)visual:(NSNumber *)theIndex > { > NSLog( @"Setting visual mode" ); > [router setMode:ViVisualMode]; > NSLog( @"Trying to set the mark on the first responder" ); > [responder performSelector: @selector(setMark:) withObject: window]; > NSLog( @"set the mark on the first responder" ); > } > > > > On 4/9/07, Allan Odgaard wrote: > > > > On 9. Apr 2007, at 04:59, Kirt Fitzpatrick wrote: > > > > > Does OakTextView support the setMark method from the NSResponder > > > interface? > > > > No. > > > > > Is there something that I can use in its place if setMark is not > > > implemented? > > > > Depends on what you want to achieve. Bookmarks work almost like marks. > > > > _______________________________________________ > > textmate-plugins mailing list > > textmate-plugins at lists.macromates.com > > http://lists.macromates.com/mailman/listinfo/textmate-plugins > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macromates.com/pipermail/textmate-plugins/attachments/20070409/775d8d7e/attachment.htm From kirt.fitzpatrick at gmail.com Wed Apr 11 16:38:13 2007 From: kirt.fitzpatrick at gmail.com (Kirt Fitzpatrick) Date: Wed, 11 Apr 2007 09:38:13 -0700 Subject: [TxMt Plugins] setMark In-Reply-To: References: Message-ID: > > Depends on what you want to achieve. Bookmarks work almost like marks. > > > > I'm having trouble finding information about bookmarks. Is this a Cocoa thing or a TextMate specific thing? Can you give me hint about what I should lookup if it is Cocoa or could you give me a two line example of how to set a bookmark and highlight to the bookmark if it is a TextMate thing? Thanks in advance. kirt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macromates.com/pipermail/textmate-plugins/attachments/20070411/5fe60f7e/attachment.htm From throw-away-1 at macromates.com Fri Apr 13 11:32:31 2007 From: throw-away-1 at macromates.com (Allan Odgaard) Date: Fri, 13 Apr 2007 13:32:31 +0200 Subject: [TxMt Plugins] setMark In-Reply-To: References: Message-ID: <52C77CD0-D422-4023-9991-034738D43E9E@macromates.com> On 11. Apr 2007, at 18:38, Kirt Fitzpatrick wrote: >> Depends on what you want to achieve. Bookmarks work almost like >> marks. > > I'm having trouble finding information about bookmarks. Is this a > Cocoa thing or a TextMate specific thing? Can you give me hint > about what I should lookup if it is Cocoa or could you give me a > two line example of how to set a bookmark and highlight to the > bookmark if it is a TextMate thing? Thanks in advance. It’s a TextMate thing -- it’s what you set using ⌘F2. I don’t think this is useful for what you need, sorry. From kirt.fitzpatrick at gmail.com Sat Apr 21 22:05:41 2007 From: kirt.fitzpatrick at gmail.com (Kirt Fitzpatrick) Date: Sat, 21 Apr 2007 15:05:41 -0700 Subject: [TxMt Plugins] Manually specify Selection? Message-ID: Does TextMate implement any method that would allow me to manually specify the selection? Or am I limited to the "moveRightAndModifySelection" types of methods? I'm willing to put up with any amount of complexity to implement this functionality if someone can point me in the right direction. kirt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macromates.com/pipermail/textmate-plugins/attachments/20070421/edefe24f/attachment.htm From throw-away-1 at macromates.com Sun Apr 22 09:41:51 2007 From: throw-away-1 at macromates.com (Allan Odgaard) Date: Sun, 22 Apr 2007 11:41:51 +0200 Subject: [TxMt Plugins] Manually specify Selection? In-Reply-To: References: Message-ID: On 22. Apr 2007, at 00:05, Kirt Fitzpatrick wrote: > Does TextMate implement any method that would allow me to manually > specify the selection? Or am I limited to the > "moveRightAndModifySelection" types of methods? I'm willing to put > up with any amount of complexity to implement this functionality if > someone can point me in the right direction. You’re unfortunately limited to the *AndModifySelection methods.