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 by @TitouanT_:

Unlock 5 remaining solutions by signing in and submitting your own entry
Created by: @deft_code

43 active golfers, 167 entries

Solutions by @TitouanT_:
44
#1 - 𝚃𝚒𝚝𝚘𝚞𝚊𝚗 𝚃𝚎𝚢𝚜𝚜𝚒𝚎𝚛 / @TitouanT_

04/09/2019 at 10:07PM

45
#>15 - 𝚃𝚒𝚝𝚘𝚞𝚊𝚗 𝚃𝚎𝚢𝚜𝚜𝚒𝚎𝚛 / @TitouanT_

04/09/2019 at 09:30PM

51
#>26 - 𝚃𝚒𝚝𝚘𝚞𝚊𝚗 𝚃𝚎𝚢𝚜𝚜𝚒𝚎𝚛 / @TitouanT_

04/09/2019 at 09:04PM

52
#>26 - 𝚃𝚒𝚝𝚘𝚞𝚊𝚗 𝚃𝚎𝚢𝚜𝚜𝚒𝚎𝚛 / @TitouanT_

04/09/2019 at 08:38PM

59
#>27 - 𝚃𝚒𝚝𝚘𝚞𝚊𝚗 𝚃𝚎𝚢𝚜𝚜𝚒𝚎𝚛 / @TitouanT_

04/09/2019 at 07:49PM