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

citizen_hacks_2019_part6

For the Citizen Hacks 2019 Vim competition

Start file
//Part 6: A New Hope

event_date = new Date(2019, 9, 28);

while(current_date < event_date){
  let companies = find_companies(contacted_companies);

  //https://stackoverflow.com/questions/5915096/get-random-item-from-javascript-array
  let selected_company = companies[Math.floor(Math.random()*companies.length)];

  request_sponsorship();
  contacted_companies.add();
}

privacy_commissioner_of_canada.grant_accepted(Citizen_Hacks);

//Our first MLH hackathon!
let MLH = require('mlh');

class Citizen_Hacks extends MLH{
  //...
}

//Main Sponsors
CSI_Annex.Sponsor();
Keybase.sponsor();
Feroot.sponsor();
Easy_DNS.sponsor();
Ada.sponsor();

//Other Sponsors
Shirtliff_Hinds_Law.sponsor();
Github.sponsor();
Education_For_Digital_Peace.sponsor();
Fastmail.sponsor();
Mattermost.sponsor();
ProtonMail.sponsor();
Points.sponsor();
Norton_Rose_Fulbright.sponsor();
Waterloo_Engineering_Society.sponsor();
Sticker_Mule.sponsor();

team.find_speakers();
End file
// Part 6: A New Hope

event_date = new Date(2019, 9, 28);

while(current_date < event_date){
  let companies = find_companies(contacted_companies);

  // https://stackoverflow.com/questions/5915096/get-random-item-from-javascript-array
  let selected_company = companies[Math.floor(Math.random()*companies.length)];

  request_sponsorship(selected_company);
  contacted_companies.add(selected_company);
}

privacy_commissioner_of_canada.grant_accepted(Citizen_Hacks);

// Our first MLH hackathon!
let MLH = require('mlh');

class Citizen_Hacks extends MLH{
  // ...
}

// Main Sponsors
CSI_Annex.Sponsor(Citizen_Hacks);
Keybase.sponsor(Citizen_Hacks);
Feroot.sponsor(Citizen_Hacks);
Easy_DNS.sponsor(Citizen_Hacks);
Ada.sponsor(Citizen_Hacks);

// Other Sponsors
Shirtliff_Hinds_Law.sponsor(Citizen_Hacks);
Github.sponsor(Citizen_Hacks);
Education_For_Digital_Peace.sponsor(Citizen_Hacks);
Fastmail.sponsor(Citizen_Hacks);
Mattermost.sponsor(Citizen_Hacks);
ProtonMail.sponsor(Citizen_Hacks);
Points.sponsor(Citizen_Hacks);
Norton_Rose_Fulbright.sponsor(Citizen_Hacks);
Waterloo_Engineering_Society.sponsor(Citizen_Hacks);
Sticker_Mule.sponsor(Citizen_Hacks);

team.find_speakers();

View Diff

1c1
< // Part 6: A New Hope
---
> //Part 6: A New Hope
8c8
<   // https://stackoverflow.com/questions/5915096/get-random-item-from-javascript-array
---
>   //https://stackoverflow.com/questions/5915096/get-random-item-from-javascript-array
11,12c11,12
<   request_sponsorship(selected_company);
<   contacted_companies.add(selected_company);
---
>   request_sponsorship();
>   contacted_companies.add();
17c17
< // Our first MLH hackathon!
---
> //Our first MLH hackathon!
21c21
<   // ...
---
>   //...
24,41c24,41
< // Main Sponsors
< CSI_Annex.Sponsor(Citizen_Hacks);
< Keybase.sponsor(Citizen_Hacks);
< Feroot.sponsor(Citizen_Hacks);
< Easy_DNS.sponsor(Citizen_Hacks);
< Ada.sponsor(Citizen_Hacks);
< 
< // Other Sponsors
< Shirtliff_Hinds_Law.sponsor(Citizen_Hacks);
< Github.sponsor(Citizen_Hacks);
< Education_For_Digital_Peace.sponsor(Citizen_Hacks);
< Fastmail.sponsor(Citizen_Hacks);
< Mattermost.sponsor(Citizen_Hacks);
< ProtonMail.sponsor(Citizen_Hacks);
< Points.sponsor(Citizen_Hacks);
< Norton_Rose_Fulbright.sponsor(Citizen_Hacks);
< Waterloo_Engineering_Society.sponsor(Citizen_Hacks);
< Sticker_Mule.sponsor(Citizen_Hacks);
---
> //Main Sponsors
> CSI_Annex.Sponsor();
> Keybase.sponsor();
> Feroot.sponsor();
> Easy_DNS.sponsor();
> Ada.sponsor();
> 
> //Other Sponsors
> Shirtliff_Hinds_Law.sponsor();
> Github.sponsor();
> Education_For_Digital_Peace.sponsor();
> Fastmail.sponsor();
> Mattermost.sponsor();
> ProtonMail.sponsor();
> Points.sponsor();
> Norton_Rose_Fulbright.sponsor();
> Waterloo_Engineering_Society.sponsor();
> Sticker_Mule.sponsor();

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 11 remaining solutions by signing in and submitting your own entry
#12 Derek Schrock / @derekschrock - Score: 73 - 09/08/19 @ 04:56
:%s/\/\//\/\/ /<CR>}V{{:s/(/(Citizen_Hacks/<CR>?est<CR>%iselected_company<Esc><C-V>by<CR>%PZZ

0 comments


Created by: @curtischong5

12 active golfers, 30 entries

Leaderboard (lowest score wins):
35
#1 - John Braxler / @braxler

09/10/2019 at 02:51PM

35
#2 - Saki Gw / @Sakigw

09/12/2019 at 02:36PM

35
#3 - Sammit / @somemeatjain

02/06/2022 at 07:24AM

35
#4 - Luoyb / @Luoyb

10/27/2023 at 08:42AM

35
#5 - Aly Thobani / @alythobani

05/30/2024 at 02:31AM

35
#6 - Peppa Pig / @PeppaPi95550250

07/02/2024 at 06:50AM

35
#7 - nickGPT / @nickandbro

08/24/2024 at 02:13PM

36
#8 - Smylers / @Smylers2

09/16/2019 at 09:02AM

36
#9 - Lory / @Lory46845742

12/27/2019 at 11:59AM

41
#10 - garry quested / @GQuested

09/10/2019 at 09:39AM

51
#11 - theBecwar / @thebecwar

09/09/2019 at 11:32AM

73
#12 - Derek Schrock / @derekschrock

09/08/2019 at 04:56AM