Wednesday, January 14, 2015

Re: conceal and wrapping

On Mi, 14 Jan 2015, Christian Brabandt wrote:

> Hi Gary!
>
> On Mi, 14 Jan 2015, Gary Johnson wrote:
>
> > Given a line longer than the screen width so that it wraps at the
> > screen edge, is it expected that concealing the first part of a line
> > moves the line to the left but does not change the point in the line
> > where it wraps?
>
> Yes, that is expected. See issue 260:
> https://code.google.com/p/vim/issues/detail?id=260

But here is a different approach. Use
:setl fdm=expr fex='>1' fml=0
:let &l:fdt='matchstr(getline(v:foldstart).repeat(" ",70),''^.\{70}'').repeat(" ",10)'

This has only the drawback of disabling syntax highlighting.

With a fancier foldtext setting you can also almost do anything (e.g.
strip the common path or so).

Best,
Christian
--
Bei gleicher Umgebung lebt doch jeder in einer andern Welt.
-- Arthur Schopenhauer

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