Scrolling screen lines, I knew, it's impossible.

50 views
Skip to first unread message

oCameLo

unread,
Jan 26, 2011, 11:38:30 AM1/26/11
to vim_use
There's so many questions and feature requests about use mouse to
scroll screen lines, but until now, it's still impossible.

Before starting this thread, I found two items in todo.txt.

1st:

7 Add a string to the 'display' option to make CTRL-E and CTRL-Y
scroll one
screen line, also if this means the first line doesn't start with
the
first character (like what happens with a single line that doesn't
fit).

"7" is priority classification, it means "as soon as possible", it's
great. BUT, this item added to todo.txt by joze on Mon Jan 17 00:41:55
2000 UTC. Yes, 11 years ago. (http://vim.cvs.sourceforge.net/viewvc/
vim/vim/runtime/doc/todo.txt?r1=1.2&r2=1.3)

2nd:

- Scroll commands by screen line. g CTRL-E and g CTRL-Y ? Requires
the
first line to be able to start halfway.

This one added by Bram Moolenaar on Jan 06, 2010. "-" means
"unclassified", and try :h extensions-improvements, you'll see this
feature will be added "when all bugs have been fixed". (https://
code.google.com/p/vim/source/diff?
spec=svn3259c3923c1ef2ec1783c828828c7f4e728c3f4b&r=de5a43c5eedc537e4dcdcdbddeea496088063683&format=side&path=/
runtime/doc/todo.txt&old_path=/runtime/doc/
todo.txt&old=5232b9862f238a2a109f15527825e5cac1668a04)

I'm not sure what does "all bugs" mean, sounds like, never?...

Best regards.

Tony Mechelynck

unread,
Jan 26, 2011, 5:05:09 PM1/26/11
to vim...@googlegroups.com, oCameLo

ATM the first character in a Vim (split-)window must be the first one of
a line, except if the current line is larger than the window. I regard
this as a feature rather than a bug; of course, YMMV.

Best regards,
Tony.
--
"Death is nature's way of saying `Howdy'".

oCameLo

unread,
Jan 26, 2011, 6:37:33 PM1/26/11
to vim_use
Scroll by screen lines is a feature too, and I'm afraid VIM is the
only one that cannot turn it on.

Looks like, there's someone had persuaded joze 11 years ago, maybe we
need to do it to vimboss again?

Best.


On Jan 27, 6:05 am, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:
> On 26/01/11 17:38, oCameLo wrote:
>
>
>
>
>
> > There's so many questions and feature requests about use mouse to
> > scroll screen lines, but until now, it's still impossible.
>
> > Before starting this thread, I found two items in todo.txt.
>
> > 1st:
>
> > 7   Add a string to the 'display' option to make CTRL-E and CTRL-Y
> > scroll one
> >      screen line, also if this means the first line doesn't start with
> > the
> >      first character (like what happens with a single line that doesn't
> > fit).
>
> > "7" is priority classification, it means "as soon as possible", it's
> > great. BUT, this item added to todo.txt by joze on Mon Jan 17 00:41:55
> > 2000 UTC. Yes, 11 years ago. (http://vim.cvs.sourceforge.net/viewvc/
> > vim/vim/runtime/doc/todo.txt?r1=1.2&r2=1.3)
>
> > 2nd:
>
> > -   Scroll commands by screen line. g CTRL-E and g CTRL-Y ?  Requires
> > the
> >      first line to be able to start halfway.
>
> > This one added by Bram Moolenaar on Jan 06, 2010. "-" means
> > "unclassified", and try :h extensions-improvements, you'll see this
> > feature will be added "when all bugs have been fixed". (https://
> > code.google.com/p/vim/source/diff?
> > spec=svn3259c3923c1ef2ec1783c828828c7f4e728c3f4b&r=de5a43c5eedc537e4dcdcdbd­deea496088063683&format=side&path=/

Bram Moolenaar

unread,
Jan 26, 2011, 11:29:25 PM1/26/11
to oCameLo, vim_use

Some camel wrote:

Vim development is slow, it's quite stable and still there are plenty of
bugs to fix. Adding a new feature always means new bugs, thus hardly
any new features are going to be added now. I did add a few for Vim
7.3, and that did introduce quite a few new problems. Even though
several people said the patch worked fine.

--
hundred-and-one symptoms of being an internet addict:
157. You fum through a magazine, you first check to see if it has a web
address.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Ben Schmidt

unread,
Jan 26, 2011, 10:32:58 PM1/26/11
to vim...@googlegroups.com
On 27/01/11 3:38 AM, oCameLo wrote:
> There's so many questions and feature requests about use mouse to
> scroll screen lines, but until now, it's still impossible.

Bram, you're not opposed to this kind of feature, are you? So if I did
some work on it, it could be included in Vim at some stage, right?

Ben.

oCameLo

unread,
Jan 27, 2011, 7:46:28 AM1/27/11
to vim_use
Opps, vimboss appeared...

Everytime when I coding in VIM, as it's in heaven. But for reading and
writing, I have to use another editor. In some ways, just like wander
from place to place, it's a kind of pain.

However, I quite understand what you mean. Actually, I never thought
you would see this thread...

Sorry for my complaining, and thanks for your greate job.

Best.

oCameLo

unread,
Jan 27, 2011, 7:55:12 AM1/27/11
to vim_use
If you done this, you will be a hero, too...

Best.

Bram Moolenaar

unread,
Jan 28, 2011, 9:44:06 PM1/28/11
to Ben Schmidt, vim...@googlegroups.com

Ben Schmidt wrote:

This is a change that has a high probablity of introducing new bugs.

There are also a few questions about how to allow the user to access
this, with an option setting or with different scroll commands?
Probably a setting, so that it can work with scrollbars.

--
If you feel lonely, try schizophrenia.

Ben Schmidt

unread,
Jan 28, 2011, 10:26:32 PM1/28/11
to Bram Moolenaar, vim...@googlegroups.com
On 29/01/11 1:44 PM, Bram Moolenaar wrote:
> Ben Schmidt wrote:
>
>> On 27/01/11 3:38 AM, oCameLo wrote:
>>> There's so many questions and feature requests about use mouse to
>>> scroll screen lines, but until now, it's still impossible.
>>
>> Bram, you're not opposed to this kind of feature, are you? So if I did
>> some work on it, it could be included in Vim at some stage, right?
>
> This is a change that has a high probablity of introducing new bugs.

True, though if coded carefully, these bugs should only appear when the
feature is turned on.

> There are also a few questions about how to allow the user to access
> this, with an option setting or with different scroll commands?
> Probably a setting, so that it can work with scrollbars.

I think it would probably be best to do this in stages:

1. Add new commands to scroll one screen line at a time. Test it out,
including by mapping the scrollwheel to those new commands in the X
GUIs. This shouldn't be too hard, as Vim can already display lines
starting part way through; it just usually doesn't. The experience
wouldn't be very smooth yet either, but screen-line scrolling would at
least be possible, and it would pave the way for something better.

2. Add an option to make scrolling work with screen lines. The meaning
of this option would be to affect all scrolling. To start with, though,
just make it change the meaning of the scroll wheel in X GUIs (already
implemented), and where easy, the clicks of the scroll bar arrows. It
might not affect Windows yet; it depends how the scrolling works there,
and I haven't looked in any detail.

3. Make other parts of Vim, such as moving line-to-line, vertical jumps,
and scrolling for scrolloff honour the new option, too, choosing window
positions that begin with partial lines. This would make the editing
experience pretty smooth.

4. Update the code for scrollbars more thoroughly, so that dragging the
bar can work with screen lines, too. Windows should definitely benefit
by this stage and the feature would basically be finished.

5. Pick the nits of little bugs that we can't foresee.

What do you think? Would this be an OK way to proceed?

Ben.

Bram Moolenaar

unread,
Jan 30, 2011, 4:07:54 PM1/30/11
to Ben Schmidt, vim...@googlegroups.com

Ben Schmidt wrote:

Sounds good.

--
"The question of whether computers can think is just like the question
of whether submarines can swim." -- Edsger W. Dijkstra

Reply all
Reply to author
Forward
0 new messages