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> &lt;<a href="mailto:kirt.fitzpatrick@gmail.com">kirt.fitzpatrick@gmail.com</a>&gt; 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.&nbsp; I was hoping to use marks to handle visual mode vs command mode.&nbsp; Below you can see how it is used.
<br><br>kirt<br><br><br>- (void)deleteRight:(NSNumber *)theIndex<br>{<br>&nbsp;&nbsp;&nbsp; if ( [router mode] == ViVisualMode ) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [responder performSelector: @selector(deleteToMark:) withObject: window];<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [router setMode: ViCommandMode];
<br>&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [responder performSelector: @selector(deleteForward:) withObject: window];<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br>- (void)deleteLeft:(NSNumber *)theIndex<br>{<br>&nbsp;&nbsp;&nbsp; if ( [router mode] == ViVisualMode ) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [responder performSelector: @selector(deleteToMark:) withObject: window];
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [router setMode: ViCommandMode];<br>&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [responder performSelector: @selector(deleteBackward:) withObject: window];<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br>- (void)visual:(NSNumber *)theIndex<br>{<br>&nbsp;&nbsp;&nbsp; NSLog( @&quot;Setting visual mode&quot; );
<br>&nbsp;&nbsp;&nbsp; [router setMode:ViVisualMode];<span class="q"><br>&nbsp;&nbsp;&nbsp; NSLog( @&quot;Trying to set the mark on the first responder&quot; );<br>&nbsp;&nbsp;&nbsp; [responder performSelector: @selector(setMark:) withObject: window];<br>&nbsp;&nbsp;&nbsp; NSLog( @&quot;set the mark on the first responder&quot; );
<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> &lt;<a href="mailto:throw-away-1@macromates.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
throw-away-1@macromates.com</a>&gt; 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>&gt; Does OakTextView support the setMark method from the NSResponder<br>&gt; interface?<br><br>No.<br><br>&gt; Is there something that I can use in its place if setMark is not
<br>&gt; 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>