I know the command :%s/^/\=line('.')/
will insert line number at the start of each line as below.
Before
line1
line2
line3
After
1line1
2line2
3line3
But I want to insert a space after the line number as below.
1 line1
2 line2
3 line3
I tried giving a space after line('.')
in the command, but doesn't work.
:%s/^/\=line('.') /