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.<br><br>kirt<br><br><br><div><span class="gmail_quote">
On 4/9/07, <b class="gmail_sendername">Kirt Fitzpatrick</b> <<a href="mailto:kirt.fitzpatrick@gmail.com">kirt.fitzpatrick@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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.
<br><br>kirt<br><br><br>- (void)deleteRight:(NSNumber *)theIndex<br>{<br> if ( [router mode] == ViVisualMode ) {<br> [responder performSelector: @selector(deleteToMark:) withObject: window];<br> [router setMode: ViCommandMode];
<br> } else {<br> [responder performSelector: @selector(deleteForward:) withObject: window];<br> }<br>}<br><br>- (void)deleteLeft:(NSNumber *)theIndex<br>{<br> if ( [router mode] == ViVisualMode ) {<br> [responder performSelector: @selector(deleteToMark:) withObject: window];
<br> [router setMode: ViCommandMode];<br> } else {<br> [responder performSelector: @selector(deleteBackward:) withObject: window];<br> }<br>}<br><br>- (void)visual:(NSNumber *)theIndex<br>{<br> NSLog( @"Setting visual mode" );
<br> [router setMode:ViVisualMode];<span class="q"><br> NSLog( @"Trying to set the mark on the first responder" );<br> [responder performSelector: @selector(setMark:) withObject: window];<br> NSLog( @"set the mark on the first responder" );
<br>}<br><br><br><br></span><div><span class="e" id="q_111d6eb22d343f8b_2"><div><span class="gmail_quote">On 4/9/07, <b class="gmail_sendername">Allan Odgaard</b> <<a href="mailto:throw-away-1@macromates.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
throw-away-1@macromates.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 9. Apr 2007, at 04:59, Kirt Fitzpatrick wrote:<br><br>> Does OakTextView support the setMark method from the NSResponder<br>> interface?<br><br>No.<br><br>> Is there something that I can use in its place if setMark is not
<br>> implemented?<br><br>Depends on what you want to achieve. Bookmarks work almost like marks.<br><br>_______________________________________________<br>textmate-plugins mailing list<br><a href="mailto:textmate-plugins@lists.macromates.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
textmate-plugins@lists.macromates.com</a><br><a href="http://lists.macromates.com/mailman/listinfo/textmate-plugins" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.macromates.com/mailman/listinfo/textmate-plugins
</a><br></blockquote></div><br>
</span></div></blockquote></div><br>