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 by @haakon8855:

Unlock 3 remaining solutions by signing in and submitting your own entry
Created by: @Vivida1

32 active golfers, 77 entries

Solutions by @haakon8855:
48
#27 - Håkon Anders Strømsodd / @haakon8855

10/16/2024 at 08:52AM

48
#>27 - Håkon Anders Strømsodd / @haakon8855

10/16/2024 at 08:55AM

55
#>32 - Håkon Anders Strømsodd / @haakon8855

10/16/2024 at 08:51AM