示例#1
0
文件: select.c 项目: ricksladkey/vile
int
operattrul(int f, int n)
{
    opcmd = OPOTHER;
    videoattribute = VAUL | VOWN_OPERS;
    return vile_op(f, n, attributeregion, "Set underline attribute");
}
示例#2
0
文件: select.c 项目: ricksladkey/vile
int
operattrrev(int f, int n)
{
    opcmd = OPOTHER;
    videoattribute = VAREV | VOWN_OPERS;
    return vile_op(f, n, attributeregion, "Set reverse attribute");
}
示例#3
0
文件: select.c 项目: ricksladkey/vile
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
文件: select.c 项目: ricksladkey/vile
int
operattrital(int f, int n)
{
    opcmd = OPOTHER;
    videoattribute = VAITAL | VOWN_OPERS;
    return vile_op(f, n, attributeregion, "Set italic attribute");
}
示例#5
0
文件: select.c 项目: ricksladkey/vile
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
文件: select.c 项目: ricksladkey/vile
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
文件: select.c 项目: ricksladkey/vile
int
operattrdirect(int f, int n)
{
    opcmd = OPOTHER;
    videoattribute = 0;
    return vile_op(f, n, attribute_directly,
		   "Attribute directly with internal filter");
}
示例#20
0
文件: select.c 项目: ricksladkey/vile
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
文件: select.c 项目: ricksladkey/vile
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
文件: select.c 项目: ricksladkey/vile
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");
}