Friday, August 7, 2020

Re: scroll by screen line ?

I use vim exclusively on wrapped text, often up to 5000 characters per line, and find these 3 mappings useful to produce the effect you want.

nmap <DOWN> gj
nmap <UP> gk
nnoremap ^F ^F jjzt

The nmaps  accept leading counts for the number of screen lines you wish to move.  Both ^F are produced by typing ctrl-v ctrl-f, the intent being to move the text down 1 complete page, as vim normally retains the last 2 lines of the previous screen on the new screen with standard ^F

On Thu, Aug 6, 2020 at 2:11 PM Anton Shepelev <anton.txt@gmail.com> wrote:
mckel...:

> Is it possible to scroll like <C-e> but have it be
> virtual/screen line and not whole line ?   I  want
> to have wrap on, but also want to scroll by screen
> line when I have long lines.

The replies of Tony and Christian show that  Vim  is
designed for true plain-text files, which means hard
line breaks, and I, for one, fully  approve  of  the
idea.   We  already  have too much pseudo-plain-text
with line per paraphraph:  in  Usenet,  e-mail,  and
even  certain  markup languages including WikiMarkup
and DokuWiki.

May I ask what kind of soft-wrapped text you want to
edit  in Vim?  In my opinion, comfortable editing of
soft-wrapped text in Vim would require serions modi-
fions -- in  order  to  make  it virtually indistin-
guishable from editing hard-wrapped text. As  things
stand,  I  prefer  another editor whenever I need to
word with line-per-paragraph text files...

--
Please, do not forward replies to my e-mail.

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200807001104.498db60339b522c1b791d0f3%40gmail.com.


--
Graham Lawrence

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CA%2BE5mK4rvEa7UN6o55Ph4Cp1ivtx16EZ%3DZeUMAMn4R%3DbAGG37g%40mail.gmail.com.

No comments: