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

10 active golfers, 25 entries

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

09/09/2019 at 05:45PM

41
#2 - Tanzeel Kazi / @tanzeelkazi

08/26/2020 at 05:19PM

41
#3 - Peter Pandorum / @PeterPandorum

08/10/2021 at 06:57AM

41
#4 - unchi / @unchi10723002

05/09/2022 at 04:44AM

41
#5 - Aly Thobani / @alythobani

05/30/2024 at 07:51PM

41
#6 - Peppa Pig / @PeppaPigSg

07/02/2024 at 06:59AM

41
#7 - nickGPT / @nickandbro

08/24/2024 at 02:17PM

43
#8 - せいほう / @FICSQF

06/14/2020 at 07:45AM

43
#9 - Sammit / @somemeatjain

02/06/2022 at 12:11PM

46
#10 - Saki Gw / @Sakigw

09/09/2019 at 10:01AM