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

citizen_hacks_2019_part2

For the Citizen Hacks 2019 Vim competition

Start file
// Part 2: Assembling the Team

// assembling friends
let new_members = ['Daniel', 'Curtis', 'Michael']
add_members(group, new_members)

let fs = require('fs')
let october_diary = JSON.parse(fs.readFileSync('October_2019.json', 'utf8'))

october_diary['school'] = True
october_diary['free_time'] = 'rip'
october_diary['new_friends'] = ['Adam', 'Ahmed', 'Ethan', 'Hrithvik', 'Manvi', 'Sherwin', 'Atif', 'Nick', 'Audrey', 'Mirjana']
add_members(group, october_diary.new_friends)

let team = new CitizenHacks(group)
team.publish_website()
End file
// Part 2: Assembling the Team

// Assembling Friends
let new_members = ['Daniel', 'Curtis', 'Michael', 'Audrey', 'Mirjana'];
add_members(group, new_members);

let fs = require('fs');
let october = JSON.parse(fs.readFileSync('October_2019.json', 'utf8'));

october['school'] = true;
october['free_time'] = 'rip';
october['new_friends'] = ['Adam', 'Ahmed', 'Ethan', 'Hrithvik', 'Manvi', 'Sherwin', 'Atif', 'Nick'];
add_members(group, october.new_friends);

let team = new CitizenHacks(group);
team.publish_website();

View Diff

3,5c3,5
< // Assembling Friends
< let new_members = ['Daniel', 'Curtis', 'Michael', 'Audrey', 'Mirjana'];
< add_members(group, new_members);
---
> // assembling friends
> let new_members = ['Daniel', 'Curtis', 'Michael']
> add_members(group, new_members)
7,8c7,8
< let fs = require('fs');
< let october = JSON.parse(fs.readFileSync('October_2019.json', 'utf8'));
---
> let fs = require('fs')
> let october_diary = JSON.parse(fs.readFileSync('October_2019.json', 'utf8'))
10,13c10,13
< october['school'] = true;
< october['free_time'] = 'rip';
< october['new_friends'] = ['Adam', 'Ahmed', 'Ethan', 'Hrithvik', 'Manvi', 'Sherwin', 'Atif', 'Nick'];
< add_members(group, october.new_friends);
---
> october_diary['school'] = True
> october_diary['free_time'] = 'rip'
> october_diary['new_friends'] = ['Adam', 'Ahmed', 'Ethan', 'Hrithvik', 'Manvi', 'Sherwin', 'Atif', 'Nick', 'Audrey', 'Mirjana']
> add_members(group, october_diary.new_friends)
15,16c15,16
< let team = new CitizenHacks(group);
< team.publish_website();
\ No newline at end of file
---
> let team = new CitizenHacks(group)
> team.publish_website()
\ No newline at end of file

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 1 remaining solutions by signing in and submitting your own entry
#2 Saki Gw / @Sakigw - Score: 46 - 09/09/19 @ 10:01
8W~w~/Au<CR>gEdt]/]<CR>PVG:s:.$:&;<CR>:%s:_diary<CR>?T<CR>~ZZ

0 comments


Created by: @curtischong5

2 active golfers, 2 entries

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

09/09/2019 at 05:45PM

46
#2 - Saki Gw / @Sakigw

09/09/2019 at 10:01AM