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

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 9 remaining solutions by signing in and submitting your own entry
#10 JMTed / @JMTed - Score: 79 - 10/02/24 @ 18:59
+qqlr<CR>f,lr<CR>f,lr<CR>kYplc3lwasm<Esc>f xfbcewasm<Esc>f"i.w<C-P><Esc>^<C-V>kk4I <Esc>4jq7@q25Gf=i  <Esc>5jhi  <Esc>ZZ

0 comments


Created by: @Vivida1

10 active golfers, 37 entries

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

10/07/2024 at 02:53AM

49
#2 - rasputins / @rasputins

10/18/2024 at 09:06AM

49
#3 - got_windy / @insomnight

10/30/2024 at 12:10AM

49
#4 - Melih Aktop / @mlhktp

11/01/2024 at 11:59PM

49
#5 - Danilo J. S. Bellini 🥊🇧🇷 / @danilobellini

12/01/2024 at 08:54PM

63
#6 - Nimmidev / @Nimmidev

01/11/2025 at 07:53PM

72
#7 - Yusuf AKIN / @orbitstabilizer

11/09/2024 at 01:21AM

74
#8 - Neix20 / @Neix20

10/07/2024 at 01:44AM

74
#9 - Adi / @adi2004

10/16/2024 at 07:14PM

79
#10 - JMTed / @JMTed

10/02/2024 at 06:59PM