ghostli123
ghostli123

Reputation: 21

Vim: how to insert a character like '\' automatically when auto wrap a line?

Suppose I :set tw=5, when wrapping the following 'long' line:

a = b + c

It becomes:

a = b
+ c

Yet I want it to be:

a = b \
+ c

Or even better if a smart indent is inserted on the next line, like this:

a = b \
  + c

How do I do that?

Upvotes: 2

Views: 151

Answers (0)

Related Questions