Follow

Generating a numbered list with Vim 8.0+ and Neovim easily 

Vim 8.0+ and Neovim have a pretty neat built-in feature: in Visual mode, select all but the first lines and press `g Ctrl-a` to turn a list like this…

1.
1.
1.
1.

into this

1.
2.
3.
4.

For more info, see the documentation: :help v_g_CTRL-A

Shoutout: stackoverflow.com/a/48408001/3

Sign in to participate in the conversation
LinuxRocks.Online

Linux Geeks doing what Linux Geeks do..