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 5cace3ba888961000986ec8d

Resort and deup a CSV list

I'm always adding items to a sorted list. There has to be a better way dedup and resort the lists. There are multiple lists with varying lengths to discourage manual sorting. Also Australia's animals are weird.

Start file
// Animals ordered by continent.
africa = ["hippo", "lion", "atlas bear", "gorilla", "hyena", "giraffe", "zebra"]
asia = ["tiger", "honey bear", "yak", "monkey", "panda"]
europe = ["flea", "brown bear", "ox", "fox", "rat", "deer"]
namerica = ["polar bear", "alligator", "cougar", "wolf", "bison", "reindeer", "raccoon"]
samerica = ["puma", "anaconda", "llama", "capybara", "spectacled bear", "penguin", "sloth"]
australia = ["crocodile", "SPIDERS!", "dingo", "SPIDERS!", "kangaroo", "spider bear", "playtpus", "koala", "SPIDERS!", "echidna"]
End file
// Animals ordered by continent.
africa = ["atlas bear", "giraffe", "gorilla", "hippo", "hyena", "lion", "zebra"]
asia = ["honey bear", "monkey", "panda", "tiger", "yak"]
europe = ["brown bear", "deer", "flea", "fox", "ox", "rat"]
namerica = ["alligator", "bison", "cougar", "polar bear", "raccoon", "reindeer", "wolf"]
samerica = ["anaconda", "capybara", "llama", "penguin", "puma", "sloth", "spectacled bear"]
australia = ["SPIDERS!", "crocodile", "dingo", "echidna", "kangaroo", "koala", "playtpus", "spider bear"]

View Diff

2,7c2,7
< africa = ["hippo", "lion", "atlas bear", "gorilla", "hyena", "giraffe", "zebra"]
< asia = ["tiger", "honey bear", "yak", "monkey", "panda"]
< europe = ["flea", "brown bear", "ox", "fox", "rat", "deer"]
< namerica = ["polar bear", "alligator", "cougar", "wolf", "bison", "reindeer", "raccoon"]
< samerica = ["puma", "anaconda", "llama", "capybara", "spectacled bear", "penguin", "sloth"]
< australia = ["crocodile", "SPIDERS!", "dingo", "SPIDERS!", "kangaroo", "spider bear", "playtpus", "koala", "SPIDERS!", "echidna"]
---
> africa = ["atlas bear", "giraffe", "gorilla", "hippo", "hyena", "lion", "zebra"]
> asia = ["honey bear", "monkey", "panda", "tiger", "yak"]
> europe = ["brown bear", "deer", "flea", "fox", "ox", "rat"]
> namerica = ["alligator", "bison", "cougar", "polar bear", "raccoon", "reindeer", "wolf"]
> samerica = ["anaconda", "capybara", "llama", "penguin", "puma", "sloth", "spectacled bear"]
> australia = ["SPIDERS!", "crocodile", "dingo", "echidna", "kangaroo", "koala", "playtpus", "spider bear"]

Solutions

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 33 remaining solutions by signing in and submitting your own entry
#34 이종혁 / @BluePaisa - Score: 479 - 04/17/19 @ 09:39
qq+f[df]A[]<Esc>q5@qHf]f]jf]"i"<CR>i"atlas bear',<BS><BS>", "giraffe", "gorilla", "hippo", "hyena", "lion", "zebra"<Esc>ji"honey bear", "monkey"m "<BS><BS><BS>, "panda", "tiger", "yak"<Esc>ji"brown bear", "deer", "flea", "fox", "ox", "rat"<Esc>ji"alligator", "bison", "cougar", "poa<BS>lar bear", "raccoon", "reindeer", "wolf"<Esc>ji"anaconda", "capp<BS>ybara", "llama", "penguin", "puma", "sloth'<BS>", "spectacled bear"<Esc>i<Esc>ji"SPIDERS!", "crocodile", "dingo", "d<BS>echidna", "kangato<BS><BS>roo", "koala", "playtpus", "spider bear"<Esc>ZZ

0 comments


Created by: @deft_code

34 active golfers, 122 entries

Leaderboard (lowest score wins):
44
#1 - Titouan Teyssier / @TitouanT_

04/09/2019 at 10:07PM

44
#2 - Smylers / @Smylers2

04/10/2019 at 01:21PM

44
#3 - John Braxler / @braxler

04/10/2019 at 04:09PM

44
#4 - Roger Stoltz / @rogsto1

04/10/2019 at 08:55PM

44
#5 - alekfed / @alek_fed

04/14/2019 at 04:38PM

44
#6 - Darren Weston / @dazWestonUK

04/18/2019 at 08:55PM

44
#7 - Grant / @grant_7788

04/27/2019 at 01:48PM

44
#8 - mkaminaga / @mkmng3

07/01/2019 at 07:14AM

44
#9 - Miłosz Łakomy / @foobar01123

07/30/2019 at 12:42PM

44
#10 - Martin Delille / @martinodelilo

08/21/2019 at 11:48AM

44
#11 - Cassandra / @kascein

09/18/2019 at 10:05PM

46
#12 - Lory / @Lory46845742

11/14/2019 at 03:43PM

47
#13 - garry quested / @GQuested

07/09/2019 at 01:23PM

47
#14 - theBecwar / @thebecwar

08/19/2019 at 09:42PM

48
#15 - BaffaloP 🐃🎨 / @bbaffalopp

04/24/2019 at 10:16PM

48
#16 - Arno / @arnoxmp

05/23/2019 at 10:46AM

48
#17 - johnLate / @johnLate

06/14/2019 at 07:37PM

49
#18 - J. Nick Terry / @deft_code

04/09/2019 at 09:21PM

58
#19 - Ivo Blöchliger / @aigledesalpes

08/06/2019 at 07:44AM

60
#20 - Rand Omperson / @197258444

04/17/2019 at 07:47PM

62
#21 - Zach Ingbretsen / @ZIngbretsen

09/08/2019 at 01:45PM

63
#22 - Amado Antonini / @AmadoAntonini

04/15/2019 at 12:47PM

66
#23 - Sebastian Korten / @FlashKorten

04/09/2019 at 07:55PM

69
#24 - Nils Moehrle / @MoehrleNils

05/06/2019 at 09:34PM

70
#25 - Valacar / @valacar

04/10/2019 at 01:06AM

70
#26 - james_bunch / @james_bunch

04/11/2019 at 12:58AM

70
#27 - Kim Hwa Joong / @hanmwoi

04/11/2019 at 12:34PM

70
#28 - royaso / @royaso

04/12/2019 at 03:49AM

70
#29 - Vimfiz / @vimfiz

04/16/2019 at 09:13PM

70
#30 - Gitsnik / @dracyrys

04/19/2019 at 12:21PM