feature suggestions

2007-05-10
2013-05-02
  • Thanks joe editor, it's another choice for my fav fte editor
    here is some suggestions maybe over looking I'm missing
    1. QuitAll -- close All if 2 more files in window
    2. restore_session -- joe already have rc restore for file and cursor how about Desktop session if no args in joe just restore_session
    3. Global bookmark
    4. tags back -- maybe global bookmark is ready easy to done for tagback
    5. handle duplicate tags
    6. route list (joe already have function name on status line how about make it as route list buffer)

    Thanks
    --Lechee

    minor patch for search next/prev word
    diff -ur joe-3.5/cmd.c joe-3.5.1/cmd.c
    --- joe-3.5/cmd.c    2006-07-19 08:19:03.000000000 +0800
    +++ joe-3.5.1/cmd.c    2007-05-10 08:54:03.000000000 +0800
    @@ -116,7 +116,8 @@
         {USTR "macros", TYPETW + EFIXXCOL, umacros, NULL, 0, NULL},
         {USTR "debug_joe", TYPETW + EFIXXCOL, udebug_joe, NULL, 0, NULL},
         {USTR "markb", TYPETW + TYPEPW, umarkb, NULL, 0, NULL},
    -    {USTR "markk", TYPETW + TYPEPW, umarkk, NULL, 0, NULL},
    +        {USTR "markk", TYPETW + TYPEPW, umarkk, NULL, 0, NULL},
    +        {USTR "marks", TYPETW + TYPEPW, umarks, NULL, 0, NULL},
         {USTR "markl", TYPETW + TYPEPW, umarkl, NULL, 0, NULL},
         {USTR "math", TYPETW + TYPEPW, umath, NULL, 0, NULL},
         {USTR "mode", TYPETW + TYPEPW + TYPEQW, umode, NULL, 0, NULL},
    @@ -198,7 +199,9 @@
         {USTR "upper", TYPETW + TYPEPW + EMOD + EBLOCK, uupper, NULL, 0, NULL},
         {USTR "upslide", TYPETW + TYPEPW + TYPEMENU + TYPEQW + EMOVE, uupslide, NULL, 1, USTR "dnslide"},
         {USTR "upslidemenu", TYPEMENU, umscrup, NULL, 1, USTR "dnslidemenu"},
    -    {USTR "xtmouse", TYPETW+TYPEPW+TYPEMENU+TYPEQW, uxtmouse, 0, 0, 0 },
    +        {USTR "wnext", TYPETW + TYPEPW, pwnext, NULL, 1, NULL},
    +    {USTR "wprev", TYPETW + TYPEPW, pwprev, NULL, 1, NULL},
    +        {USTR "xtmouse", TYPETW+TYPEPW+TYPEMENU+TYPEQW, uxtmouse, 0, 0, 0 },
         {USTR "yank", TYPETW + TYPEPW + EFIXXCOL + EMOD, uyank, NULL, 1, NULL},
         {USTR "yapp", TYPETW + TYPEPW + EKILL, uyapp, NULL, 0, NULL},
         {USTR "yankpop", TYPETW + TYPEPW + EFIXXCOL + EMOD, uyankpop, NULL, 1, NULL}
    @@ -537,6 +540,10 @@
         MACRO *mac;
         int ret = -1;

    +        if (strlen(s)==0) {
    +            msgnw(bw->parent,joe_gettext(_("Cancel!")));
    +            return 0;
    +        }
         mac = mparse(NULL, s, &ret);
         if (ret < 0) {
             msgnw(bw->parent,joe_gettext(_("No such command")));
    diff -ur joe-3.5/LIST joe-3.5.1/LIST
    --- joe-3.5/LIST    2006-06-02 01:56:09.000000000 +0800
    +++ joe-3.5.1/LIST    2007-05-09 09:00:34.000000000 +0800
    @@ -249,6 +249,8 @@
    qrepl        Search and replace
    rfirst        Search backwards for text
    rsrch        Reverse incremental search
    +wnext           Find next word
    +pnext        Find pervios word

    Windows
    -------
    diff -ur joe-3.5/ublock.c joe-3.5.1/ublock.c
    --- joe-3.5/ublock.c    2006-07-19 08:18:57.000000000 +0800
    +++ joe-3.5.1/ublock.c    2007-05-09 14:46:48.000000000 +0800
    @@ -17,8 +17,8 @@

    int square = 0;            /* Set for rectangle mode */
    int lightoff = 0;        /* Set if highlighting should turn off
    -
                        after block operations */
    +int mark_stats = 0;             /* set for markb is start */
    /* Global variables */

    P *markb = NULL;        /* Beginning and end of block */
    @@ -233,10 +233,25 @@
    {
         pdupown(bw->cursor, &markb, USTR "umarkb");
         markb->xcol = bw->cursor->xcol;
    -    updall();
    +        updall();
    +        mark_stats = 1;
         return 0;
    }

    +/* lecmd mark lines same as umarkb+umarkk joe */
    +int umarks(BW *bw)
    +{
    +    if (mark_stats == 0) {
    +        pdupown(bw->cursor, &markb, USTR "umarks");
    +        mark_stats = 1;
    +    } else {
    +        pdupown(bw->cursor, &markk, USTR "umarks");
    +    }
    +    markb->xcol = bw->cursor->xcol;
    +    updall();
    +    return 0;
    +}
    +
    int udrop(BW *bw)
    {
         prm(markk);
    @@ -275,6 +290,7 @@

    int utoggle_marking(BW *bw)
    {
    +    mark_stats = 0;
         if (markv(0) && bw->cursor->b==markb->b && bw->cursor->byte>=markb->byte && bw->cursor->byte<=markk->byte) {
             /* Just clear selection */
             prm(markb); markb=0;
    @@ -324,7 +340,8 @@
    {
         pdupown(bw->cursor, &markk, USTR "umarkk");
         markk->xcol = bw->cursor->xcol;
    -    updall();
    +        updall();
    +        mark_stats = 0;
         return 0;
    }

    diff -ur joe-3.5/ublock.h joe-3.5.1/ublock.h
    --- joe-3.5/ublock.h    2006-05-22 21:33:09.000000000 +0800
    +++ joe-3.5.1/ublock.h    2007-05-09 14:28:45.000000000 +0800
    @@ -20,6 +20,7 @@
    int markv PARAMS((int r));
    int umarkb PARAMS((BW *bw));
    int umarkk PARAMS((BW *bw));
    +int umarks PARAMS((BW *bw));
    int uswap PARAMS((BW *bw));
    int umarkl PARAMS((BW *bw));
    int utomarkb PARAMS((BW *bw));
    diff -ur joe-3.5/ufile.c joe-3.5.1/ufile.c
    --- joe-3.5/ufile.c    2006-07-19 08:18:56.000000000 +0800
    +++ joe-3.5.1/ufile.c    2007-05-10 09:32:15.000000000 +0800
    @@ -1082,6 +1083,48 @@
         }
    }

    +/* lecmd search next word joe */
    +int pwnext(BW *bw)
    +{
    +    if (!globalsrch) {    /* Query for search string if there isn't any */
    +        return pffirst(bw);
    +    } else {
    +        SRCH *srch = globalsrch;
    +
    +        globalsrch = 0;
    +        srch->addr = bw->cursor->byte;
    +        if (!srch->wrap_p || srch->wrap_p->b!=bw->b) {
    +            prm(srch->wrap_p);
    +            srch->wrap_p = pdup(bw->cursor, USTR "pwnext");
    +            srch->wrap_p->owner = &srch->wrap_p;
    +            srch->wrap_flag = 0;
    +                }
    +                srch->backwards = 0;
    +        return dopfnext(bw, setmark(srch), NULL);
    +    }
    +}
    +
    +/* lecmd search previous word joe */
    +int pwprev(BW *bw)
    +{
    +    if (!globalsrch) {    /* Query for search string if there isn't any */
    +        return pffirst(bw);
    +    } else {
    +        SRCH *srch = globalsrch;
    +
    +        globalsrch = 0;
    +        srch->addr = bw->cursor->byte;
    +        if (!srch->wrap_p || srch->wrap_p->b!=bw->b) {
    +            prm(srch->wrap_p);
    +            srch->wrap_p = pdup(bw->cursor, USTR "pwprev");
    +            srch->wrap_p->owner = &srch->wrap_p;
    +            srch->wrap_flag = 0;
    +        }
    +                srch->backwards = 1;
    +                return dopfnext(bw, setmark(srch), NULL);
    +    }
    +}
    +
    void save_srch(FILE *f)
    {
         if(globalsrch) {
    diff -ur joe-3.5/usearch.h joe-3.5.1/usearch.h
    --- joe-3.5/usearch.h    2006-06-06 02:26:55.000000000 +0800
    +++ joe-3.5.1/usearch.h    2007-05-09 07:52:26.000000000 +0800
    @@ -49,6 +49,8 @@

    int pffirst PARAMS((BW *bw));
    int pfnext PARAMS((BW *bw));
    +int pwnext PARAMS((BW *bw));
    +int pwprev PARAMS((BW *bw));

    int pqrepl PARAMS((BW *bw));
    int prfirst PARAMS((BW *bw));