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

Convert list of enums to list of localization terms - 105 entries

While making my game Piloteer, I had a large list of TaskTypes and needed to convert them to an equivalent list of localization terms, to be used when translating the game's text into different languages.

  • Best score: 75
  • Best player score: 86
  • Position: #4 / 35
  • Number of attempts: 4
From brakets to parens - 931 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: #42 / 214
  • Number of attempts: 5
π - 261 entries

1200 π chars

  • Best score: 16
  • Best player score: 16
  • Position: #13 / 65
  • Number of attempts: 9
Create json from a .env file - 1518 entries

A simple everyday task.

  • Best score: 39
  • Best player score: 39
  • Position: #32 / 353
  • Number of attempts: 8
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: 37
  • Position: #27 / 269
  • Number of attempts: 7
Sort and Tag - 676 entries

The goal is to sort these lines alphabetically, assign a unique identifier to each line in the format "[01]", "[02]", etc., and then restore the original order of the lines while preserving the assigned identifiers.

  • Best score: 36
  • Best player score: 58
  • Position: #41 / 140
  • Number of attempts: 10
Changing date formats - 687 entries

Change the date format to Y/M/D.

  • Best score: 37
  • Best player score: 52
  • Position: #41 / 188
  • Number of attempts: 2
YAML to dotenv - 1459 entries

Convert this YAML config file to a .env file.

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

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

  • Best score: 17
  • Best player score: 43
  • Position: #51 / 120
  • Number of attempts: 5
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: 41
  • Position: #41 / 91
  • Number of attempts: 2
Fix the git merge conflicts - 313 entries

Solve the merge conflicts in the Python file

  • Best score: 36
  • Best player score: 38
  • Position: #10 / 88
  • Number of attempts: 13
Nested JSON Flattener - 126 entries

Transform a deeply nested JSON structure into a flattened key-value format where each path is represented by dot notation

  • Best score: 44
  • Best player score: 44
  • Position: #4 / 29
  • Number of attempts: 11
Fix the Scala Method - 306 entries

Fix the missing semicolons and the Int type, ensure the floating point division, and remove the unnecessary return.

  • Best score: 2
  • Best player score: 22
  • Position: #44 / 98
  • Number of attempts: 5
Change class fields from camel case to snake case - 568 entries

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

  • Best score: 18
  • Best player score: 18
  • Position: #40 / 132
  • Number of attempts: 4
Change class fields from snake case to camel case - 290 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #64 / 108
  • Number of attempts: 3
Reorganize Pokémon - 772 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 18
  • Position: #37 / 214
  • Number of attempts: 3
Replace csv column if it's not empty - 255 entries

Replace the credit_score_percentile column with the value 0.0 but leave the empty ones untouched

  • Best score: 15
  • Best player score: 15
  • Position: #39 / 87
  • Number of attempts: 2
Convert plain text into a markdown table - 87 entries

Convert the table to markdown to make it more usable

  • Best score: 56
  • Best player score: 58
  • Position: #5 / 28
  • Number of attempts: 4
Change readonly files - 99 entries

Try to write a file that was marked as read-only.

  • Best score: 20
  • Best player score: 20
  • Position: #10 / 29
  • Number of attempts: 4
Markdown Blog Editing - 456 entries

Convert the given link text in start file to a markdown link list.

  • Best score: 30
  • Best player score: 30
  • Position: #12 / 107
  • Number of attempts: 6
New teacher - 1465 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 19
  • Position: #31 / 306
  • Number of attempts: 8
Replace word while reserving first letter case - 663 entries

Window -> Door window -> door Windows -> Windows windows -> windows

  • Best score: 24
  • Best player score: 34
  • Position: #68 / 126
  • Number of attempts: 6
Quicksort - 2095 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 27
  • Position: #331 / 465
  • Number of attempts: 1
Remove line numbers - 778 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: 27
  • Position: #150 / 205
  • Number of attempts: 4
Find fix point of cos - 1468 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: #82 / 431
  • Number of attempts: 4
Paste a column after a column - 2662 entries

This task is very common while using multi-cursor. What is the elegant vim way ?

  • Best score: 14
  • Best player score: 14
  • Position: #114 / 576
  • Number of attempts: 4
Filter number combinations that don't add to 11 - 424 entries

Append the sum of each line to its end, alongside an equals sign, and remove any that do not sum to 11. The ordering of lines should stay the same. Note that the combinations are semi-arbitrary and not all 4-number combinations are present in the file.

  • Best score: 27
  • Best player score: 48
  • Position: #113 / 122
  • Number of attempts: 2
Tabbed Table to Python Array - 769 entries

Not payed by the hour? So make it fast ;-) The table contains the relative occurencies of bigrams (two consecutive letters) in 1/100,000 in the german language, copy-pasted from http://www.mathe.tu-freiberg.de/~hebisch/cafe/kryptographie/bigramme.html

  • Best score: 50
  • Best player score: 59
  • Position: #84 / 184
  • Number of attempts: 1
Konrad Guzek
Github:

entered into 28 challenges

contributed 0 challenges