[TxMt] Hacking VIM into TM2
hans.stimer at gmail.com
Sat Aug 11 16:32:21 UTC 2012
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.
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.
Entering Vim Command Mode
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.
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.
Vim Command Mode
I envision a basic set of Vim motion and selection commands:
k or up arrow - up
j or down arrow - down
h or left arrow - left
l or right arrow - right
e - to end of word as defined by current syntax (this is different from standard VIM behavior and should be reconsidered)
E - to end of a whitespace-delimited word
b - to beginning of word as defined by current syntax (this is different from standard VIM behavior and should be reconsidered)
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the textmate