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

Change class fields from camel case to snake case - 630 entries

This is the reverse of the previous challenge: https://www.vimgolf.com/challenges/9v006705493c000000000513

  • Best score: 18
  • Best player score: 30
  • Position: #100 / 144
  • Number of attempts: 2
Copy punctuation - 723 entries

I want to copy the last line’s brackets, quotes, and commas to each line. How?

  • Best score: 19
  • Best player score: 54
  • Position: #141 / 176
  • Number of attempts: 2
New teacher - 1494 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 30
  • Position: #229 / 312
  • Number of attempts: 2
months to html list items - 1135 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 40
  • Position: #286 / 307
  • Number of attempts: 1
EDN reformat - 1217 entries

The goal is to make the code more readable and concise while maintaining its functionality.

  • Best score: 17
  • Best player score: 123
  • Position: #171 / 171
  • Number of attempts: 1
Populate 3D bone names list - 652 entries

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

  • Best score: 21
  • Best player score: 35
  • Position: #130 / 168
  • Number of attempts: 2
Remove line numbers - 779 entries

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

  • Best score: 8
  • Best player score: 43
  • Position: #180 / 206
  • Number of attempts: 1
Find fix point of cos - 1483 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: 16
  • Position: #290 / 433
  • Number of attempts: 4
vim = 22 / 7 - 475 entries

pi square vim

  • Best score: 20
  • Best player score: 27
  • Position: #84 / 135
  • Number of attempts: 3
VimGolfNight - 581 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #295 / 353
  • Number of attempts: 4
Counting in binary - 556 entries

"a" represents 0; "A" represents 1. Start from zero and count to 15.

  • Best score: 16
  • Best player score: 38
  • Position: #74 / 118
  • Number of attempts: 2
Letter case trickery - 1663 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 13
  • Position: #419 / 522
  • Number of attempts: 3
quotes inside quotes - 3195 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 18
  • Position: #989 / 1089
  • Number of attempts: 3
Number an outline - 315 entries

The indent and words are right, but the numbers are all wrong.

  • Best score: 25
  • Best player score: 130
  • Position: #79 / 79
  • Number of attempts: 1
Pairs of numbers - 387 entries

Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"

  • Best score: 26
  • Best player score: 37
  • Position: #77 / 138
  • Number of attempts: 1
Hole-in-one - 1039 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 28
  • Position: #297 / 306
  • Number of attempts: 1
Parsing with CSV: Unify lines and result. - 179 entries

col1;col2;col3;col4 A;1;4;5 A;3;4; A;1;4; # New output: col1;col2;col3;col4 A;1(2x);3;4(3x);5 any ideas?

  • Best score: 21
  • Best player score: 26
  • Position: #71 / 77
  • Number of attempts: 1
Jan Scholz
Github:

entered into 17 challenges

contributed 0 challenges