Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've been using Notepad++ in windows for a while and it has a cool feature for word wrapping so that the wrapped text is indented. That is the start of the sentence starts at column 1, but wrapped text starts at column 3 (or 4 or whatever). I believe it is called Indent style for word wrapping. Very convenient when you have long lines. I played with vim, but didn't have success getting similar behavior.

Does any text editor in Linux support this type of word wrapping?

share|improve this question

3 Answers 3

In vim you can do something like:

:set showbreak=..
share|improve this answer
    
Wow- excellent. This also works. ":set showbreak=\ \ " –  che_kid May 16 '13 at 2:37
    
The first has the advantage that vim will display those characters in another color, which helps to distinguish those breaks from real newlines. –  michas May 16 '13 at 6:59

Sublime Text 2 also has this feature, and the width and type of indent are configurable.

share|improve this answer

There's still a famous and often-requested break indent patch in the queue for Vim; this will improve on the existing 'showbreak' by properly indenting the wrapped line.

Addendum: The patch has been accepted upstream, so since version 7.4.338 all you have to do is :set breakindent and you're good to go.

share|improve this answer

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.