In Editor, keeping code centered/top of screen

I'm not sure if this is possible, but I thought I'd ask...
I have neck/back issues, so try to work a bit more ergonomically at my desk. Part of this is keeping the primary part of my work high enough that I sit upright/keep my neck straight.
To this end, I was wondering if anyone knew a way to keep the code that I'm currently typing "centered" on my screen. That is, normally as you type code in the editor (or command line for that matter) lines fill up the screen THEN start scrolling up, so that after a while you are always entering things at the bottom of your screen. I want to always be entering things in the CENTER/TOP of my screen.
I could just shrink the window, but then I have to re-size it ever time I want to look at more code instead of just scrolling upward...
My current solution has been to periodically just add blank lines at the bottom of my code and re-scroll, which works, but is about equally as irritating as the shrinking the window.

Réponses (3)

Daniel Shub
Daniel Shub le 28 Sep 2011

0 votes

I don't know how to do it in the command window. If you are willing to switch to emacs as your editor (the MATLAB extension seems pretty good http://www.mathworks.com/matlabcentral/answers/13577-large-files-very-slow-editor-no-fix#answer_18558) , then I am pretty sure you can configure auto-scrolling to do what you want.
Jan
Jan le 28 Sep 2011

0 votes

It is hard or impossible to automatically determine the number of lines to scroll. E.g. after "disp(rand(2))" in comparison to "rand(2)" without DISP.
I assume there are more efficient and convenient methods to easy your neck.
RoldGold RoldGold
RoldGold RoldGold le 3 Oct 2011

0 votes

Has anybody come up with a solution/workaround to this? I have a bad back/neck as well. Or instead is there an option to make code history move downwards to the bottom of the screen? That would be more helpful.

Tags

Question posée :

le 28 Sep 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by