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 4 remaining solutions by signing in and submitting your own entry
#5 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

5 active golfers, 5 entries

Leaderboard (lowest score wins):
38
#1 - Tanzeel Kazi / @tanzeelkazi

08/25/2020 at 06:38PM

41
#2 - Saki Gw / @Sakigw

09/09/2019 at 02:39PM

41
#3 - John Braxler / @braxler

09/09/2019 at 08:05PM

41
#4 - Maxim / @Maxim_at_Moscow

03/26/2020 at 05:23PM

58
#5 - Robert Verst / @r_verst

09/04/2020 at 07:05AM