Vimwiki: Long URLs make link names appear on newline

Created on 12 Sep 2017  路  5Comments  路  Source: vimwiki/vimwiki

Long URLs that are wrapped by the window cause their descriptions to appear on a new line. This causes issues with snippets like the following:

foo [[https://www.google.com/search?q=foo+bar&rlz=1C5CHFA_enUS757US757&oq=foo+bar&aqs=chrome..69i57j69i60l3j69i61j69i60.703j0j7&sourceid=chrome&ie=UTF-8|bar]]

Which appears as:
foo
bar

But foo bar is expected.

The number of lines it skips varies depending on the size of the window.

enhancement

Most helpful comment

There is another work-around: :set nowrap. You can added this to your vimwiki-filetype-config or enable/disable per site via modelines.

All 5 comments

I'm marking this as an enhancement. It's not really a bug, since I think it is known behavior. But would be nice to change at some point.

I agree that this is annoying, but I'm afraid there is nothing we can do about it on the Vimwiki side. The URLs are shortened using Vim's conceal feature which is known to work only imperfectly.
The only solution I see is using markdown syntax instead of default syntax and use reference-style links where you put the actual URL at the bottom of the file.

There is another work-around: :set nowrap. You can added this to your vimwiki-filetype-config or enable/disable per site via modelines.

That's not a perfect solution though, wrapping is crucial especially when I resize the terminal window (which is when the links become a problem too).

I'm glad I found this thread. For anyone who doesn't consistently have an issue with files exceeding their window size but do encounter the line breaking over link's display text, :set nowrap is perfect. It doesn't help people like @nambitable, but it's better than nothing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davy79 picture davy79  路  4Comments

ironyman picture ironyman  路  3Comments

cstsunfu picture cstsunfu  路  3Comments

Vitruvia picture Vitruvia  路  5Comments

guakamole picture guakamole  路  3Comments