Loading ...
Sorry, an error occurred while loading the content.

30511startreplace

Expand Messages
  • Charles E. Campbell
    Nov 27, 2002
    • 0 Attachment
      Hello!

      Just as there's a ":startinsert" command, I figured there oughta be a
      ":startreplace" command. Forthwith, here's a patch which implements
      ":startreplace":

      Regards,
      Chip Campbell

      --SNIP----SNIP----SNIP----SNIP----SNIP----SNIP----SNIP----SNIP-------
      *** src/o_ex_cmds.h Wed Nov 27 10:06:00 2002
      --- src/ex_cmds.h Wed Nov 27 10:06:29 2002
      ***************
      *** 712,717 ****
      --- 712,719 ----
      RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR),
      EX(CMD_startinsert, "startinsert", ex_startinsert,
      BANG|TRLBAR|CMDWIN),
      + EX(CMD_startreplace, "startreplace", ex_startreplace,
      + BANG|TRLBAR|CMDWIN),
      EX(CMD_stjump, "stjump", ex_stag,
      BANG|TRLBAR|WORD1),
      EX(CMD_stselect, "stselect", ex_stag,
      *** src/o_ex_docmd.c Wed Nov 27 10:04:56 2002
      --- src/ex_docmd.c Wed Nov 27 10:26:41 2002
      ***************
      *** 277,287 ****
      --- 277,289 ----
      #ifdef FEAT_EX_EXTRA
      static void ex_normal __ARGS((exarg_T *eap));
      static void ex_startinsert __ARGS((exarg_T *eap));
      + static void ex_startreplace __ARGS((exarg_T *eap));
      #else
      # define ex_normal ex_ni
      # define ex_align ex_ni
      # define ex_retab ex_ni
      # define ex_startinsert ex_ni
      + # define ex_startreplace ex_ni
      # define ex_helptags ex_ni
      #endif
      #ifdef FEAT_FIND_ID
      ***************
      *** 7051,7056 ****
      --- 7053,7074 ----
      }
      else
      restart_edit = 'i';
      + }
      +
      + /*
      + * ":startreplace"
      + */
      + static void
      + ex_startreplace(eap)
      + exarg_T *eap;
      + {
      + if (eap->forceit)
      + {
      + coladvance((colnr_T)MAXCOL);
      + curwin->w_curswant = MAXCOL;
      + curwin->w_set_curswant = FALSE;
      + }
      + restart_edit = 'R';
      }
      #endif

      --SNIP----SNIP----SNIP----SNIP----SNIP----SNIP----SNIP----SNIP-------

      --
      Charles E Campbell, Jr, PhD _ __ __
      Goddard Space Flight Center / /_/\_\_/ /
      cec@... /_/ \/_//_/
      PGP public key: http://www.erols.com/astronaut/pgp.html
    • Show all 2 messages in this topic