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

From brakets to parens - 932 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: 37
  • Position: #111 / 215
  • Number of attempts: 3
Create json from a .env file - 1518 entries

A simple everyday task.

  • Best score: 39
  • Best player score: 71
  • Position: #230 / 353
  • Number of attempts: 1
Reordering properties - 1136 entries

Arrange the CSS lines for the #topbar selector based on their complete line length, from shortest to longest.

  • Best score: 24
  • Best player score: 101
  • Position: #194 / 269
  • Number of attempts: 1
Changing date formats - 687 entries

Change the date format to Y/M/D.

  • Best score: 37
  • Best player score: 1135
  • Position: #188 / 188
  • Number of attempts: 1
YAML to dotenv - 1459 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 26
  • Position: #169 / 298
  • Number of attempts: 7
Change to ascending order - 487 entries

Change each line of numbers consistently from descending to ascending order.

  • Best score: 17
  • Best player score: 153
  • Position: #103 / 120
  • Number of attempts: 1
Swap columns and transform to CSV format - 426 entries

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

  • Best score: 16
  • Best player score: 317
  • Position: #154 / 154
  • Number of attempts: 1
Generate an entry for each month - 369 entries

The input file contains a URI with a month in it. Generate the URIs for all the other months up to a couple of years

  • Best score: 27
  • Best player score: 138
  • Position: #86 / 91
  • Number of attempts: 2
Fix the git merge conflicts - 317 entries

Solve the merge conflicts in the Python file

  • Best score: 36
  • Best player score: 67
  • Position: #66 / 89
  • Number of attempts: 1
Reorganize Pokémon - 772 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 33
  • Position: #194 / 214
  • Number of attempts: 1
Remove adjacent duplicates - 666 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 21
  • Position: #55 / 167
  • Number of attempts: 6
Rearrange array to single level - 1720 entries

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

  • Best score: 14
  • Best player score: 40
  • Position: #237 / 289
  • Number of attempts: 4
Rearrange array to one line - 807 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #62 / 190
  • Number of attempts: 3
Copy punctuation - 684 entries

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

  • Best score: 19
  • Best player score: 82
  • Position: #148 / 167
  • Number of attempts: 1
New teacher - 1465 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 30
  • Position: #229 / 306
  • Number of attempts: 5
months to html list items - 1130 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 38
  • Position: #276 / 306
  • Number of attempts: 2
EDN reformat - 1209 entries

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

  • Best score: 17
  • Best player score: 72
  • Position: #160 / 170
  • Number of attempts: 2
Python dataclasses - 1248 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 36
  • Position: #266 / 311
  • Number of attempts: 5
swap number pairs - 2169 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 44
  • Position: #343 / 393
  • Number of attempts: 1
Multiline to Single Line - 750 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 5
  • Position: #261 / 319
  • Number of attempts: 4
Yo To Hello - 1154 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 10
  • Position: #408 / 535
  • Number of attempts: 2
prepend * to every non-blank line - 6380 entries

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

  • Best score: 10
  • Best player score: 12
  • Position: #818 / 1557
  • Number of attempts: 6
Add semicolons - 10923 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 12
  • Position: #1970 / 3087
  • Number of attempts: 3
Collect List - 4317 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 18
  • Position: #1097 / 1194
  • Number of attempts: 3
lovebigwei
Github:

entered into 24 challenges

contributed 0 challenges