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

citizen_hacks_2019_part5

For the Citizen Hacks 2019 Vim competition

Start file
// Part 5: Bad News

break;
venue
.secured = false;
const timeLeft = "1 month";

let decideFate
= (fate) => {
 
switch(fate){
   
case "carryOn":
      team
.dropOutOfSchool();
      team
.getNewJob("citizenHacks");
   
case "cancelEvent":
      let brokenHearts
= "allOfThem";
   
case "postponeEvent":
      let brokenHearts
= "allOfThem";
      let hope
= "beyondTheHorizon";
 
}
}
decide_fate
("postpone_event");

/* Our Plan
Month: Jan Study
Month: Feb Study
Month: Mar Study
Month: Apr Study
Month: May Plan
Month: Jun Plan
Month: Jul Plan
Month: Aug Plan
Month: Sep Cross Fingers
*/
End file
// Part 5: Bad News

break;
venue
.secured = false;
const time_left = "1 month";

let decide_fate
= (fate) => {
 
switch(fate){
   
case "carry_on":
      team
.drop_out_of_school();
      team
.get_new_job("Citizen_Hacks");
     
break;
   
case "cancel_event":
      let broken_hearts
= "all_of_them";
     
break;
   
case "postpone_event":
      let broken_hearts
= "all_of_them";
      let hope
= "beyond_the_horizon";
     
break;
 
}
}

decide_fate
("postpone_event");

/* Our Plan
Month Jan: Study
Month Feb: Study
Month Mar: Study
Month Apr: Study
Month May: Plan
Month Jun: Plan
Month Jul: Plan
Month Aug: Plan
Month Sep: Cross Fingers
*/

View Diff

5c5
< const time_left = "1 month";
---
> const timeLeft = "1 month";
7c7
< let decide_fate = (fate) => {
---
> let decideFate = (fate) => {
9,19c9,16
<     case "carry_on":
<       team.drop_out_of_school();
<       team.get_new_job("Citizen_Hacks");
<       break;
<     case "cancel_event":
<       let broken_hearts = "all_of_them";
<       break;
<     case "postpone_event":
<       let broken_hearts = "all_of_them";
<       let hope = "beyond_the_horizon";
<       break;
---
>     case "carryOn":
>       team.dropOutOfSchool();
>       team.getNewJob("citizenHacks");
>     case "cancelEvent":
>       let brokenHearts = "allOfThem";
>     case "postponeEvent":
>       let brokenHearts = "allOfThem";
>       let hope = "beyondTheHorizon";
22d18
<
26,34c22,30
< Month Jan: Study
< Month Feb: Study
< Month Mar: Study
< Month Apr: Study
< Month May: Plan
< Month Jun: Plan
< Month Jul: Plan
< Month Aug: Plan
< Month Sep: Cross Fingers
---
> Month: Jan Study
> Month: Feb Study
> Month: Mar Study
> Month: Apr Study
> Month: May Plan
> Month: Jun Plan
> Month: Jul Plan
> Month: Aug Plan
> Month: Sep Cross Fingers

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 10 remaining solutions by signing in and submitting your own entry
#11 Derek Schrock / @derekschrock - Score: 66 - 09/08/19 @ 04:41
jqq/[A-Z]<CR>i_<Esc>l~q18@q2jo<Esc>qq/^M<CR>ExEpq8@q?cit<CR>~fh~obreak;<Esc>ddP2jp3jpZZ

0 comments


Created by: @curtischong5

11 active golfers, 32 entries

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

09/10/2019 at 02:28PM

48
#2 - Aly Thobani / @alythobani

05/30/2024 at 05:41PM

48
#3 - Peppa Pig / @PeppaPigSg

07/02/2024 at 06:52AM

48
#4 - nickGPT / @nickandbro

08/24/2024 at 02:14PM

49
#5 - Sammit / @somemeatjain

02/06/2022 at 08:07AM

49
#6 - Luoyb / @Luoyb

10/27/2023 at 09:24AM

50
#7 - quemeraisc / @quemeraisc

11/25/2020 at 05:20PM

52
#8 - Saki Gw / @Sakigw

09/10/2019 at 08:53AM

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

09/09/2019 at 03:23PM

57
#10 - Mats Faugli / @matsfaugli

05/04/2020 at 01:00PM

66
#11 - Derek Schrock / @derekschrock

09/08/2019 at 04:41AM