Пример #1
0
int
operattrul(int f, int n)
{
    opcmd = OPOTHER;
    videoattribute = VAUL | VOWN_OPERS;
    return vile_op(f, n, attributeregion, "Set underline attribute");
}
Пример #2
0
int
operattrrev(int f, int n)
{
    opcmd = OPOTHER;
    videoattribute = VAREV | VOWN_OPERS;
    return vile_op(f, n, attributeregion, "Set reverse attribute");
}
Пример #3
0
int
operattrno(int f, int n)
{
    opcmd = OPOTHER;
    videoattribute = 0;		/* clears no matter who "owns" */
    return vile_op(f, n, attributeregion, "Set normal attribute");
}
Пример #4
0
int
operattrital(int f, int n)
{
    opcmd = OPOTHER;
    videoattribute = VAITAL | VOWN_OPERS;
    return vile_op(f, n, attributeregion, "Set italic attribute");
}
Пример #5
0
int
operattrhc(int f, int n)
{
    opcmd = OPOTHER;
    videoattribute = 0;
    return vile_op(f, n, attributehyperregion, "Set hypertext command");
}
Пример #6
0
int
oper_l_detab(int f, int n)
{
    regionshape = rgn_FULLLINE;
    opcmd = OPOTHER;
    return vile_op(f, n, l_detab_region, "Tabs-->Spaces");
}
Пример #7
0
int
operlist(int f, int n)
{
    regionshape = rgn_FULLLINE;
    opcmd = OPOTHER;
    return vile_op(f, n, llineregion, "Line list");
}
Пример #8
0
int
operpprint(int f, int n)
{
    regionshape = rgn_FULLLINE;
    opcmd = OPOTHER;
    return vile_op(f, n, pplineregion, "Line-number print");
}
Пример #9
0
int
operopenrect(int f, int n)
{
    opcmd = OPOTHER;
    regionshape = rgn_RECTANGLE;
    return vile_op(f, n, openregion, "Opening");
}
Пример #10
0
int
operformat(int f, int n)
{
    regionshape = rgn_FULLLINE;
    opcmd = OPOTHER;
    return vile_op(f, n, formatregion, "Format");
}
Пример #11
0
int
operfilter(int f, int n)
{
    regionshape = rgn_FULLLINE;
    opcmd = OPOTHER;
    return vile_op(f, n, filterregion, "Filter");
}
Пример #12
0
int
opersubstagain(int f, int n)
{
    regionshape = rgn_FULLLINE;
    opcmd = OPOTHER;
    return vile_op(f, n, subst_again_region, "Substitute-again");
}
Пример #13
0
int
opersubst(int f, int n)
{
    regionshape = rgn_FULLLINE;
    opcmd = OPOTHER;
    return vile_op(f, n, substregion, "Substitute");
}
Пример #14
0
int
operattrbold(int f, int n)
{
    opcmd = OPOTHER;
    videoattribute = VABOLD | VOWN_OPERS;
    return vile_op(f, n, attributeregion, "Set bold attribute");
}
Пример #15
0
int
operentab(int f, int n)
{
    regionshape = rgn_FULLLINE;
    opcmd = OPOTHER;
    return vile_op(f, n, entab_region, "Spaces-->Tabs");
}
Пример #16
0
int
operyank(int f, int n)
{
    MARK savedot;
    REGION region;
    int s;

    savedot = DOT;
    opcmd = OPDEL;
    wantregion = &region;
    s = vile_op(f, n, yankregion, "Yank");
    wantregion = 0;
    /*
     * If the associated motion was to the left, or up, we want to set DOT to
     * the beginning of the region, to match vi's behavior.  Otherwise leave
     * DOT where it is.
     */
    if (s == TRUE && b_val(curbp, MDYANKMOTION)) {
	if (line_no(curbp, post_op_dot.l) != 0
	    && line_no(curbp, post_op_dot.l) < line_no(curbp, savedot.l)) {
	    savedot = post_op_dot;
	} else if (!samepoint(region.r_orig, region.r_end)) {
	    if (sameline(region.r_orig, savedot)
		&& sameline(region.r_end, savedot)
		&& region.r_orig.o < savedot.o) {
		savedot = region.r_orig;
	    }
	}
    }
    DOT = savedot;
    return s;
}
Пример #17
0
int
opernumber(int f, int n)
{
    regionshape = rgn_FULLLINE;
    opcmd = OPOTHER;
    return vile_op(f, n, nlineregion, "Numbered list");
}
Пример #18
0
int
opertrim(int f, int n)
{
    regionshape = rgn_FULLLINE;
    opcmd = OPOTHER;
    return vile_op(f, n, trim_region, "Trim whitespace");
}
Пример #19
0
int
operattrdirect(int f, int n)
{
    opcmd = OPOTHER;
    videoattribute = 0;
    return vile_op(f, n, attribute_directly,
		   "Attribute directly with internal filter");
}
Пример #20
0
int
operattrfilter(int f, int n)
{
    opcmd = OPOTHER;
    videoattribute = 0;
    return vile_op(f, n, attribute_from_filter,
		   "Attribute ^A sequences from filter");
}
Пример #21
0
int
operattrcaseq(int f, int n)
{
    opcmd = OPOTHER;
    videoattribute = 0;
    return vile_op(f, n, attribute_cntl_a_sequences,
		   "Attribute ^A sequences");
}
Пример #22
0
/*
 * The shift commands are special, because vi allows an implicit repeat-count
 * to be specified by repeating the '<' or '>' operators.
 */
static int
shift_n_times(int f, int n, OpsFunc func, const char *msg)
{
    register int status = FALSE;

    regionshape = rgn_FULLLINE;
    opcmd = OPOTHER;

    if (havemotion != NULL) {
	const CMDFUNC *cfp = havemotion;
	while (n-- > 0) {
	    havemotion = cfp;
	    if ((status = vile_op(FALSE, 1, func, msg)) != TRUE)
		break;
	}
    } else
	status = vile_op(f, n, func, msg);
    return status;
}
Пример #23
0
int
operselect(int f, int n)
{
    int status;
    opcmd = OPOTHER;
    doingopselect = TRUE;
    status = vile_op(f, n, selectregion, "Select");
    doingopselect = FALSE;
    return status;
}
Пример #24
0
int
operchg(int f, int n)
{
    int s;

    opcmd = OPOTHER;
    s = vile_op(f, n, chgreg, "Change");
    if (s == TRUE)
	swapmark();
    return s;
}
Пример #25
0
int
operlinechg(int f, int n)
{
    int s;

    regionshape = rgn_FULLLINE;
    opcmd = OPOTHER;
    s = vile_op(f, n, chgreg, "Change of full lines");
    if (s == TRUE)
	swapmark();
    return s;
}
Пример #26
0
int
operlineyank(int f, int n)
{
    MARK savedot;
    int s;
    savedot = DOT;
    regionshape = rgn_FULLLINE;
    opcmd = OPOTHER;
    s = vile_op(f, n, yankregion, "Yank of full lines");
    DOT = savedot;
    return s;
}
Пример #27
0
int
operdel(int f, int n)
{
    int status;

    opcmd = OPDEL;
    lines_deleted = 0;
    status = vile_op(f, n, killregion,
		     ((regionshape == rgn_FULLLINE)
		      ? "Delete of full lines"
		      : "Delete"));
    if (do_report(lines_deleted))
	mlforce("[%d lines deleted]", lines_deleted);
    return status;
}
Пример #28
0
int
operwrite(int f, int n)
{
    register int s;
    char fname[NFILEN];

    if (ukb != 0) {
	if ((s = mlreply_file("Write to file: ", (TBUFF **) 0,
			      FILEC_WRITE | FILEC_PROMPT, fname)) != TRUE)
	    return s;
	return kwrite(fname, TRUE);
    } else {
	opcmd = OPOTHER;
	return vile_op(f, n, writeregion, "File write");
    }
}
Пример #29
0
int
operlower(int f, int n)
{
    opcmd = OPOTHER;
    return vile_op(f, n, lowerregion, "Lower case");
}
Пример #30
0
int
operblank(int f, int n)
{
    opcmd = OPOTHER;
    return vile_op(f, n, blank_region, "Blanking");
}