Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » How to stop automatic horizontal scrolling?
How to stop automatic horizontal scrolling? [message #39577] Sun, 29 July 2007 18:29 Go to next message
Eclipse UserFriend
Originally posted by: nobody.spamcop.net

There's probably a setting for this somewhere, but I can't find it:

When I'm working on lines longer than the width of the editor window, and
the horizontal scrollbar has moved (by me) to show (the) part of the line
past the window width, then the moment I stop typing, the window auto-
scrolls right back to the left-most position. Even if I then type again,
it doesn't scroll back to show the cursor position.

This is extremely annoying, and practically requires me to keep my left
hand on the mouse to "hold" the scrollbar in position and use only my
right hand for typing.

So how do I tell the editor that I really know better than it thinks it
does? ;)


--
Marjolein Katsma
* Travel blog: http://blog.iamback.com/
* Spam reporting addresses: http://banspam.javawoman.com/report3.html
Re: How to stop automatic horizontal scrolling? [message #39608 is a reply to message #39577] Sun, 29 July 2007 19:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: seva-eclipse.zend.com

May I have a contra-question:

Why do you prefer to write in long lines?

Each of PHP/HTML/XML/JS/HTML allow line breaks with no any affect on the logic. :)

On Sun, 29 Jul 2007 18:29:46 +0000 (UTC) Marjolein Katsma <nobody@spamcop.net> wrote:

MK> There's probably a setting for this somewhere, but I can't find it:
MK>
MK> When I'm working on lines longer than the width of the editor window, and
MK> the horizontal scrollbar has moved (by me) to show (the) part of the line
MK> past the window width, then the moment I stop typing, the window auto-
MK> scrolls right back to the left-most position. Even if I then type again,
MK> it doesn't scroll back to show the cursor position.
MK>
MK> This is extremely annoying, and practically requires me to keep my left
MK> hand on the mouse to "hold" the scrollbar in position and use only my
MK> right hand for typing.
MK>
MK> So how do I tell the editor that I really know better than it thinks it
MK> does? ;)
MK>
MK>
MK> --
MK> Marjolein Katsma
MK> * Travel blog: http://blog.iamback.com/
MK> * Spam reporting addresses: http://banspam.javawoman.com/report3.html

--
Seva Lapsha
[slapsha@dev.eclipse.org]
Zend Eclipse Developer
Re: How to stop automatic horizontal scrolling? [message #39639 is a reply to message #39608] Mon, 30 July 2007 00:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipsenews.20.epm.spamgourmet.com

Marjolein: I can't reproduce this in my own version of PDT. It might be
a glitch in the particular version you are running, can anyone else
confirm? On mine (Eclipse 3.2.0, PDT 1.0.0) if I edit a long line the
windows stays scrolled to wherever the cursor happens to be. I would
file it as a bug report.

Seva: That's missing the point a little don't you think? PHP/HTML/XML/JS
also allow you to write really long lines so the editor should work
properly with really long lines.

Besides, regardless of anyone's personal preferences in coding style,
most programmers have to work on code written by others a lot of the
time, whether you are in a big team or using a third party lib, and may
not have control over the formatting.

Also, there are situations where you may be using a string that will in
turn be used in a situation where line breaks would make a difference,
like a html PRE tag, or the text of an email, or a really long URL.

Or maybe you are just coding on a really small screen with lots of other
panels open and the space available for the editor isn't very wide anyway.

Sorry for the rant, it just bugs me when people respond to requests for
help with responses like these that amount to "well that isn't a problem
for me so it shouldn't be a problem for you".



Seva Lapsha wrote:
> May I have a contra-question:
>
> Why do you prefer to write in long lines?
>
> Each of PHP/HTML/XML/JS/HTML allow line breaks with no any affect on the logic. :)
>
> On Sun, 29 Jul 2007 18:29:46 +0000 (UTC) Marjolein Katsma <nobody@spamcop.net> wrote:
>
> MK> There's probably a setting for this somewhere, but I can't find it:
> MK>
> MK> When I'm working on lines longer than the width of the editor window, and
> MK> the horizontal scrollbar has moved (by me) to show (the) part of the line
> MK> past the window width, then the moment I stop typing, the window auto-
> MK> scrolls right back to the left-most position. Even if I then type again,
> MK> it doesn't scroll back to show the cursor position.
> MK>
> MK> This is extremely annoying, and practically requires me to keep my left
> MK> hand on the mouse to "hold" the scrollbar in position and use only my
> MK> right hand for typing.
> MK>
> MK> So how do I tell the editor that I really know better than it thinks it
> MK> does? ;)
> MK>
> MK>
> MK> --
> MK> Marjolein Katsma
> MK> * Travel blog: http://blog.iamback.com/
> MK> * Spam reporting addresses: http://banspam.javawoman.com/report3.html
>
Re: How to stop automatic horizontal scrolling? [message #39670 is a reply to message #39639] Mon, 30 July 2007 06:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: seva-eclipse.zend.com

On Mon, 30 Jul 2007 10:21:52 +1000 Tom Walter <eclipsenews.20.epm@spamgourmet.com> wrote:

TW> Marjolein: I can't reproduce this in my own version of PDT. It might be
TW> a glitch in the particular version you are running, can anyone else
TW> confirm? On mine (Eclipse 3.2.0, PDT 1.0.0) if I edit a long line the
TW> windows stays scrolled to wherever the cursor happens to be. I would
TW> file it as a bug report.
TW>
TW> Seva: That's missing the point a little don't you think? PHP/HTML/XML/JS
TW> also allow you to write really long lines so the editor should work
TW> properly with really long lines.
TW>
TW> Besides, regardless of anyone's personal preferences in coding style,
TW> most programmers have to work on code written by others a lot of the
TW> time, whether you are in a big team or using a third party lib, and may
TW> not have control over the formatting.

If you are a team - you are allowed to reconsider useless formatting rules.
If you work with third party library - you either don't edit the code, or, if you are patching, you may change the formatting.

TW> Also, there are situations where you may be using a string that will in
TW> turn be used in a situation where line breaks would make a difference,
TW> like a html PRE tag, or the text of an email, or a really long URL.

If you have such strings in PHP (URLs, emails etc.), you may break them in PHP with the concatenator (.)
The only real example of unbreakable is PRE indeed, but it's used too rarely.

TW> Or maybe you are just coding on a really small screen with lots of other
TW> panels open and the space available for the editor isn't very wide anyway.

In such cases, use Ctrl-M (or double-click on editor's title) to maximize editor's window and choose smaller fonts.

TW> Sorry for the rant, it just bugs me when people respond to requests for
TW> help with responses like these that amount to "well that isn't a problem
TW> for me so it shouldn't be a problem for you".

I understand your position and fully accept it, but IMHO people sometimes don't realize there are ways to workaround incofortability.

Have a nice day. :)

--
Seva Lapsha
[slapsha@dev.eclipse.org]
Zend Eclipse Developer
Re: How to stop automatic horizontal scrolling? [message #39701 is a reply to message #39670] Mon, 30 July 2007 08:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipsenews.20.epm.spamgourmet.com

> If you are a team - you are allowed to reconsider useless formatting rules.
> If you work with third party library - you either don't edit the code, or, if you are patching, you may change the formatting.
> If you have such strings in PHP (URLs, emails etc.), you may break them in PHP with the concatenator (.)

I agree with you that long lines should be avoided if possible.

And I agree that it is possible to refactor long lines into short ones
most of the time using the techniques you mention.

But even though they're possible, they're not necessarily easy,
especially if you are talking about a large amount of code. And besides,
why would I want to waste time fiddling with things like line breaks?
That is part of why I use an IDE, so I can concentrate on coding. If I
was happy to manually muck around with code formatting all day then I
would code in Notepad.

In any case, the point is that the scrolling problem is a bug, unless I
am misunderstanding something? Regardless of whether you think it is
good to have long lines, or whether there are (labour intensive) ways to
get around it, the editor should not be doing that.

Slightly off topic but related: it would be great if the PDT formatter
could be configured to automatically wrap lines. This is a feature I
miss from PHPEclipse. It would automatically wrap docblock comments and
you could also set it up so that a manual newline within a string would
automatically close the quote, add the concatenator, indent the next
line and open a new string. Obviously it would have to be a feature
implemented with care, since everyone has their own opinion on the best
way to handle this! :-)
Re: How to stop automatic horizontal scrolling? [message #40009 is a reply to message #39670] Tue, 31 July 2007 10:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nobody.spamcop.net

Seva Lapsha (seva-eclipse@zend.com) wrote in
news:20070730092727.872B.SEVA-ECLIPSE@zend.com:

>
> On Mon, 30 Jul 2007 10:21:52 +1000 Tom Walter
> <eclipsenews.20.epm@spamgourmet.com> wrote:
>
> TW> Marjolein: I can't reproduce this in my own version of PDT. It
> might be TW> a glitch in the particular version you are running, can
> anyone else TW> confirm? On mine (Eclipse 3.2.0, PDT 1.0.0) if I edit
> a long line the TW> windows stays scrolled to wherever the cursor
> happens to be. I would TW> file it as a bug report.
> TW>
> TW> Seva: That's missing the point a little don't you think?
> PHP/HTML/XML/JS TW> also allow you to write really long lines so the
> editor should work TW> properly with really long lines.
> TW>
> TW> Besides, regardless of anyone's personal preferences in coding
> style, TW> most programmers have to work on code written by others a
> lot of the TW> time, whether you are in a big team or using a third
> party lib, and may TW> not have control over the formatting.
>
> If you are a team - you are allowed to reconsider useless formatting
> rules. If you work with third party library - you either don't edit
> the code, or, if you are patching, you may change the formatting.

Sure - I often do that - but you then still have to work with those long
lines first. And the editor should support that.

> TW> Also, there are situations where you may be using a string that
> will in TW> turn be used in a situation where line breaks would make a
> difference, TW> like a html PRE tag, or the text of an email, or a
> really long URL.
>
> If you have such strings in PHP (URLs, emails etc.), you may break
> them in PHP with the concatenator (.) The only real example of
> unbreakable is PRE indeed, but it's used too rarely.

It is? :)
Even then - the editor should support it.

> TW> Or maybe you are just coding on a really small screen with lots of
> other TW> panels open and the space available for the editor isn't
> very wide anyway.
>
> In such cases, use Ctrl-M (or double-click on editor's title) to
> maximize editor's window and choose smaller fonts.

You must have young eyes. :)
I don't. I already have a large screen, and a font size just small
enough for me to be legible. The views placed around the editor are
extremely useful (and chosen and positioned for my coding comfort), but
take up their own screen estate. But at the same time, other windows I
have open are open because they also are extremely useful while editing:
so I *never* have any window maximized - a single click takes me to any
of the other windows I need - although my Eclipse window is certainly
big.

Of course the result is that what may fit easily within *your* editor
window on *your* monitor looked at with *your* eyes, or those of one of
my fellow team members, doesn't fit in mine.

To summarze: your eyes aren't my eyes, your monitor isn't my monitor,
and your Eclipse window isn't my Eclipse window.
And I think Eclipse with PDT should also work for me.

> TW> Sorry for the rant, it just bugs me when people respond to
> requests for TW> help with responses like these that amount to "well
> that isn't a problem TW> for me so it shouldn't be a problem for you".
>
> I understand your position and fully accept it, but IMHO people
> sometimes don't realize there are ways to workaround incofortability.

I already have all my settings to work comfortably - with *my* monitor,
*my* eyes, and the code I actually have to work with.

And that means that sometimes lines are longer than fit in the editor
window. Which is what this thread is about, and the editor should
support.

--
Marjolein Katsma
* Travel blog: http://blog.iamback.com/
* Spam reporting addresses: http://banspam.javawoman.com/report3.html
Re: How to stop automatic horizontal scrolling? [message #40041 is a reply to message #39639] Tue, 31 July 2007 11:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nobody.spamcop.net

Tom Walter (eclipsenews.20.epm@spamgourmet.com) wrote in
news:f8jauo$29j$1@build.eclipse.org:

> Marjolein: I can't reproduce this in my own version of PDT. It might
> be a glitch in the particular version you are running, can anyone else
> confirm? On mine (Eclipse 3.2.0, PDT 1.0.0) if I edit a long line the
> windows stays scrolled to wherever the cursor happens to be. I would
> file it as a bug report.

To be precise:
Windows 2000 SP4
Java JRE 1.5.0_10
Eclipse 3.3.0 Build Id: I20070625-1500
PDT 1.0.0.V20070611-79-C-YGHEH6PP

The last two taken from the About window in Eclipse. Is that particular
enough?

What I would expect is *some* automatic scrolling to keep at least a few
character's worth around the cursor visible while typing - but not big
jumps either. Even if I jump to the end of a long line, I'd expect a
little bit of space after it to work in. And if I reposition with the
horizontal scroll bar, keep that position when I continue typing, until
that typing would take the cursor out of view, of course.

Yesterday I had to add a ; to the end of a bunch of longish lines...
painful.

Yesterday I also was surprised by one case where the window did not
scroll back to the left - apparently to allow me to solve some syntax
errors it had highlighted at the end of those lines. But that was an
exception.

[ The editor also sometimes does some surprising vertical scrolling
jumps (making me lose my position completely) but I haven't yet worked
out what set of conditions makes it do so. ]

--
Marjolein Katsma
* Travel blog: http://blog.iamback.com/
* Spam reporting addresses: http://banspam.javawoman.com/report3.html
Re: How to stop automatic horizontal scrolling? [message #40071 is a reply to message #40041] Tue, 31 July 2007 11:56 Go to previous messageGo to next message
Michael Fesser is currently offline Michael FesserFriend
Messages: 16
Registered: July 2009
Junior Member
..oO(Marjolein Katsma)

>[ The editor also sometimes does some surprising vertical scrolling
>jumps (making me lose my position completely) but I haven't yet worked
>out what set of conditions makes it do so. ]

This happens here from time to time in large documents, when some
functions are collapsed. Then, when parsing the document again after
some typing, sometimes the editor jumps up and down, like a hiccup.

Micha
Re: How to stop automatic horizontal scrolling? [message #40238 is a reply to message #40071] Tue, 31 July 2007 16:22 Go to previous message
Eclipse UserFriend
Originally posted by: nobody.spamcop.net

Michael Fesser (netizen@gmx.de) wrote in
news:pl8ua396669kar0bksku8abe19mv1uvlb1@4ax.com:

> .oO(Marjolein Katsma)
>
>>[ The editor also sometimes does some surprising vertical scrolling
>>jumps (making me lose my position completely) but I haven't yet worked
>>out what set of conditions makes it do so. ]
>
> This happens here from time to time in large documents, when some
> functions are collapsed. Then, when parsing the document again after
> some typing, sometimes the editor jumps up and down, like a hiccup.

Hmm... not sure whether having collapsed portions have anything to do
with it, but I just noticed it happens when I hit Ctrl+Z to "undo" a
line or block deletion - it jumps way up and may even select part of a
line totally unrelated to where I was doing (and undoing) the edits.
The file that just happened in was 581 lines - not all that long, I
think, but not tiny either; and it does have a couple of little
docblocks (7) that are mostly collapsed.

I'll keep my eyes open to see if there are other circumstances that
cause these jumps.

--
Marjolein Katsma
* Travel blog: http://blog.iamback.com/
* Spam reporting addresses: http://banspam.javawoman.com/report3.html
Previous Topic:downloads unavailable
Next Topic:Using PDT with XAMPP
Goto Forum:
  


Current Time: Tue Apr 23 09:53:05 GMT 2024

Powered by FUDForum. Page generated in 0.03426 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top