1

I am using vimwiki with and conceal the long URLs as links like this:

[[http://a-really-long-long-url|Link]] rest of text

Under my configuration (conceallevel=2 concealcursor=nc linebreak) it should look like this:

Link rest of text

But usually it looks like this:

Link rest
of text

This is unfortunate, as I don't want the linebreak setting taking effect on the length of the original line (which is long), but on the displayed line, which is much shorter and shouldn't have be broken into 2 visual lines.

Is there a way to make linebreak take the displayed line into consideration when deciding if and whether to break?

1

No it is not possible. Wrapping occurs on the real characters on the line and not on the concealed characters. Note, that if this would be possible, this would cause kind of "wobbling" effect just by moving/scrolling the cursor, which would be most likely unwanted and it possibly would also affect performance. There is also a issue 260 about it that was closed as won't fix.

  • 1
    When concealcursor=nc it is less "wobbly" as the text isn't shown until you edit it. I would really want that feature :( Can you point me to the closed issue? I couldn't find it – Beka Jul 24 '17 at 8:17
  • nevermind, found it and added to the question – Beka Jul 24 '17 at 11:10
  • While this might be true, changing the linebreak may negatively affect rendering of the next lines and this will affect performance anyhow. – Christian Brabandt Jul 24 '17 at 19:56

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.