How do I format bulleted and numbered lists?

You can configure Vim to format bulleted and numbered lists using the ‘formatoptions’ option. For example, you can format the list of the following format: - this is a test. this is a test. this is a test. this is a test. this is a test. into this format: - this is a test. this is a test. this is a test. this is a test. this is a test. You can use the ‘n’ flag in the ‘formatoptions’ to align the text.

    :set fo+=n

With this option, when formatting text, Vim will recognize numbered lists. For this option to work, the ‘autoindent’ option also must be set.

Comments (1)


Pepsh Pepshinsky

Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE


Speak Your Mind