Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Don't wrap URLs #9

ithinkihaveacat opened this Issue Oct 23, 2012 · 5 comments


None yet
4 participants

URLs are wrapped at various punctuation characters, including -, / and .. It would be useful if URLs were never wrapped. The current behaviour makes inline links in Markdown format problematic. (And I actually can't think of a situation, where you'd want URLs split over multiple lines.)

It would probably be best if <http://www.example.com> and (http://www.example.com/) were also never wrapped. (i.e. including the </> and (/) brackets.)


ehuss commented Oct 30, 2012

It should never wrap on slashes or dots. Are you sure the plugin is running correctly? Can you give a detailed rundown of your setup (platform, syntax, word wrap settings, etc.)? Can you post a file on gist that shows the behavior and indicate where you place the cursor, what happens, and what you expected?

It will wrap on dashes, however. I just pushed an updated that exposes some internal options, so you can turn that off by setting WrapPlus.break_on_hyphens to false. Also, if you have really long URL's that are longer than your line length, you can turn off wrapping of those by setting WrapPlus.break_long_words to false.

Thanks, the WrapPlus.break_on_hyphens option fixes this for me.


mehaase commented May 24, 2016 edited

For the benefit of others who end up here: I also set WrapPlus.break_long_words to false in addition to WrapPlus.break_on_hyphens.

While break_on_hyphens and break_long_words together provide a temporary fix, I don't think URLs should ever be wrapped at all, don't you guys think?


ehuss commented Sep 8, 2017

It shouldn't wrap, but the fix is nontrivial. If you want to work on a PR, I'd be happy to look at it, though it might be a good idea to talk about the changes first if they are large.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment