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 59384eb3652ee111a0000001

From argument to object

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

Start file
organize(cupboard, 3, 2);
prioritize(bureau, 8, 7);
realize(bannister, 4, 4);
moralize(railing, 3,9);
End file
cupboard.organize(3, 2);
bureau.prioritize(8, 7);
bannister.realize(4, 4);
railing.moralize(3,9);

View Diff

1,4c1,4
< organize(cupboard, 3, 2);
< prioritize(bureau, 8, 7);
< realize(bannister, 4, 4);
< moralize(railing, 3,9);
---
> cupboard.organize(3, 2);
> bureau.prioritize(8, 7);
> bannister.realize(4, 4);
> railing.moralize(3,9);

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 454 remaining solutions by signing in and submitting your own entry
#455 William Dankspeare / @will_dankspeare - Score: 81 - 06/29/17 @ 17:31
c2w<Esc>ux2w<Esc>uwwdwxx0P<Esc>uuuu0d2w<Esc>uww10x0Pvhc.<Esc><Esc>jww8x0Pvhc.<Esc>jww11x0Pvhc.<Esc>j9x0Pvhc.<Esc>:wq<CR>

0 comments


Created by: @toddagibson

455 active golfers, 1503 entries

Leaderboard (lowest score wins):
17
#151 - Saurabh / @saurabhDuzumaki

09/11/2022 at 10:42PM

17
#152 - monika gadage / @gadage_moni

09/11/2022 at 11:41PM

17
#153 - Rohit Yadav / @yrohit250

09/12/2022 at 05:17AM

17
#154 - kunal vora / @Kunal_vora9

09/12/2022 at 05:19AM

17
#155 - Parrth Pandey / @parrth1808

09/12/2022 at 05:21AM

17
#156 - Rohit Raut / @rohit_raut_18

09/12/2022 at 07:25AM

17
#157 - Manavi Ghorpade / @ManaviGhorpade

09/12/2022 at 07:28AM

17
#158 - Daksha Chatur / @DakshaChatur

09/12/2022 at 08:36AM

17
#159 - Santosh Latpate / @sblatpate

09/12/2022 at 01:21PM

17
#160 - Janzen / @__Coos

10/04/2022 at 02:56AM

17
#161 - Mrmclarrinson / @mrmclarrinson

12/14/2022 at 10:49AM

17
#162 - fengc / @fengc

06/13/2023 at 10:15AM

17
#163 - moh ayaya / @AyayaMoh

09/24/2023 at 02:33PM

17
#164 - asirago / @asiragoo

12/13/2023 at 08:33AM

17
#165 - Don'tBeAlarmed / @DontBeAlarmed

05/29/2024 at 08:08PM

17
#166 - Peppa Pig / @PeppaPi95550250

07/02/2024 at 09:32AM

17
#167 - nickGPT / @nickandbro

08/28/2024 at 02:47AM

18
#168 - Kai Yuan / @kentyuan

06/07/2017 at 07:54PM

18
#169 - Cristian / @cris_perez_b

06/07/2017 at 09:37PM

18
#170 - James / @Dronak

06/07/2017 at 10:26PM

18
#171 - Tony Pajamas / @trash_pajamas

06/08/2017 at 04:51AM

18
#172 - klaxalk / @klaxalk

06/08/2017 at 07:25AM

18
#173 - Jan Bundesmann / @janbundesmann

06/08/2017 at 08:55AM

18
#174 - Victor Ramirez / @virako

06/08/2017 at 08:56AM

18
#175 - Daniel Hjelm / @dhjelm

06/08/2017 at 05:36PM

18
#176 - Brian Hall / @_bruab_

06/09/2017 at 02:54PM

18
#177 - Nimrod / @n1mr0d

06/10/2017 at 02:39PM

18
#178 - Daren Hayward / @DarenHayward

06/11/2017 at 09:16AM

18
#179 - James Bernsen / @jamesbernsen

06/11/2017 at 03:52PM

18
#180 - Lifepillar / @lifepillar

06/11/2017 at 08:23PM