Feature request: Display partial paragraph at the top of the window.

7 views
Skip to first unread message

Szabolcs

unread,
Oct 21, 2007, 6:18:09 AM10/21/07
to vim_use

A feature request:

Currently Vim can display partial long lines (paragraphs) at the
bottom of the window if display=lastline is set. I would love to see
it do this at the top as well. This is what I mean:

Suppose we have (view it with fixed width fonts):

+------------------------------+
|Some text here ... |
| |
|This is a very very very very |
|very very very very very very |
|very very very very very very |
|very very very very very very |
|very very very very very very |
|very very very very very very |
|very very very very very very |
|very very very very very very |
|very very long line. |
| |
|Some more text here. |
+------------------------------+

I would like to put the editor window into this state, without
inserting any hard line-breaks into that long line:

+------------------------------+
|very very very very very very |
|very very very very very very |
|very very very very very very |
|very very very very very very |
|very very very very very very |
|very very very very very very |
|very very long line. |
| |
|Some more text here. |
|Inserting more text ... |
| |
| |
| |
+------------------------------+

At the moment a long paragraph goes completely off screen as soon as I
scroll down.

This would be useful for editing "normal" text (not program code),
like TeX, HTML, plain text etc. I like to see the previous paragraph
as I am typing the current one. Inserting hard line breaks is an
annoyance because of the need for constant reformatting, and because
other people usually mess up the line breaks when I give them the file
to edit.

Virtually all other editors (including Windows Notepad) can display
partial paragraphs.

Andy Wokula

unread,
Oct 21, 2007, 6:56:21 AM10/21/07
to vim...@googlegroups.com
Szabolcs schrieb:

VIM HATES LONG LINES, didn't you know?

--
Andy

btw: I always wanted that feature too, but it's a good occasion to give
other editors a try ;-)
btw: We love Vim, because it's different!

Bernhard Walle

unread,
Oct 21, 2007, 7:01:18 AM10/21/07
to vim...@googlegroups.com
* Andy Wokula <anw...@yahoo.de> [2007-10-21 12:56]:

> >
> > Virtually all other editors (including Windows Notepad) can display
> > partial paragraphs.
>
> VIM HATES LONG LINES, didn't you know?

Not only vim. ;)


Bern'hates long lines, too'hard
--
At least Microsoft offers updates to keep your selection of bugs fresh.
-- Alan Shutko, hating Corel even more, in asr

Szabolcs

unread,
Oct 21, 2007, 7:57:25 AM10/21/07
to vim_use

On Oct 21, 12:56 pm, Andy Wokula <anw...@yahoo.de> wrote:
>
> btw: I always wanted that feature too, but it's a good occasion to give
> other editors a try ;-)

I'd rather not. I've already invested a lot of time into learning
Vim, and I'm sure other editors have their own problems too.

Szabolcs

unread,
Oct 22, 2007, 11:07:59 AM10/22/07
to vim_use

On Oct 21, 12:56 pm, Andy Wokula <anw...@yahoo.de> wrote:
>

> VIM HATES LONG LINES, didn't you know?
>

So does this mean that there is some fundamental limitation in Vim's
design that makes this feature difficult to implement? Is all hope
lost?

Ben Schmidt

unread,
Oct 22, 2007, 7:49:06 PM10/22/07
to vim...@googlegroups.com
>> VIM HATES LONG LINES, didn't you know?
>
> So does this mean that there is some fundamental limitation in Vim's
> design that makes this feature difficult to implement? Is all hope
> lost?

No, all hope is certainly not lost. Vim can definitely deal with the display
beginning part way through a line, as it can deal with lines that are larger than
a screenful and scroll the screen through them. So there's at least some of the
functionality there, and adding a bit more shouldn't be too amazingly hard. I too
am interested in this feature so will try to have a look through Vim's source code
at some stage and see if I can work anything out. But this is unlikely to be quick.

Ben.

Send instant messages to your online friends http://au.messenger.yahoo.com

Szabolcs

unread,
Oct 23, 2007, 3:39:08 PM10/23/07
to vim_use

On Oct 23, 1:49 am, Ben Schmidt <mail_ben_schm...@yahoo.com.au> wrote:
>
> No, all hope is certainly not lost. Vim can definitely deal with the display
> beginning part way through a line, as it can deal with lines that are larger than
> a screenful and scroll the screen through them. So there's at least some of the
> functionality there, and adding a bit more shouldn't be too amazingly hard. I too
> am interested in this feature so will try to have a look through Vim's source code
> at some stage and see if I can work anything out. But this is unlikely to be quick.
>

Ben, Thank you for the reply, and for considering this change! :-)

Reply all
Reply to author
Forward
0 new messages