To use capture group () without avoiding them, use \v very magic (see :h /magic )
:%s/\v^(\d)/\r\1/
Note that the g flag is superfluous since there can only be one match at the beginning of a line
Since the replacement section requires an entire consistent line, you can simply use & or \0 without requiring an explicit capture group
:%s/^\d/\r&/
Mentioned in comments
:g/^\d/norm O
The g command allows you to filter lines and execute a command on these lines, for example norm O , to open a new line above. The default range is the full file, so % not required
With the substitute command, this will be :g/^\d/s/^/\r/
See :h :g and :h ex-cmd-index for a complete list of commands for use with :g
source share