By default, vim will not split long paragraphs (or any paragraphs (= long lines)) across pages. Instead of showing the first part of a paragraph that does not fit into the page entirely, it leaves out all of it, even if this leaves half the screen empty. Can this be changed?

As an example, see how line 1 is followed by a blank area as line 2 is too big to fit:

enter image description here enter image description here

PS. I answered this quæstion myself below, but the result is still not quite as I want it. The remaining problem is that, when one scrolls with <ctrl-e> and <ctrl-y>, vim will only allow the first display line of a paragraph to be at the top of the screen. I want it to be possible to put any display line on top of the screen with <ctrl-e> and <ctrl-y>. This would be parallel to gj and gk.

  • You mean, like the gj/gk motion, or something else? – muru Sep 25 '15 at 9:28
  • 1
    By “paragraph”, do you mean sequences of non-empty lines? Or do you in fact mean lines? And by pages, do you mean screen pages, or sequences of characters other than form feed, or what? – Gilles 'SO- stop being evil' Sep 26 '15 at 21:15
  • I think you're talking about lines (as opposed to sentences). A paragraph is a different thing. Calling a very long line a paragraph is very confusing. – muru Sep 27 '15 at 17:07
  • @muru: What thing is a paragraph then? It seems to me that a paragraph my well be regarded as a long broken line, as I indicated in my parenthesis. – Toothrot Sep 27 '15 at 20:35
  • 1
    does this answer your question? stackoverflow.com/questions/15124386/… – Kent Sep 28 '15 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.