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 [challenge ID]

Played Challenges

Rearrange array to single level - 1298 entries

The goal is to flatten the array into a single list and remove any empty elements.

  • Best score: 14
  • Best player score: 19
  • Position: #54 / 205
  • Number of attempts: 17
Rearrange array to one line - 602 entries

Rearrange the array content on only one line, and remove trailing commas

  • Best score: 13
  • Best player score: 21
  • Position: #83 / 144
  • Number of attempts: 2
Deleting text - 254 entries

Delete everything except some specific numbers.

  • Best score: 26
  • Best player score: 45
  • Position: #28 / 81
  • Number of attempts: 6
New teacher - 923 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 26
  • Position: #110 / 194
  • Number of attempts: 4
months to html list items - 1010 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 22
  • Position: #39 / 274
  • Number of attempts: 8
Populate 3D bone names list - 629 entries

Ran into this at work, excited to see how this gets optimized

  • Best score: 21
  • Best player score: 21
  • Position: #35 / 162
  • Number of attempts: 10
Remove line numbers - 736 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

  • Best score: 9
  • Best player score: 51
  • Position: #182 / 198
  • Number of attempts: 1
Find fix point of cos - 1402 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

  • Best score: 14
  • Best player score: 14
  • Position: #69 / 415
  • Number of attempts: 2
HS exam question - 1589 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 123
  • Position: #380 / 417
  • Number of attempts: 1
Reformat symbols in list - 1621 entries

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

  • Best score: 24
  • Best player score: 25
  • Position: #105 / 348
  • Number of attempts: 8
delete swap - 1786 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #356 / 555
  • Number of attempts: 5
Modernise code - 1400 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 34
  • Position: #74 / 323
  • Number of attempts: 13
vimtutor, but you can cheat - 21 entries

It's time to revisit vimtutor, but as an experienced Vim user! Your goal is to change the file to appear as if you had gone through the tutorial, but you do NOT need to actually complete the tutorial as written or do anything that doesn't result in changes to the file. You may use whatever you have in your Vim toolbelt that's allowed under VimGolf rules. The whole tutorial is too large to submit, so only the relevant lesson headers and associated practice lines are presented in this challenge. You will have to reference the tutor for the original instructions if you need them: https://raw.githubusercontent.com/vim/vim/4466ad6baa22485abb1147aca3340cced4778a66/runtime/tutor/tutor

  • Best score: 149
  • Best player score: 306
  • Position: #9 / 10
  • Number of attempts: 1
HS Final exam vimgolf - 897 entries

Change the initial file to a single line containing all names comma-separated with numbers inside parentheses.

  • Best score: 21
  • Best player score: 21
  • Position: #38 / 236
  • Number of attempts: 5
Rural Post - 4479 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 9
  • Position: #206 / 1097
  • Number of attempts: 5
Satisfy the go linter - 2391 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 24
  • Position: #255 / 471
  • Number of attempts: 8
Add quotes to ansible playbook - 954 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 9
  • Position: #213 / 305
  • Number of attempts: 3
Yo To Hello - 1130 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #401 / 524
  • Number of attempts: 2
prepend * to every non-blank line - 6308 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 10
  • Position: #448 / 1537
  • Number of attempts: 2
Quote modules - 1084 entries

Complete golang import statement.

  • Best score: 21
  • Best player score: 28
  • Position: #197 / 281
  • Number of attempts: 2
Com(m)a Trouble - 3823 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 13
  • Position: #354 / 865
  • Number of attempts: 6
Extract argument from function - 2357 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 13
  • Position: #272 / 753
  • Number of attempts: 6
Do you demand a shrubbery? - 1158 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 31
  • Position: #220 / 300
  • Number of attempts: 2
Where should I put the Newline? - 881 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #412 / 437
  • Number of attempts: 1
HTML formatting: vertical alignment for readability - 88 entries

We did this a VimGolf challenge at work and now that we have finished I want to see if you guys can come up with something even better than we could. Our best solution was 44 keystrokes.

  • Best score: 32
  • Best player score: 143
  • Position: #33 / 36
  • Number of attempts: 2
Delete unwanted lines - 411 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 46
  • Position: #228 / 229
  • Number of attempts: 1
Hector Bjernersjö
Github:

entered into 26 challenges

contributed 0 challenges