user1716882
user1716882

Reputation: 115

How to treat bullet points as whitespace characters in vim?

When using the auto-format option with

set formatoptions=taw

in vim, paragraphs starting with a bullet character will be formated like this:

• This is an
item of a list.

How can I tell vim to treat the '•' in the beginning of the line as a whitespace character to get

• This is an
  item of a list.

?

Upvotes: 3

Views: 249

Answers (1)

kev
kev

Reputation: 161834

You can set comments option(:set fo+=cq required):

:set fo+=cq
:set com+=fb:•

You can also set formatlistpat option(:set fo+=n required):

:set fo+=n
:set flp=^\\s*•\\s*

Note: use \\ to get \

Upvotes: 3

Related Questions