Macro usage for extending selections

  • Nobody/Anonymous

    I use joe as my text editor under MacOS X and on Linux (via ssh from MacOS X) at work.  I also use QuicKeys, so I remap keys in order to make them work the way they would in a gui text editor.  For example, I have ^A mapped to Cmd-left arrow, so I can shoot to the beginning of a line the way that I do in other programs.

    I have been trying to create a macro that will create a selection (i.e., ^KB ^KK block) if there is no current selection one, and then extend the selection to the left or right.  I would then assign this operation to some obscure meta-key, and use QuicKeys to map Shift-left arrow and shit right arrow to those keys.

    Right now, I have 3 macros.  The first starts and ends a block at the current cursor point.  The second and third extend that block to the left and right by one space.  These Macros are as follows:

    :def startBlock markb,markk
    :def extMarkLeft tomarkk,markk,tomarkb,ltarw,swap,ltarw
    :def extMarkRight tomarkb,markb,tomarkk,rtarw,markk

    (I have others that extend up, down, to bol, to eol, word left, and word right, but you get the basic idea.)

    So I've mapped startBlock to meta-space, which I hit before I do any selection extending.

    And now for my question:  How can I avoid using startBlock?

    Also, if there is no way, I'd like to request a feature that will allow for extMarkLeft and extMarkRight to work without a startBlock type macro?

    Lastly, I'm glad you've picked up work on this editor.  I can't wait until it has syntax coloring!

    • Nobody/Anonymous

      If you want to extend selections with key strokes, then just use Emacs or XEmacs with the PC module!  Use your .emacs (or .xemacs/init.el) file to remap the extend selection functions to whatever you want.  And Xemacs will even give you Syntax highlighting in tty mode right now.  Don't bother messing around with some puny editer whose authors ignore decent suggestions.

      P.S., all they'd have to do allow macros to extend selectios would be to allow for macros to continue executing camands even when  one of the commands fails to execute.  But do you think they will implement this?  I don't!

      • Nobody/Anonymous

        I've used joe for almost three years, and I would love to switch to emacs (or vim) to take advantage of syntax highlighting (the only big feature JOE lacks).  Is there a config file for either of these editors that maps the keys to be like JOE?

    • Marek Grac

      Marek Grac - 2002-05-27

      I'm sorry that it took me so much time to answer. Right now I have not enough time to do some serious programming but I believe that those times are coming :) I'm not good at macros so I can't help you with this problem.

      I believe that in July, I will be able to redesign joe a bit. And changes like these will be easily integrated. Right now is quite difficult to implement such change.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks