A text editor?

Completely and utterly unrelated.

Moderators: raboof, MattKingUSA, khz

User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

A text editor?

Post by briandc »

Hi all,
I'm looking for a plain text editor (think "Mousepad") that will keep the cursor line in the center of the window (rather than going downwards with every hit of the 'return' key).

Anyone know of an app that does this?


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
nils
Established Member
Posts: 538
Joined: Wed Oct 22, 2008 9:05 pm
Has thanked: 35 times
Been thanked: 94 times
Contact:

Re: A text editor?

Post by nils »

So X and Y both centered?

May I ask what is the purpose of this mode and how complex is the text editing? Answering this may lead to motivation to program this feature.
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: A text editor?

Post by briandc »

nilshi wrote:So X and Y both centered?

May I ask what is the purpose of this mode and how complex is the text editing? Answering this may lead to motivation to program this feature.
Hi nilshi,
I think the X (horizontal) axis is most important.
The reason for this, is I use Mousepad for teaching. It's getting annoying to have to keep moving the cursor back up to the center of the screen when I get to the bottom of the page. I'd like the cursor to stay in the middle of the page, so the document will move upwards when I hit "enter" but the cursor doesn't move down. (sorry if I'm repeating myself. It's kinda' hard to explain I guess...!)


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: A text editor?

Post by j_e_f_f_g »

Many editors, such as gedit, have a command to scroll the document (not cursor) one line up or down. As I recall, it's something like hold the Alt key while pressing up or down arrow key. Check the editor's key bindings (command shortcuts).

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
Michael Willis
Established Member
Posts: 1460
Joined: Mon Oct 03, 2016 3:27 pm
Location: Rocky Mountains, North America
Has thanked: 71 times
Been thanked: 169 times
Contact:

Re: A text editor?

Post by Michael Willis »

Emacs has a command to center on the current line. With default key bindings, ctrl-L will do it. Given a little bit of ingenuity, it could be configured to do it every time you navigate to a different line.

Of course, Emacs doesn't qualify as a "simple" text editor, but I believe that somebody made a configuration that makes it behave more like plain simple editors, with typical key bindings like ctrl-X cut, ctrl-C copy, ctrl-V paste, etc.
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: A text editor?

Post by briandc »

Hi guys,
I looked into both options, but to no avail. Gedit provides a type of highlighted line that jumps between the spaces in paragraphs when scrolling (alt+ up/down arrows as you suggested) but it's not exactly what I'm looking for.
Emacs is new to me, and I only briefly tested it out. It may be that by doing some customizing it could do the trick, but that will have to be in another moment when I can learn more about Emacs, since it appears to be an immense and ambitious project indeed! (thanks for pointing it out, btw!)

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
nils
Established Member
Posts: 538
Joined: Wed Oct 22, 2008 9:05 pm
Has thanked: 35 times
Been thanked: 94 times
Contact:

Re: A text editor?

Post by nils »

I still don't get it.
As example, take (Libre) Office, if you switch to centred text.
What is good in that mode and what should be different?
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: A text editor?

Post by briandc »

nilshi wrote:I still don't get it.
As example, take (Libre) Office, if you switch to centred text.
What is good in that mode and what should be different?
Not a vertical center but a horizontal center.
When writing, when you hit "enter," the cursor moves down one row.
Rather, I want the page to move up one row.

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
ufug
Established Member
Posts: 525
Joined: Tue Jan 10, 2012 12:28 am
Has thanked: 73 times
Been thanked: 22 times

Re: A text editor?

Post by ufug »

briandc wrote: Not a vertical center but a horizontal center.
When writing, when you hit "enter," the cursor moves down one row.
Rather, I want the page to move up one row.

brian
brian, is it possible you do mean vertical? Up and down is vertical. Horizontal would be left-right.
listenable at c6a7.org
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: A text editor?

Post by briandc »

ufug wrote:
briandc wrote: Not a vertical center but a horizontal center.
When writing, when you hit "enter," the cursor moves down one row.
Rather, I want the page to move up one row.

brian
brian, is it possible you do mean vertical? Up and down is vertical. Horizontal would be left-right.
I was considering vertical as "longitudinal", but I guess it could be viewed that way too. :)


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: A text editor?

Post by j_e_f_f_g »

Geany has a "scroll document down 1 line" command. It's mapped to Alt + down arrow keys. I believe gedit also a scroll down command, but maybe invoked via a different key shortcut. You need to look through the editor's key bindings.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

nils
Established Member
Posts: 538
Joined: Wed Oct 22, 2008 9:05 pm
Has thanked: 35 times
Been thanked: 94 times
Contact:

Re: A text editor?

Post by nils »

j_e_f_f_g wrote:Geany has a "scroll document down 1 line" command. It's mapped to Alt + down arrow keys. I believe gedit also a scroll down command, but maybe invoked via a different key shortcut. You need to look through the editor's key bindings.
If that is really the problem in question then this is just simple scrolling and I wonder why brian didn't say so in the first place.
If there are no keybinding for the editor of choice, the problem can also be solved more universally by using a Xorg tool to bind mousewheel up an down to a keystroke.
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: A text editor?

Post by j_e_f_f_g »

nilshi wrote:this is just simple scrolling
Well, scrolling plus cursor movement. He wants the entire document to move up one line, while the cursor simultaneously advances to the next line. This is not an uncommon command in text editors.

I assume he wants this because he's obviously displaying a text document on a projector screen in a classroom. And he''s got the cursor highlighting the particular line he's discussing. Now he wants to discuss the next line, so he moves the cursor down to highlight that line. That works until he gets to the lines toward the bottom of the projector screen. It's hard for some students to view the line at that low angle. So Brian repeatedly moves the cursor down until the particular line moves (scrolls) up to at least the center of the screen. But to do that, he has now moved the cursor past that line. So he needs to back the cursor up to that line, to highlight it. He wants the highlighted line to always be shown in the upper half of the screen without needing to do this "cursor dance". His options:

1) Find an editor that has a "document scroll" command.
2) Put bricks under the projector screen to boost it up so students can better see the screen bottom.
3) Teach shorter students.
why brian didn't say so in the first place.
He's probably not familiar with the terminology/techniques used by programmers when discussing text display. And also, I don't think he's familiar with "key bindings" (ie, the idea that a program allows the enduser to choose what keyboard keys execute which functions/commands). When a program has lots of commands, as typical with a text editor, it's impractical to map all the commands to keys. So a default config may map only a small set of the most common commands, and leave the rest unassigned. (ie, It's assumed if the enduser needs one of the unassigned commands, he'll get into "Preferences" or "Key shortcuts" or something like that, and assign the desired command).

It may be that one of the text editors he tried already has the feature he wants. But he just doesn't know that this feature is going to be called something like "Scroll document up one line" in the program's key bindings. And he hasn't looked for that in the keybindings. So he doesn't know that the command is assigned to some key combo he hasn't yet tried. Or maybe it hasn't been assigned yet.

I keep telling him to check the key bindings, but I get the impression he hasn't because he's not familiar with this sort of feature. Hopefully this more detailed post will convince him to try, so that he doesn't need to resort to options 2 or 3.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm
Been thanked: 1 time

Re: A text editor?

Post by Luc »

Maybe you can achieve that with OpenOffice or LibreOffice if you configure the page to have a really thick bottom border.
j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 358 times

Re: A text editor?

Post by j_e_f_f_g »

Luc wrote:with LibreOffice, configure the page to have a really thick bottom border.
use an xorg tool to bind mousewheel
Why bother with such hacks when there are already text editors with a document scroll command? I know geany does. I think sci does. I'd be surprised if gedit and kate don't. Leafpad, mousepad, and nano may be too limited.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

Post Reply