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

citizen_hacks_2019_part9

For the Citizen Hacks 2019 Vim competition

Start file
// Part 8: The Welcome Party

const http = require('http');

const hostname = 'csi.annex';
const port = 0906;

const server = http.createServer((res, req) => {
  res.statusCode = 200;
  res.setHeader('Content-Type', 'text/plain');
let welcome = `
Thanks for playing
`;
  res.end(welcome);
});

server.listen(port, hostname, () => {
  console.log(`Nerding out at ${hostname} on ${port}!`);
});
End file
// Part 9: The Welcome Party

const http = require('http');

const hostname = 'csi.annex';
const port = 0906;

const server = http.createServer((req, res) => {
  res.statusCode = 200;
  res.setHeader('Content-Type', 'text/plain');
let welcome = `
000000000000000000000000
0  Thanks for playing  0
000123456789987654321000
`;
  res.end(welcome);
});

server.listen(port, hostname, () => {
  console.log(`Nerding out at ${hostname} on ${port}!`);
});

View Diff

1c1
< // Part 9: The Welcome Party
---
> // Part 8: The Welcome Party
8c8
< const server = http.createServer((req, res) => {
---
> const server = http.createServer((res, req) => {
12,14c12
< 000000000000000000000000
< 0  Thanks for playing  0
< 000123456789987654321000
---
> Thanks for playing

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 8 remaining solutions by signing in and submitting your own entry
#9 theBecwar / @thebecwar - Score: 59 - 09/09/19 @ 11:23
<C-A>8Gf,dbwPldwF(p4+C0  <C-R>-  0<Esc>YPVr0Yjp3lR123456789987654321<Esc>ZZ

0 comments


#10 Michael Meixner / @meixner62 - Score: 59 - 01/24/20 @ 11:33
<C-A>8Gf,dbwPldwF(p4+C0  <C-R>-  0<Esc>YPVr0Yjp3lR123456789987654321<Esc>ZZ

0 comments


#11 nickGPT / @nickandbro - Score: 59 - 08/24/24 @ 14:11
<C-A>8Gf,dbwPldwF(p4+C0  <C-R>-  0<Esc>YPVr0Yjp3lR123456789987654321<Esc>ZZ

0 comments


Created by: @curtischong5

11 active golfers, 32 entries

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

10/13/2021 at 08:58PM

48
#2 - John Braxler / @braxler

10/15/2021 at 07:18PM

48
#3 - Zion Park / @zionpark93

12/15/2022 at 02:39PM

48
#4 - kenney / @pumpking_kiddo

07/30/2023 at 04:57PM

48
#5 - Aly Thobani / @alythobani

05/30/2024 at 02:06AM

48
#6 - Peppa Pig / @PeppaPi95550250

07/02/2024 at 06:49AM

49
#7 - Luoyb / @Luoyb

10/27/2023 at 08:29AM

54
#8 - Sammit / @somemeatjain

02/06/2022 at 06:32AM

59
#9 - theBecwar / @thebecwar

09/09/2019 at 11:23AM

59
#10 - Michael Meixner / @meixner62

01/24/2020 at 11:33AM

59
#11 - nickGPT / @nickandbro

08/24/2024 at 02:11PM