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

citizen_hacks_2019_part4

For the Citizen Hacks 2019 Vim competition

Start file
// Part 4: Contacting Sponsors

const request = require('request');

// Talking to sponsors
let request_sponsorship = (company_name) => {
  // remove
  request(company_name + 'sponsorship_emails', (err, res, reply_body) => {
  // remove
    if(response.statusCode != 200){
  // remove
      console.log(`${company_name} couldn't sponsor us with error:`);
  // remove
      console.log(err);
  // remove
      return;
  // remove
    }
  // remove
    if(details_fuzzy(reply_body)){
  // remove
      team.coordinate_specifics();
  // remove
    }
  // remove
  });
  // remove
};

let details_blurry = (reply) => {
  if(reply.sponsorship_tier == null or reply.reply_contract == 'not_signed' or reply.deliverables = undefined){
    return true;
  }
  return false;
}
End file
// Part 4: Contacting Sponsors

const request = require('request');

// Talking to sponsors
let request_sponsorship = (company_name) => {
  request(company_name + 'sponsorship_emails', (err, res, reply_body) => {
    if(response.statusCode != 200){
      console.log(`${company_name} couldn't sponsor us with error:`);
      console.log(err);
      return;
    }
    if(details_fuzzy(reply_body)){
      team.coordinate_specifics();
    }
  });
};

let details_fuzzy = (reply) => {
  if(reply.sponsorship_tier === null or
     reply.reply_contract === 'not_signed' or
     reply.deliverables === undefined){
    return true;
  }
  return false;
}

View Diff

6a7
>   // remove
7a9
>   // remove
8a11
>   // remove
9a13
>   // remove
10a15
>   // remove
11a17
>   // remove
12a19
>   // remove
13a21
>   // remove
14a23
>   // remove
15a25
>   // remove
16a27
>   // remove
19,22c30,31
< let details_fuzzy = (reply) => {
<   if(reply.sponsorship_tier === null or
<      reply.reply_contract === 'not_signed' or
<      reply.deliverables === undefined){
---
> let details_blurry = (reply) => {
>   if(reply.sponsorship_tier == null or reply.reply_contract == 'not_signed' or reply.deliverables = undefined){

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 Robert Verst / @r_verst - Score: 58 - 09/04/20 @ 07:05
qq/rem<CR>ddq10@q2jfbcwfuzzy<Esc>jf=i=<Esc>fra<CR>   <Esc>f=i=<Esc>fra<CR><Esc>f=i==<Esc>ZZ

0 comments


Created by: @curtischong5

11 active golfers, 22 entries

Leaderboard (lowest score wins):
37
#1 - Aly Thobani / @alythobani

05/30/2024 at 06:51PM

37
#2 - Peppa Pig / @PeppaPi95550250

07/20/2024 at 12:36AM

37
#3 - nickGPT / @nickandbro

08/24/2024 at 02:15PM

38
#4 - Tanzeel Kazi / @tanzeelkazi

08/25/2020 at 06:38PM

38
#5 - Jon Krause / @jkrause314

12/08/2020 at 04:53PM

38
#6 - John Braxler / @braxler

01/28/2021 at 07:38PM

38
#7 - Sammit / @somemeatjain

02/06/2022 at 08:40AM

41
#8 - Saki Gw / @Sakigw

09/09/2019 at 02:39PM

41
#9 - Maxim / @Maxim_at_Moscow

03/26/2020 at 05:23PM

41
#10 - Mohammad Apel Mahmod / @apel_mahmod

09/21/2023 at 12:10PM

58
#11 - Robert Verst / @r_verst

09/04/2020 at 07:05AM