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

Filling braces - 481 entries

Inspired by a question on CoDidact (https://software.codidact.com/posts/296501), I wondered if Vim could offer a satisfactory ‘solution’ to this problem.

  • Best score: 21
  • Best player score: 28
  • Position: #68 / 157
  • Number of attempts: 2
Even and Odd - 393 entries

separate the even numbers from the odd numbers

  • Best score: 13
  • Best player score: 14
  • Position: #34 / 101
  • Number of attempts: 5
Swap function parameters and delete all comments in python. - 1078 entries

Swap function parameters and delete all comments in python.

  • Best score: 19
  • Best player score: 21
  • Position: #89 / 263
  • Number of attempts: 1
Delete the last function argument in python. - 730 entries

Delete the last function argument in this python script.

  • Best score: 6
  • Best player score: 6
  • Position: #92 / 262
  • Number of attempts: 4
From brakets to parens - 1356 entries

This is one of the most common problem when you wrap an array for error handling. Vim is useful when you convert foo[i][j][k] into foo(i, j, k) for many times.

  • Best score: 24
  • Best player score: 25
  • Position: #63 / 309
  • Number of attempts: 6
Create json from a .env file - 1773 entries

A simple everyday task.

  • Best score: 38
  • Best player score: 52
  • Position: #140 / 431
  • Number of attempts: 5
YAML to dotenv - 1654 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 16
  • Position: #70 / 347
  • Number of attempts: 8
Swap columns and transform to CSV format - 516 entries

Turn this spreadsheet output into a CSV file but first swap the columns

  • Best score: 16
  • Best player score: 17
  • Position: #80 / 184
  • Number of attempts: 5
Change class fields from camel case to snake case - 678 entries

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

  • Best score: 18
  • Best player score: 24
  • Position: #95 / 160
  • Number of attempts: 2
Change class fields from snake case to camel case - 336 entries

Change the class fields in this Scala class from snake case to camel case

  • Best score: 13
  • Best player score: 13
  • Position: #54 / 127
  • Number of attempts: 5
Format a long line - 134 entries

Reformat long lines (gq), textwidth=78, no trailing spaces.

  • Best score: 17
  • Best player score: 27
  • Position: #21 / 37
  • Number of attempts: 2
Mirror image - 144 entries

Add the second eye

  • Best score: 15
  • Best player score: 17
  • Position: #11 / 39
  • Number of attempts: 6
V to the i - 4890 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 7
  • Position: #809 / 1917
  • Number of attempts: 3
Wrap the text of an email message to 79 characters - 885 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Position: #333 / 458
  • Number of attempts: 3
A grid of punctuation - 156 entries

Create a checkerboard of = and - in an 80×24 grid!

  • Best score: 16
  • Best player score: 18
  • Position: #45 / 65
  • Number of attempts: 3
learn vim in short time - 248 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #135 / 168
  • Number of attempts: 1
Change name of a variable - 197 entries

Replace the name of the $variable with the fastest move possible. The challenge is having a command that allow you to easily change the variable name even if its indented.

  • Best score: 9
  • Best player score: 9
  • Position: #137 / 148
  • Number of attempts: 2
Gray area - 765 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 12
  • Position: #135 / 277
  • Number of attempts: 3
Don't know what this is - 2070 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 13
  • Position: #282 / 596
  • Number of attempts: 4
REDRUM - 203 entries

If you remember "The Shinning", the first time you saw the bloody word REDRUM you probably thinked "What the Hell is that?" Well, then you know that you need a little help from a looking-glass to make sense of it. Now it's time to use vim like a mirror to reveal the message.

  • Best score: 14
  • Best player score: 14
  • Position: #24 / 71
  • Number of attempts: 3
Alphabetize the directory - 331 entries

Put the contacts and their information in alphabetical order.

  • Best score: 30
  • Best player score: 33
  • Position: #45 / 104
  • Number of attempts: 8
Reformat long lines - 390 entries

Rearrange this ruby method call to put each parameter on its own line. Could become a useful macro.

  • Best score: 15
  • Best player score: 15
  • Position: #32 / 142
  • Number of attempts: 6
Change the content of a string - 1810 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #250 / 659
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 7737 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 7
  • Best player score: 35
  • Position: #433 / 1901
  • Number of attempts: 3
raylmorris
Github:

entered into 24 challenges

contributed 0 challenges