Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 5287aac7bba8eb0002000002

Permutations N=4

Could use backtracking or other algorithm to generate sorted numbers. Second chance !

Start file
1234
End file
1234
1243
1324
1342
1423
1432
2134
2143
2314
2341
2413
2431
3124
3142
3214
3241
3412
3421
4123
4132
4213
4231
4312
4321

View Diff

1a2,24
> 1243
> 1324
> 1342
> 1423
> 1432
> 2134
> 2143
> 2314
> 2341
> 2413
> 2431
> 3124
> 3142
> 3214
> 3241
> 3412
> 3421
> 4123
> 4132
> 4213
> 4231
> 4312
> 4321

Solutions by @GavinKoeng:

Unlock 13 remaining solutions by signing in and submitting your own entry
Created by: @zulolosi

21 active golfers, 81 entries

Solutions by @GavinKoeng:
25
#8 - Gavin / @GavinKoeng

05/14/2026 at 01:26AM

25
#>8 - Gavin / @GavinKoeng

05/14/2026 at 01:26AM

25
#>8 - Gavin / @GavinKoeng

05/14/2026 at 01:27AM

27
#>12 - Gavin / @GavinKoeng

05/14/2026 at 01:26AM

33
#>13 - Gavin / @GavinKoeng

05/14/2026 at 01:25AM

35
#>14 - Gavin / @GavinKoeng

05/14/2026 at 01:25AM

37
#>15 - Gavin / @GavinKoeng

05/14/2026 at 01:21AM

38
#>15 - Gavin / @GavinKoeng

05/14/2026 at 01:21AM

40
#>16 - Gavin / @GavinKoeng

05/14/2026 at 01:21AM

45
#>17 - Gavin / @GavinKoeng

05/14/2026 at 01:20AM

50
#>18 - Gavin / @GavinKoeng

05/14/2026 at 01:19AM

53
#>20 - Gavin / @GavinKoeng

05/14/2026 at 01:18AM

82
#>21 - Gavin / @GavinKoeng

05/14/2026 at 01:17AM