[TxMt] Re: Hacking VIM into TM2
hans.stimer at gmail.com
Sat Aug 11 16:35:40 UTC 2012
Please ignore the prior email, it isn't finished. Apparently command-return in Sparrow sends an email as opposed to opening a new line. Sigh.
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Saturday, August 11, 2012 at 9:32 AM, Hans Stimer wrote:
> 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.
> Desired behavior
> 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:
> Character movement:
> k or up arrow - up
> j or down arrow - down
> h or left arrow - left
> l or right arrow - right
> Word movement:
> 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)
> Hans Stimer
> Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the textmate