Tuesday, November 29, 2011

Re: Scrolling Long Lines Revisited. Again.

> This seems like a perennial topic[1], that regularly gets dismissed --
> vertically scrolling by "screen lines" vs. "real lines".
>
> [...]


I feel the same way.

Back in the mid-90s when I was doing my IT degree I heard about Vim
(or maybe it was vi) and the idea of it really appealed to me. I
tried hard to get into it but I ended up getting really frustrated by
its scrolling behavior and I ended up giving up.

Then and now, I find the random jumps jarring and (quite literally)
stressful.

Then, a few years ago, I decided to bite the bullet and try getting
into Vim again. I spent many hours going through the user manual and
learning about how to configure Vim to my needs.

In the end I figured out that I could use

set textwidth=75
set formatoptions+=a

to automatically break lines at 75 chars, and thus give me scroll-by-
screen-line. (it's not an ideal solution, but it's enough to get by
with). But the thing is that I had to devote a lot of time and effort
to figuring this out.

(And just to note, 'gj' and 'gk' are mentioned sometimes in the
context of this issue, but they are not a solution. They move the
position of the cursor down one screen-line, but they do not cause
scrolling to happen one screen-line at a time. They still cause the
random jumps)


A common response to requests for scroll-by-screen-line seems to be
that Vim is meant for writing code and for working with short lines.

I think this assumes that there's some disadvantage or trade-off
involved with having scroll-by-screen-line. I don't think that's the
case. I don't see why there couldn't be an option for how scrolling
works: set it one way to have scroll-by-logical-line, set it another
way to have scroll-by-screen-line.

Having scroll-by-screen-line would have *zero* effect on those that
don't want it, while being very useful for those who do want it. (of
course, adding this feature would require time and effort from people
volunteering their time, and I don't want to ignore that fact).

I think another thing that it's important to keep in mind is that
there's a kind of Survivorship bias (http://en.wikipedia.org/wiki/
Survivorship_bias) at work here, in that everyone here is someone who
continues to use Vim, so for whom this scrolling behavior is not a
huge deal.

But I would suggest that there's a lot of people who have been put off
Vim because of this scrolling behavior.

I think this is more likely to happen with people using Vim to write
prose, where you tend to get really long lines (paragraphs) so the
scrolling tends to be quite jumpy.

In a forum like this one, you're not likely to hear the voices of the
people who decided to not use Vim for this reason.

I think it's a real shame if the result is that a lot of people are
missing out on Vim.

You might say that it's not meant for people like them. But why can't
it be? The wonderful power of Vim is just as useful for things like
writing prose as it is for writing code (I use it for both). The idea
of having one editor for code and one for prose seems crazy to me - it
means you have to double up on your efforts to learn and configure
them, and there's the mental overhead of switching between the
different ways of navigating and so forth in each. It's much better
to be able to use Vim for both.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: