paragraph scrolling in Vim

11 views
Skip to first unread message

madiyaan

unread,
Mar 30, 2008, 5:20:51 PM3/30/08
to vim_use
Hello all:

I use Vim to write paragraphs sometimes, and I don't like line-breaks
(because I later copy these paragraphs to word processors like MS
Word, etc.), so I just write in a single line per paragraph without
pressing returns and have mapped my j to gj and k to gk.

That all is working fine. However, when I scroll, if there is a
paragraph just below the screen, vim shows characters like:

@
@
@

etc. to indicate that the paragraph below was too long to be included.
Vim only includes the paragraph if there is enough space for it.

My question is this: Is it possible for me to configure Vim such that
it shows part of the paragraph below? It is annoying when you are
scrolling and no paragraph shows up and when you scroll some more
suddenly a huge paragraph pops in. Smooth scrolling would make my life
much better, if implemented. :)

I know Vim was designed mostly for code editing, but what about people
who want to use it for paragraph editing like me?

Regards,

Ben Schmidt

unread,
Mar 30, 2008, 5:40:03 PM3/30/08
to vim...@googlegroups.com

:help 'display'

Cheers,

Ben.


Ben Schmidt

unread,
Mar 30, 2008, 5:42:20 PM3/30/08
to vim...@googlegroups.com

Showing part of a paragraph at the top of the window isn't possible yet, but
something I mean to look into writing a patch for, as I would appreciate that
feature, too, and it shouldn't be too hard (Vim can do most of what is needed
already, it just doesn't use the opportunity yet!).

Ben.


Tony Mechelynck

unread,
Mar 30, 2008, 6:20:46 PM3/30/08
to vim...@googlegroups.com

There is one case when a window can begin elsewhere than at the start of
a line, namely if 'wrap' is set and the current line is larger than the
window. In that case, depending on the cursor location, the line can
overflow both to the top and to the bottom (and no @ signs are shown,
not even the @@@ which indicate that the line extends below the window
when display=lastline).

Note that with Vim 7, if you use lines extending beyond column 3000
(three thousand), you may want to check ":help 'synmaxcol'".


Best regards,
Tony.
--
ARTHUR: Bloody peasant!
DENNIS: Oh, what a give away. Did you here that, did you here that, eh?
That's what I'm on about -- did you see him repressing me, you
saw it
didn't you?
The Quest for the Holy Grail (Monty
Python)

Ben Schmidt

unread,
Mar 30, 2008, 9:46:18 PM3/30/08
to vim...@googlegroups.com
>> Showing part of a paragraph at the top of the window isn't possible yet, but
>> something I mean to look into writing a patch for, as I would appreciate that
>> feature, too, and it shouldn't be too hard (Vim can do most of what is needed
>> already, it just doesn't use the opportunity yet!).
>>
>> Ben.
>
> There is one case when a window can begin elsewhere than at the start of
> a line, namely if 'wrap' is set and the current line is larger than the
> window. In that case, depending on the cursor location, the line can
> overflow both to the top and to the bottom (and no @ signs are shown,
> not even the @@@ which indicate that the line extends below the window
> when display=lastline).

Yes, I phrased myself a little badly. That one case is precisely why I know that
"Vim can do most of what is needed." I should have said that showing part of a
paragraph at the top of the window isn't *generally* possible yet.

Ben.

Richard Hartmann

unread,
Apr 1, 2008, 5:06:58 AM4/1/08
to vim...@googlegroups.com
On Mon, Mar 31, 2008 at 12:20 AM, Tony Mechelynck
<antoine.m...@gmail.com> wrote:

> DENNIS: Oh, what a give away. Did you here that, did you here that, eh?

Unless I missed a joke within a joke, your quote file is slightly broken ;)


Richard

Tony Mechelynck

unread,
Apr 1, 2008, 12:11:05 PM4/1/08
to vim...@googlegroups.com

At that point, it's Bram's (available from http://moolenaar.net/fun.html
) and (again at that point) it's part of a Monty Python serial. I
suspect the character had an accent, which made him pronounce "giveaway"
as if it were "give away" and "hear" as if it were "here" -- or else,
the scriptwriter had no sense of spelling, as is all too frequent in
some English-speaking countries these days...

Best regards,
Tony.
--
"He was a modest, good-humored boy. It was Oxford that made him
insufferable."

Richard Hartmann

unread,
Apr 1, 2008, 12:17:08 PM4/1/08
to vim...@googlegroups.com
On Tue, Apr 1, 2008 at 6:11 PM, Tony Mechelynck
<antoine.m...@gmail.com> wrote:


> At that point, it's Bram's (available from http://moolenaar.net/fun.html
> ) and (again at that point) it's part of a Monty Python serial. I
> suspect the character had an accent, which made him pronounce "giveaway"
> as if it were "give away" and "hear" as if it were "here" -- or else,
> the scriptwriter had no sense of spelling, as is all too frequent in
> some English-speaking countries these days...

The two peasants do have an accent, but I think it was not in that 'direction'.
If people are interested enough, I can check tonight as I own the full DVD set
of MP movies as every ViMer should ;)


Richard

Tony Mechelynck

unread,
Apr 1, 2008, 12:26:13 PM4/1/08
to vim...@googlegroups.com

If you have the sound but not the text, you'll be hard put to
discriminate these, I guess.

Best regards,
Tony.
--
"His super power is to turn into a scotch terrier."

Richard Hartmann

unread,
Apr 1, 2008, 12:33:38 PM4/1/08
to vim...@googlegroups.com
On Tue, Apr 1, 2008 at 6:26 PM, Tony Mechelynck
<antoine.m...@gmail.com> wrote:

> If you have the sound but not the text, you'll be hard put to
> discriminate these, I guess.

Well, I do have subtitles, of course. I will try and check, tonight :)


Richard

Matthew Winn

unread,
Apr 2, 2008, 9:22:57 AM4/2/08
to v...@vim.org

According to the book of the film (titled "Mønti Pythøn ik den Hølie
Gräilen (Bøk)" on the spine) it's:

ARTHUR
Bloody peasant!

DENNIS
Oooooh! Did you hear that! What a give-away.

--
Matthew Winn

Reply all
Reply to author
Forward
0 new messages