Does anyone know how to get vim to wrap long lines of text so that the position of the wrapped text is based on the indent of the current line? I do not want to reformat my code, just to make it display beautifully.
For example, if I set my settings so that the line:
print 'ProcessorError(%r, %r, %r)' % (self.file, self.index, self.message)
displayed on completion as:
print 'ProcessorError(%r, %r, %r)' % (self.file, self.index, self.message)
then if I write a code block as follows:
def __repr__(self): return 'ProcessorError(%r, %r, %r)' % (self.file, self.index, self.message)
it wraps around like this:
def __repr__(self): return 'ProcessorError(%r, %r, %r)' % (self.file, self.index, self.message)
I would prefer it to display as:
def __repr__(self): return 'ProcessorError(%r, %r, %r)' % (self.file, self.index, self.message)
Edit: after reading the answer to “Don Werve”, it looks like I'm really looking for a breakindent option, but this option is still in the “Wait for updated patches” list (see Vim TODO ). So what I would like to know is the easiest way to get vim to work with breakindent ? (I don't care which version of vim I need to use.)