4

To have proper paragraph wrapping with indentation in vim (after vim7.4) we could use this:

" Wrap the text with identation isntead of the old way 
set breakindent
set showbreak=\ \\_  

Since vim8 has introduced new features about break-indent I want to know if there would be a better practice?

p.s. the option name is the same and this "new vim 8.0 features" might not be that new!.

Edit (Provide an example for proper indentation):

here is a list in markdown and normal vim act like this:
    * first item
    * second item blah blah blah blah  blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah
    * third time

and here is the proper way which is famously called "wrapping with indentation":

here is the base line:
    * first item
    * second item blah blah blah blah  blah blah blah blah blah
      blah blah blah blah blah blah blah blah blah blah blah blah
      blah blah blah blah blah 
    * third time
  • 1
    "proper paragraph wrapping" only means something in your head. Describe what you want to achieve if you want meaningful help. – romainl Sep 22 '16 at 7:26
  • 1
    Have you eventually figured it out? I'm still looking for it and Googling about it every week. – Marco Lazzeri Dec 20 '16 at 17:28
  • I'm currently use set breakindent and set showbreak=\ \\_ which works for all versions of vim and there is nothing specific about vim8! – SdidS Dec 21 '16 at 5:08

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.