Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Notepad++ there is a linewrap option that can be set to aligned so that indented, wrapped lines align at the same left margin. See also here: How can I indent the wrapped text in Notepad++?.

Is there a setting to get the same behaviour in VIM?

share|improve this question
3  
This might help: stackoverflow.com/questions/2828174/… –  EBGreen Nov 2 '12 at 18:49
add comment

1 Answer

This line indents wrapped content by 4 spaces:

set showbreak=\ \ \ \ <- there's a <Space> here

See :help 'showbreak'.

The breakindent patch in EBGreen's comment is smarter.

share|improve this answer
    
Yes, I noticed the showbreak option in EBGreen's comment. However, it is indeed not very smart, as it only works correctly for a single indent. –  Rabarberski Nov 2 '12 at 21:21
    
Indeed. The breakindent patch is the way to go. –  romainl Nov 2 '12 at 21:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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