1

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?

3 Answers 3

7

In vim you can do something like:

:set showbreak=..
2
  • Wow- excellent. This also works. ":set showbreak=\ \ "
    – che_kid
    Commented May 16, 2013 at 2:37
  • 1
    The first has the advantage that vim will display those characters in another color, which helps to distinguish those breaks from real newlines.
    – michas
    Commented May 16, 2013 at 6:59
4

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.

1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .