jed-users mailing list

[2002 Date Index] [2002 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

idemark.sl


Hi,

I made a few changes to Guenter Milde's cuamark.sl
and got the following idemark.sl which implements
a proper IDE version of the Windows style of marking.



Jørgen


%%---------------------------------------------------------
% idemark.sl
% jl 27.06.2002
%

% Implements IDE/Windows style of marking

% Author: Jørgen Larsen (jl@xxxxxxxxxxxx),
% much inspired by Guenter Milde's cuamark.sl
%
%
% Holding down Shift key and using navigation keys defines a region
% Arrow keys without Shift undefine such a region
%
% Shift-<Del> cuts the region and copies it to *ide_clipboard* (as also ^KY in IDE)
% Shift-<Ins> inserts *ide_clipboard* (as also ^KC in IDE)
% Ctrl-<Ins> copies the region
% Ctrl-<Del> deletes the region
%
%
%

require ("keydefs");

static variable IdeMark = 0;

define idemark_set_mark ()
{
   !if (markp ())
     {
        ide_begin_block ();
        IdeMark = 1;
     }
}


define idemark_unset_mark ()
{
   if (IdeMark)
     {
        pop_mark (0);
        IdeMark = 0;
     }
}



setkey ("idemark_set_mark; ide_previous_line_cmd",  Key_Shift_Up);
setkey ("idemark_set_mark; ide_next_line_cmd",      Key_Shift_Down);
setkey ("idemark_set_mark; ide_previous_char_cmd",  Key_Shift_Left);
setkey ("idemark_set_mark; ide_next_char_cmd",      Key_Shift_Right);
setkey ("idemark_set_mark; ide_page_up",            Key_Shift_PgUp);
setkey ("idemark_set_mark; ide_page_down",          Key_Shift_PgDn);
setkey ("idemark_set_mark; ide_bol",                Key_Shift_Home);
setkey ("idemark_set_mark; ide_eol",                Key_Shift_End);

setkey ("idemark_unset_mark; ide_previous_line_cmd",Key_Up);
setkey ("idemark_unset_mark; ide_next_line_cmd",    Key_Down);
setkey ("idemark_unset_mark; ide_previous_char_cmd",Key_Left);
setkey ("idemark_unset_mark; ide_next_char_cmd",    Key_Right);
setkey ("idemark_unset_mark; ide_page_up",          Key_PgUp);
setkey ("idemark_unset_mark; ide_page_down",        Key_PgDn);
setkey ("idemark_unset_mark; ide_bol",              Key_Home);
setkey ("idemark_unset_mark; ide_eol",              Key_End);

setkey ("ide_copy_block",   Key_Shift_Ins); % same as ^KC
setkey ("ide_delete_block", Key_Shift_Del); % same as ^KY

setkey ("ide_clear_block",  Key_Ctrl_Ins);  % same as ^KH
setkey ("del_region",       Key_Ctrl_Del);

provide ("idemark");

%%--------------------------------------------------------


--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2002 date index] [2002 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]