<div>
                    I'm looking for advice on the best way to hack minimal VIM support into TM2. I'm not looking to support all of VIM, but just a subset of what is known as Command Mode. 
                </div><div><br></div><div>Desired behavior</div><div>---</div><div>Until Vim Command Mode is activated, TM2 should behave as normal. Once activated, all the <meta>*-<key> combinations will continue to work as normal TM2 commands, but non-meta key combinations will be interpreted as VIM commands. </div><div><br></div><div>Entering Vim Command Mode</div><div>---</div><div>Traditionally, Vim command mode is entered via hitting the escape key.  Since most people won't want this feature, there needs to be a toggle that enables the Vim behavior so that the escape key would work. This prevents existing TM2 escape behavior changing for those who don't want the optional Vim behavior.</div><div><br></div><div>Additionally, it is not uncommon for VIM users to remap the Vim Command Mode entry trigger to something like "jj". This should be supported so that users can optionally have escape key can retain it's traditional TM2 use.</div><div><br></div><div>Vim Command Mode</div><div>---</div><div>I envision a basic set of Vim motion and selection commands:</div><div>Character movement:</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>k or up arrow - up</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>j or down arrow - down</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>h or left arrow - left</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>l or right arrow - right</div><div>Word movement:</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>e - to end of word as defined by current syntax (this is different from standard VIM behavior and should be reconsidered)</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>E - to end of a whitespace-delimited word</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>b -  to beginning of word as defined by current syntax (this is different from standard VIM behavior and should be reconsidered) </div><div><span class="Apple-tab-span" style="white-space:pre">        </span></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>