Thursday, March 30, 2017

Re: vim 'less.sh' script probs w/folds

On Do, 30 Mär 2017, glts wrote:

> On Monday, March 27, 2017 at 11:19:19 PM UTC+2, L A Walsh wrote:
> > If I have a file with folds in it (fdm=marker), and I try to
> > display it with the vim 'less.sh' script, there doesn't seem to be
> > a way to get rid of all the folds (no 'zR'). I can use the cursor
> > keys to move to each fold and open it, but that really defeats
> > the idea of using 'less' to scroll through the source by pressing
> > 'space' (for example).
> >
> > Maybe folds should be disabled for the less.sh script?
>
> I also use less.sh occasionally, mostly at the end of some pipeline
> where I want to have syntax highlighting.
>
> some shell pipeline | less.sh
>
> Like Linda, I like less.sh to behave more or less like less.
>
> I think folding is an advanced feature. People (even Vim users) don't
> necessarily know how to disable it quickly, or even what it is.
>
> If you need a full-fledged but read-only text editor, why not use
> 'view', which is just that?

One thing I forgot to mention and that one should note one should note,
is that using less.sh may cause problems, if the file to be viewed is
actually quite large, since Vim will always read in the whole file into
memory and not only load chunks of a file. This is especially bad for
files larger than your main memory available.

Just mentioning here, since this is a feature a pager usually handles
well.

Best,
Christian
--
Vor allem andern tröstet das Christentum; aber es gibt Seelen, die von
Natur aus glücklich sind und die Trost nicht nötig haben. Diese aber
macht das Christentum unglücklich und weiter hat es keinen Einfluß auf
sie.
-- André Gide

--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments: