Numbering a List


#1

http://www.vimgolf.com/challenges/4d716c76919202611400002b

Best vim score: 13

Numbering a List

Start file:

line one
line two
line three
line four
line five
line six
line seven
line eight

End file:

1. line one
2. line two
3. line three
4. line four
5. line five
6. line six
7. line seven
8. line eight

#2
10 keys
%<a-s>I<c-r>#.<space><esc>,q

#3

@Delapouite I wonder if POSIX tools are allowed.

It would have been a challenge to compete if the indices were different.


#4

According to VimGolf rules, external tools are not allowed. I wonder how they managed to do this challenge with 19 key without reverse and sort


#5

Vim has a :sort command.


#6

Yes. This golfing session was more a way to demonstrate some aspects where kakoune really shines. It could even belong to the “recipe” section.


#7

POSIX tools should be allowed IMO. It’s cheating to implement :sort and don’t allow |sort.