- Subject: Re: jed problem with column block (set_mark_cmd)
- From: "G. Milde" <g.milde@xxxxxx>
- Date: Tue, 26 Sep 2006 15:46:36 +0200
On 26.09.06, Lechee.Lai@xxxxxxxxxxxx wrote:
> Hi,
>
> How can I do rectangle block via ??set_mark_cmd()?? for this case
1. You cannot. The mark doesnot know how you are going to use the block.
The *_rect functions will work on the rectangle defined by point and mark.
2. To mark a rectangle containing all of
xxxxxxxxxxx
xxx
xxxxx
xxxxxxxx
xx
you need to insert whitespace at the last line.
A function like the attached goto_max_column might help.
It is available under jedmodes.sf.net/mode/csvutils/
Günter
%!%+
%\function{goto_max_column}
%\synopsis{Goto the maximal column of the buffer (or region)}
%\usage{goto_max_column()}
%\description
% Goto the column of the longest line of the buffer (or, if visible, region).
% Insert whitespace if needed. The region stays marked.
%
% If the optional parameter \var{trim} is nonzero, trailing
% whitespace will be removed during the scan.
%\notes
% This function comes handy, if you want to mark a rectagle but
% the last line is shorter than preceding lines.
%\seealso{max_column, goto_column, copy_rect}
%!%-
public define goto_max_column()
{
variable trim = push_defaults(0, _NARGS);
if (is_visible_mark)
{ % duplicate visible mark
push_spot();
pop_mark_1();
loop (2)
push_visible_mark();
pop_spot();
}
goto_column(max_column(trim));
}
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2006 date index]
[2006 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]