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

CaN yOuR ViM dO ThAt? #2

Tsoding's famous "Can your Vim do that?" https://www.youtube.com/watch?v=F4xc4jQO7ck&t=1429s

Start file
Example examples[] = {
    { .src_path   = "./examples/core_basic_window.c", .bin_path   = "./build/core_basic_window", },
    { .src_path   = "./examples/core_basic_screen_manager.c", .bin_path   = "./build/core_basic_screen_manager", },
    { .src_path   = "./examples/core_input_keys.c", .bin_path   = "./build/core_input_keys", },
    { .src_path   = "./examples/shapes_colors_palette.c", .bin_path   = "./build/shapes_colors_palette", },
    { .src_path   = "./examples/tsoding_ball.c", .bin_path = "./build/tsoding_ball", },
    { .src_path   = "./examples/tsoding_snake/tsoding_snake.c", .bin_path = "./build/tsoding_snake", },
    { .src_path   = "./examples/core_input_mouse_wheel.c", .bin_path   = "./build/core_input_mouse_wheel", },
    { .src_path   = "./examples/text_writing_anim.c", .bin_path   = "./build/text_writing_anim", },
};
End file
Example examples[] = {
    {
        .src_path   = "./examples/core_basic_window.c",
        .bin_path   = "./build/core_basic_window",
        .wasm_path  = "./wasm/core_basic_window.wasm",
    },
    {
        .src_path   = "./examples/core_basic_screen_manager.c",
        .bin_path   = "./build/core_basic_screen_manager",
        .wasm_path  = "./wasm/core_basic_screen_manager.wasm",
    },
    {
        .src_path   = "./examples/core_input_keys.c",
        .bin_path   = "./build/core_input_keys",
        .wasm_path  = "./wasm/core_input_keys.wasm",
    },
    {
        .src_path   = "./examples/shapes_colors_palette.c",
        .bin_path   = "./build/shapes_colors_palette",
        .wasm_path  = "./wasm/shapes_colors_palette.wasm",
    },
    {
        .src_path   = "./examples/tsoding_ball.c",
        .bin_path = "./build/tsoding_ball",
        .wasm_path  = "./wasm/tsoding_ball.wasm",
    },
    {
        .src_path   = "./examples/tsoding_snake/tsoding_snake.c",
        .bin_path = "./build/tsoding_snake",
        .wasm_path  = "./wasm/tsoding_snake.wasm",
    },
    {
        .src_path   = "./examples/core_input_mouse_wheel.c",
        .bin_path   = "./build/core_input_mouse_wheel",
        .wasm_path  = "./wasm/core_input_mouse_wheel.wasm",
    },
    {
        .src_path   = "./examples/text_writing_anim.c",
        .bin_path   = "./build/text_writing_anim",
        .wasm_path  = "./wasm/text_writing_anim.wasm",
    },
};

View Diff

2,9c2,41
<     { .src_path   = "./examples/core_basic_window.c", .bin_path   = "./build/core_basic_window", },
<     { .src_path   = "./examples/core_basic_screen_manager.c", .bin_path   = "./build/core_basic_screen_manager", },
<     { .src_path   = "./examples/core_input_keys.c", .bin_path   = "./build/core_input_keys", },
<     { .src_path   = "./examples/shapes_colors_palette.c", .bin_path   = "./build/shapes_colors_palette", },
<     { .src_path   = "./examples/tsoding_ball.c", .bin_path = "./build/tsoding_ball", },
<     { .src_path   = "./examples/tsoding_snake/tsoding_snake.c", .bin_path = "./build/tsoding_snake", },
<     { .src_path   = "./examples/core_input_mouse_wheel.c", .bin_path   = "./build/core_input_mouse_wheel", },
<     { .src_path   = "./examples/text_writing_anim.c", .bin_path   = "./build/text_writing_anim", },
---
>     {
>         .src_path   = "./examples/core_basic_window.c",
>         .bin_path   = "./build/core_basic_window",
>         .wasm_path  = "./wasm/core_basic_window.wasm",
>     },
>     {
>         .src_path   = "./examples/core_basic_screen_manager.c",
>         .bin_path   = "./build/core_basic_screen_manager",
>         .wasm_path  = "./wasm/core_basic_screen_manager.wasm",
>     },
>     {
>         .src_path   = "./examples/core_input_keys.c",
>         .bin_path   = "./build/core_input_keys",
>         .wasm_path  = "./wasm/core_input_keys.wasm",
>     },
>     {
>         .src_path   = "./examples/shapes_colors_palette.c",
>         .bin_path   = "./build/shapes_colors_palette",
>         .wasm_path  = "./wasm/shapes_colors_palette.wasm",
>     },
>     {
>         .src_path   = "./examples/tsoding_ball.c",
>         .bin_path = "./build/tsoding_ball",
>         .wasm_path  = "./wasm/tsoding_ball.wasm",
>     },
>     {
>         .src_path   = "./examples/tsoding_snake/tsoding_snake.c",
>         .bin_path = "./build/tsoding_snake",
>         .wasm_path  = "./wasm/tsoding_snake.wasm",
>     },
>     {
>         .src_path   = "./examples/core_input_mouse_wheel.c",
>         .bin_path   = "./build/core_input_mouse_wheel",
>         .wasm_path  = "./wasm/core_input_mouse_wheel.wasm",
>     },
>     {
>         .src_path   = "./examples/text_writing_anim.c",
>         .bin_path   = "./build/text_writing_anim",
>         .wasm_path  = "./wasm/text_writing_anim.wasm",
>     },

Solutions by @rasputins:

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

8 active golfers, 28 entries

Solutions by @rasputins:
49
#2 - rasputins / @rasputins

10/18/2024 at 09:06AM

51
#>5 - rasputins / @rasputins

10/18/2024 at 01:35AM

57
#>5 - rasputins / @rasputins

10/18/2024 at 01:18AM

64
#>5 - rasputins / @rasputins

10/18/2024 at 12:21AM

68
#>5 - rasputins / @rasputins

10/18/2024 at 12:18AM

75
#>7 - rasputins / @rasputins

10/17/2024 at 11:40PM

79
#>8 - rasputins / @rasputins

10/17/2024 at 10:07PM

83
#>8 - rasputins / @rasputins

10/17/2024 at 10:19PM

109
#>8 - rasputins / @rasputins

10/17/2024 at 08:43PM