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 9v0066fbf17000000000042c

CaN yOuR ViM dO ThAt? #1

Tsoding's famous "Can your Vim do that?" https://youtu.be/Bafo3hhheHU?si=DfcT4sUEMTSAevnx&t=1091

Start file
void platform_fill_rect(i32 x, i32 y, i32 w, i32 h, u32 color)
{
}

void platform_stroke_rect(i32 x, i32 y, i32 w, i32 h, u32 color)
{
}

void platform_fill_text(i32 x, i32 y, const char *text, u32 size, u32 color, Align align)
{
}

void platform_stroke_line(i32 x1, i32 y1, i32 x2, i32 y2, u32 color)
{
}

void platform_panic(const char *file_path, i32 line, const char *message)
{
}

void platform_log(const char *message)
{
}

End file
void platform_fill_rect(i32 x, i32 y, i32 w, i32 h, u32 color)
{
    assert(0 && "TODO: platform_fill_rect");
}

void platform_stroke_rect(i32 x, i32 y, i32 w, i32 h, u32 color)
{
    assert(0 && "TODO: platform_stroke_rect");
}

void platform_fill_text(i32 x, i32 y, const char *text, u32 size, u32 color, Align align)
{
    assert(0 && "TODO: platform_fill_text");
}

void platform_stroke_line(i32 x1, i32 y1, i32 x2, i32 y2, u32 color)
{
    assert(0 && "TODO: platform_stroke_line");
}

void platform_panic(const char *file_path, i32 line, const char *message)
{
    assert(0 && "TODO: platform_panic");
}

void platform_log(const char *message)
{
    assert(0 && "TODO: platform_log");
}

View Diff

2a3
>     assert(0 && "TODO: platform_fill_rect");
6a8
>     assert(0 && "TODO: platform_stroke_rect");
10a13
>     assert(0 && "TODO: platform_fill_text");
14a18
>     assert(0 && "TODO: platform_stroke_line");
18a23
>     assert(0 && "TODO: platform_panic");
22a28
>     assert(0 && "TODO: platform_log");

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 44 remaining solutions by signing in and submitting your own entry
#45 Bader Almazmumi / @almazmumi - Score: 71 - 01/27/25 @ 12:05
qa^wyiwjo<BS>     a<BS><BS>assert(0 && "TODO: ");<Esc>hhhphgh<Esc>jjjjkq@a@a@a@a@a:w<CR>:q<CR>

0 comments


Created by: @Vivida1

45 active golfers, 105 entries

Leaderboard (lowest score wins):
41
#1 - Peppa Pig / @PeppaPigSg

10/01/2024 at 02:44PM

41
#2 - Gustav Kristensen / @gustavkrist

10/01/2024 at 04:34PM

41
#3 - JMTed / @JMTed

10/04/2024 at 06:17PM

41
#4 - Danilo J. S. Bellini 🥊🇧🇷 / @danilobellini

10/06/2024 at 06:02AM

41
#5 - Jean George / @JeanGeo20504212

10/12/2024 at 10:32PM

41
#6 - John Braxler / @braxler

10/16/2024 at 07:59PM

41
#7 - rasputins / @rasputins

10/18/2024 at 09:22PM

41
#8 - aaay-aaay / @aaay-aaay

10/25/2024 at 06:44PM

41
#9 - Melih Aktop / @mlhktp

11/02/2024 at 12:16AM

41
#10 - Realia / @realia

12/13/2024 at 02:09AM

41
#11 - Pstock7 / @Pstock7

01/27/2025 at 05:43AM

45
#12 - tobi256 / @tobi256

10/02/2024 at 02:09PM

45
#13 - Neix20 / @Neix20

10/02/2024 at 05:41PM

45
#14 - Pablo Acuna / @pacuna

10/03/2024 at 04:42PM

45
#15 - Nate Choe / @NateChoe1

10/07/2024 at 09:49AM

45
#16 - 🥚 / @schmarles_

10/20/2024 at 11:45AM

45
#17 - k1mosabe / @k1mosabe

12/08/2024 at 03:33AM

45
#18 - Anton Savelyev / @PoiXP

01/02/2025 at 02:24PM

45
#19 - ami / @quunnb

01/03/2025 at 10:43AM

45
#20 - 0xf00ff00f / @0xf00ff00f

01/10/2025 at 03:33PM

45
#21 - George Golubev / @george-gol

01/14/2025 at 10:04PM

45
#22 - kekulta / @kekulta

02/09/2025 at 02:18PM

46
#23 - atlasale / @atlasale

10/02/2024 at 08:16AM

46
#24 - Sandy1796ii / @Sandy1796ii

10/19/2024 at 05:12AM

46
#25 - guyontristan / @guyontristan

10/20/2024 at 11:25AM

46
#26 - Anton Strand / @AntonStrand

11/04/2024 at 02:46PM

46
#27 - Chloe Brett / @chloebrett

11/12/2024 at 07:02AM

46
#28 - Magnus Wahlstrand / @magnuswahlstrand

12/25/2024 at 07:33AM

46
#29 - Swaraj Dash / @swarajdash

12/25/2024 at 03:43PM

46
#30 - Joshua Goon / @Jish2

01/01/2025 at 12:02AM