2

How to search current word in elvis editor? just like * and # in vim. In slackware vi is elvis.

3
  • 1
    That's a control-A Nov 21, 2019 at 1:32
  • Ctrl-A works for me, thanks a lot.
    – jaloo
    Nov 23, 2019 at 0:24
  • If so, you can accept the answer which explains how to find the information: ELVCTRL('A'): is the program's symbol for control-A Nov 23, 2019 at 0:31

1 Answer 1

1

It's probably documented someplace, but reading the source code in search.c, you can see

      case ELVCTRL('A'):
      case ELVG('d'):
      case ELVG('D'):
            /* Free the previous regular expression, if any */
            if (searchre)
            {
                    safefree((void *)searchre);
            }

            /* Compile the regexp /\<\@\>/ */
            searchre = regcomp(toCHAR("\\<\\@\\>"), win->cursor);
            if (!searchre)
                    return RESULT_ERROR;

and in regexp.c the meaning of \@ is explained as

#define M_ATCURSOR      265             /* internal code for \@ */

            else if (token == M_ATCURSOR)
            { 
                    tmpb = *cursor;
                    tmp = wordatcursor(&tmpb, ElvFalse);

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .