Skip to content

Instantly share code, notes, and snippets.

View Ramkumar47's full-sized avatar

Ramkumar Ramkumar47

  • India
View GitHub Profile
@sedm0784
sedm0784 / _vim_auto_list.markdown
Last active May 29, 2023 15:43
Vim Automatic List Continuation

Vim Auto List Completion

This snippet makes Vim automatically continue/end lists in insert mode, similar to the way word processors do:

  • It automatically adds the bullet/number for the next list item when you press Return at the end of an existing item,
  • When you press Return on an empty list item, it removes the bullet/number, ending the list.

It supports ordered lists with markers like 1. and unordered lists with - markers (because those are the markers I use.)

(It's particularly useful when using an iOS keyboard where punctuation and numerals are slow to access.)