At 12:55 -0400 28/07/2011, Tim Gray wrote:

Of course, the whole thing about a modal editor like Vim is that you don't have to do all kinds of crazy key combos like command-control-key to run your command.

But you do need to change mode, which requires some action on your part other than simple thought-transference.

I'm sure you could write a ton of applescripts to semi simulate the 'in' and 'around' motions that act on logical text units, but the long and short of it is that if it's not a modal editor, you can't string simple single letter commands together like you can in a modal editor.

First of all it is not necessary to have a 'ton' of AppleScript scripts but only one and that might begin like this:

    set _dlog to display dialog "Type your command" default answer ""
    set _command to text returned of _dlog

and be activated by a simple non-crazy keystroke equivalent to whatever you do to change mode in vi.

It would then act on _command to perform the required actions using either AppleScript or Perl. In addition to all your finger-memory commands you would be able to add whatever extra magic you wanted. The proportion of AppleScript proper in the script would be minimal. _command can be passed to a Perl or Python etc. routine or whatever is most suitable. I can understand anyone who is averse to learning AppleScript but the fact is that Apple events serve as a very useful conduit and people who ignore them are missing much of the power of the Mac, which is not simply UNIX with a pretty face.

JD



--
You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to