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 - 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: 37
  • Position: #160 / 309
  • Number of attempts: 3
Create json from a .env file - 1773 entries

A simple everyday task.

  • Best score: 38
  • Best player score: 71
  • Position: #279 / 431
  • Number of attempts: 1
Reordering properties - 1385 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: #223 / 302
  • Number of attempts: 1
Changing date formats - 774 entries

Change the date format to Y/M/D.

  • Best score: 36
  • Best player score: 1135
  • Position: #213 / 213
  • Number of attempts: 1
YAML to dotenv - 1654 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 26
  • Position: #194 / 347
  • Number of attempts: 7
Change to ascending order - 566 entries

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

  • Best score: 17
  • Best player score: 153
  • Position: #120 / 138
  • Number of attempts: 1
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: 317
  • Position: #183 / 184
  • Number of attempts: 1
Generate an entry for each month - 398 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: #96 / 102
  • Number of attempts: 2
Fix the git merge conflicts - 394 entries

Solve the merge conflicts in the Python file

  • Best score: 36
  • Best player score: 67
  • Position: #83 / 111
  • Number of attempts: 1
Reorganize Pokémon - 902 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 33
  • Position: #225 / 251
  • Number of attempts: 1
Remove adjacent duplicates - 732 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 21
  • Position: #59 / 187
  • Number of attempts: 6
Rearrange array to single level - 1832 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: #253 / 308
  • Number of attempts: 4
Rearrange array to one line - 907 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #72 / 209
  • Number of attempts: 3
Copy punctuation - 760 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: #168 / 188
  • Number of attempts: 1
New teacher - 1534 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 30
  • Position: #242 / 322
  • Number of attempts: 5
months to html list items - 1161 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 38
  • Position: #284 / 314
  • Number of attempts: 2
EDN reformat - 1233 entries

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

  • Best score: 17
  • Best player score: 72
  • Position: #163 / 174
  • Number of attempts: 2
Python dataclasses - 1277 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 36
  • Position: #279 / 325
  • Number of attempts: 5
swap number pairs - 2174 entries

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

  • Best score: 7
  • Best player score: 44
  • Position: #345 / 395
  • Number of attempts: 1
Multiline to Single Line - 766 entries

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

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

Simply Turn Yo To Hello

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

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

  • Best score: 7
  • Best player score: 12
  • Position: #822 / 1566
  • Number of attempts: 6
Add semicolons - 10966 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 12
  • Position: #1980 / 3100
  • Number of attempts: 3
Collect List - 4342 entries

Convert to comma separated list.

  • Best score: 7
  • Best player score: 18
  • Position: #1103 / 1200
  • Number of attempts: 3
lovebigwei
Github:

entered into 24 challenges

contributed 0 challenges