#10465

Stefan
Participant

 

2.) GoTo and select to line X

Purpose:
select the lines from start line to line number X.
Where X is a line number you entered to go to.
Tip; Line X can be below or above current line.

2a) EmEditor internal commands:

To select an block:
* set your cursor on the start of the line you want
* press F8 to set “begin of block marker”
* press Ctrl+G and enter the line number to go to
(Tip: press ESC to leave selection mode)

To select whole lines:
* same as above but press Ctrl+F8

To select an rectangular/vertical block:
* set your cursor on the line and column you want
* press Ctrl+Shift+F8 to set “begin of block marker”
* press Ctrl+G and enter the line and column number to go to
(Tip: press ESC to leave selection mode)

Search the help for “F8”:

EmEditor Help – How to – Edit
To Select a Portion of a Document

Click at the beginning of the selection,
move the mouse to the end of the selection while holding
the left mouse button down, and then release the mouse button.

Tips
Alternatively, press arrow keys while pressing the SHIFT key.
Alternatively, press the F8 key, and then press arrow keys.
To select lines, click on the left edge of the window,
or press CTRL + F8.
To select vertically (in a rectangular block), use the
mouse to select while pressing the ALT key,
or press SHIFT+ CTRL + F8.

2b) If you want to use an script for that,
the following code could be an start:

To select an block:
* set your cursor on the line you want
* execute this script and enter the line number to go to

o = document.selection;
yPos = o.GetActivePointY(eePosLogical);
TargetLine = prompt("Select to line:","");
o.LineDown(true, (TargetLine - yPos));

To select whole lines:
– start at begin of line
– at the end hold Shift-key and press End-key
Or add this to the end of the script:
document.selection.EndOfLine(true, eeLineLogical);

To select an rectangular/vertical block:
– i will post next…

.