jEdit Community - Resources for users of the jEdit Text Editor
Half page scroll
Submitted by Anonymous on Tuesday, 23 March, 2004 - 01:36
I need a feature.
It is better that i can select option of page-up and page-down for a page or a half page.

If i want to scan through the file and find something by eyes, it is very easy to miss something on the top and the bottom of the pages, so if i can page-down a half, the bottom become the center ........i think it is better!
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
In 4.2pre11 there are macros
by Anonymous on Tue, 23/03/2004 - 01:52
In 4.2pre11 there are macros which will center the current line when you scroll up or down (if at the top or bottom of the text area). Not exactly the same, but maybe helpful. They're at: Macros > Editing > Emacs Next Line (and Emacs Previous Line).
 
You could write your own macros
by Anonymous on Mon, 05/04/2004 - 12:34
You could write yourself two macros:

HalfPageDown.bsh
// Scroll the current text area down half a page, without altering position
// of caret

int firstLine=textArea.getFirstPhysicalLine();
int lines=textArea.getVisibleLines();
int newFirstLine=firstLine-(lines/2);

textArea.setFirstPhysicalLine(newFirstLine);

HalfPageUp.bsh

// Scroll the current text area up half a page, without altering position
// of caret
int firstLine=textArea.getFirstPhysicalLine();
int lines=textArea.getVisibleLines();
int newFirstLine=firstLine-(lines/2);
if (newFirstLine<0)
{
newFirstLine=0;
}
textArea.setFirstPhysicalLine(newFirstLine);
textArea.setFirstPhysicalLine(firstLine+(lines/2));



You can then use Utilities-Global Options-Shortcuts - (Edit Shortcuts: Macros) to assign these two macros to C+PAGE_DOWN and C+PAGE_UP

Then pressing Control and Page Down will scroll the current text area half a page, and likewise Control and Page Up will scroll back up half a page.

This at least appears to work on 4.2pre9

hth
Eye-wink
User login
Browse archives
« April 2024  
MoTuWeThFrSaSu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   82348
Context Free Art (*.cfdg)   0.31   46055
JBuilder scheme   .001   18495
BBEdit scheme   1.0   18116
ColdFusion scheme   1.0   18024
R Edit Mode - extensive version   0.1   17473
Advanced HTML edit mode   1.0   16206
Matlab Edit Mode   1.0   16068
jEdit XP icons   1.0   15229
XP icons for jEdit   1.1   14293