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

70 active golfers, 176 entries

Leaderboard (lowest score wins):
48
#61 - BensonLing0925 / @BensonLing0925

11/08/2024 at 08:12AM

49
#62 - Brett Collins / @brett-collins_cbhq

10/25/2024 at 12:32AM

49
#63 - thedvd98 / @thedvd98

11/17/2024 at 09:45PM

50
#64 - Brian Curless / @bwcurless

02/12/2025 at 06:19PM

50
#65 - enaygit / @enaygit

02/15/2025 at 10:25PM

52
#66 - Alexander Dyadyushenko / @GooKv

04/05/2025 at 02:32PM

52
#67 - rellarda / @rellarda

04/27/2025 at 06:05PM

53
#68 - nduncan227 / @nduncan227

04/26/2025 at 01:17AM

58
#69 - SRINIVASU SALADI / @SRINIVASUS22587

03/25/2025 at 05:11AM

71
#70 - Bader Almazmumi / @almazmumi

01/27/2025 at 12:05PM