<div style="font-family: Helvetica; font-size: 13px; ">Thanks Alan, I'll start by sticking it into keyDown, and we can change it later so that the code can be moved to a plugin.<br></div>
<div><div><br></div><div>-- </div><div>Hans Stimer</div><div>Sent with <a href="http://www.sparrowmailapp.com/?sig">Sparrow</a></div><div><br></div></div>
<p style="color: #A0A0A8;">On Saturday, August 11, 2012 at 11:29 AM, Allan Odgaard wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div>On Aug 11, 2012, at 7:16 PM, Hans Stimer <<a href="mailto:hans.stimer@gmail.com">hans.stimer@gmail.com</a>> wrote:</div><div><br></div><blockquote type="cite"><div>1) Hard code it right into TM2. It looks like I could start with OakTextView:keydown and branch off to a Vim interpreter if Vim is enabled. I think this is probably the easiest and most flexible approach. </div></blockquote><div><br></div><div>This is how I’d approach it.</div><div><br></div><div>The keyDown is already multiplexing between normal mode, and snippet pop-up menu mode. It might be good to refactor that a bit so we can register event handlers at run-time, that would allow moving the vim code to a plug-in.</div><div><br></div><div>But without knowing exactly what you’d need from TM, easier to just start with hardcoding things in keyDown.</div><div><br></div><blockquote type="cite"><div>2) Create a TM2 plugin/bundle that does most of the work, and modify TM2 just enough to provide the support that such a plugin/bundle would need. This approach worries, me because I'm not sure how much modification TM2 would need to expose all the required interface to the plugin system. Do TM2 plugins work the same as TM1 plugins? Is the TM2 plugin API in flux?</div></blockquote><div><br></div><div>They work the same, and there really isn’t any plug-in API other than the public Cocoa protocols that some of the classes implement, e.g. OakTextView conforms to NSResponder (which I assume have most of the methods you’d need to call from your vim mode).</div><div><br></div><div>P.S. I think it’s better to move discussions about the TM source to <a href="mailto:textmate-dev@lists.macromates.com">textmate-dev@lists.macromates.com</a></div><div><br></div><div><br></div><div><br></div><div>_______________________________________________</div><div>textmate mailing list</div><div><a href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a></div><div><a href="http://lists.macromates.com/listinfo/textmate">http://lists.macromates.com/listinfo/textmate</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>