int viinsertbol(UNUSED(char **args)) { vifirstnonblank(zlenoargs); startvitext(1); return 0; }
int vichangeeol(UNUSED(char **args)) { forekill(findeol() - zlecs, CUT_RAW); startvitext(1); return 0; }
int viaddeol(UNUSED(char **args)) { zlecs = findeol(); startvitext(1); return 0; }
void viaddnext(void) { if (cs != findeol()) cs++; startvitext(1); }
int viaddnext(UNUSED(char **args)) { if (zlecs != findeol()) INCCS(); startvitext(1); return 0; }
void viopenlinebelow(void) { cs = findeol(); spaceinline(1); line[cs++] = '\n'; startvitext(1); }
void viopenlineabove(void) { cs = findbol(); spaceinline(1); line[cs] = '\n'; startvitext(1); }
int viopenlineabove(UNUSED(char **args)) { zlecs = findbol(); spaceinline(1); zleline[zlecs] = '\n'; startvitext(1); clearlist = 1; return 0; }
int viopenlinebelow(UNUSED(char **args)) { zlecs = findeol(); spaceinline(1); zleline[zlecs++] = '\n'; startvitext(1); clearlist = 1; return 0; }
int vichangeeol(UNUSED(char **args)) { int a, b; if (region_active) { regionlines(&a, &b); zlecs = a; region_active = 0; cut(zlecs, b - zlecs, CUT_RAW); shiftchars(zlecs, b - zlecs); } else forekill(findeol() - zlecs, CUT_RAW); startvitext(1); return 0; }
int visubstitute(UNUSED(char **args)) { int n = zmult; startvichange(1); if (n < 0) return 1; /* it is an error to be on the end of line */ if (zlecs == zlell || zleline[zlecs] == '\n') return 1; /* Put argument into the acceptable range -- it is not an error to * * specify a greater count than the number of available characters. */ if (n > findeol() - zlecs) n = findeol() - zlecs; /* do the substitution */ forekill(n, CUT_RAW); startvitext(1); return 0; }
void visubstitute(void) { startvichange(1); if (zmult < 0) { feep(); return; } /* it is an error to be on the end of line */ if (cs == ll || line[cs] == '\n') { feep(); return; } /* Put argument into the acceptable range -- it is not an error to * * specify a greater count than the number of available characters. */ if (zmult > findeol() - cs) zmult = findeol() - cs; /* do the substitution */ forekill(zmult, 0); startvitext(1); }
int vireplace(UNUSED(char **args)) { startvitext(0); return 0; }
void viaddeol(void) { cs = findeol(); startvitext(1); }
void viinsert(void) { startvitext(1); }
void viinsert_init(void) { startvitext(-2); }
int viinsert(UNUSED(char **args)) { startvitext(1); return 0; }
void viinsertbol(void) { vifirstnonblank(); startvitext(1); }
void vireplace(void) { startvitext(0); }
void vichangeeol(void) { forekill(findeol() - cs, 0); startvitext(1); }