Skip to content

Feature Request: Hanging indent for numbered/bulleted lists (softwrapped) #1661

@rlue

Description

@rlue

I'd like to suggest a feature for smart indenting of soft-wrapped paragraphs, somewhat in the vein of breakindent – but rather than having the rest of the paragraph match the first (visual) line, to have it do a hanging indent on a bulleted/numbered list like so:

1. Congress shall make no law respecting an establishment of 
   religion, or prohibiting the free exercise thereof; or 
   abridging the freedom of speech, or of the press; or the 
   right of the people peaceably to assemble, and to petition 
   the government for a redress of grievances.

I'm aware that formatoptions=n will do this for numbered lists and formatoptions=c will do this for asterisks (provided they are defined as comment leaders with comments=fb:*), but this only works by forcing an automatic hard wrap.

I posted about this on the vi/vim StackExchange over six months ago, so I'm fairly certain there's no way to accomplish this through vim's existing settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions