2

Is there a way to configure the word boundary character used for word-wrap like breakat option of vim? The documentation says "When word-wrapping is on, continuation lines are wrapped at the space or tab character nearest to the right window edge". Wrapping at whitespace looks ugly when the text contains a long url.

  • There is no user-option to alter the behavior of Emacs wrapping words at whitespace when the variable word-wrap is non-nil. This is built directly into the display engine within xdisp.c. If anyone is interested in seeing some of the code responsible for this behavior, grep for things such as word_wrap, line_wrap, IT_DISPLAYING_WHITESPACE, and the like. – lawlist Feb 8 '20 at 16:34
  • Thanks for the detailed description. I modified the condition in IT_DISPLAYING_WHITESPACE to strchr(" \t!@*-+;:,./?", it->c) and it works as expected. – Blank_ Feb 8 '20 at 19:25

Your Answer

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

Browse other questions tagged or ask your own question.