Thanks for the reply, Rick.

This notion that TextMate is modeless whereas VI is modal seems to be popular in this forum, but, alas, is factually wrong.  Both editors exhibit modal behavior; indeed the modal behavior in both editors is a powerful tool to get the most expressiveness from the limited number of keys on the keyboard.

In both editors, keystrokes can bring about a state change in which the meaning of one or more keys changes.  In VI, the state defaults to a "command" state upon start-up, and the user switches between a command state and an insert state.

A similar state change occurs in TextMate: the user enters a command word, then clicks tab.  If the command word is found in the assigned bundle, then the tab key no longer inserts tabs but is used to position the text cursor according to the keyword's associated behavior.  This state persists until some entry signals TextMate to "flip" back to insert mode.

I love my new MacBook Pro, but the cursor keys are half sized and located in a non-standard way.  For this reason, additional key mappings would seem to be a natural for TextMate for those users who would benefit from it.  In order that the user experience matc expectations, this new behavior would be, by default, turned off.

If anyone has any ideas about the best way to implement this, I would be very grateful for them. 

On Tue, Apr 7, 2009 at 2:18 PM, Rick DeNatale <rick.denatale@gmail.com> wrote:
On Tue, Apr 7, 2009 at 2:52 PM, Scott Smith <scottnelsonsmith@gmail.com> wrote:
I'm newly coming back to the Mac after a long hiatus (late 1980's as a developer); been Windows in the interim.

I still have to work periodically in Windows boxes and am somewhat forlorn at the layout of the navigation keys on the Mac (as in most laptops).  This is where VI shines; the navigation can be accomplished in the "center" of the keyboard where key layouts are consistent.  David Wooten maps a single key (http://lists.macromates.com/textmate/2006-January/007683.html) and Kirk Fitzpatrick was attempting a plugin (http://lists.macromates.com/textmate-plugins/2007-January/000022.html).

Anyone figure out anything like what VI has or have any ideas?  I'm considering building something that intercepts keystrokes right out of the operating system so that TextMate has to know very little.

Thanks in advance,
--
Scott Smith - Old Fart Developer

While I can appreciate your desires, I'm not sure how this will work in practice.

VI maps navigation keys to letter keys because it is modal, you are either in text mode or non-text mode.

Textmate is modeless, and in that sense it's much more like Emacs than VI.

If you really prefer the VI way there are nice OS X/Cocoa variants of VIM.

And I'm REALLY not trying to start an editor war.

--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale


_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate




--
Scott Smith

With privilege comes responsibility,
with responsibility comes accountability,
with accountability comes honesty,
with honesty comes faithfulness.