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

Find the devices that have no revoked time, and extract out the duration left on their leases. - 37 entries

Extract non-revoked devices and the duration of their leases.

  • Best score: 50
  • Best player score: 59
  • Position: #5 / 15
  • Number of attempts: 2
Convert list of enums to list of localization terms - 100 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: #3 / 34
  • Number of attempts: 2
From brakets to parens - 915 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: 61
  • Position: #188 / 210
  • Number of attempts: 1
π - 253 entries

1200 π chars

  • Best score: 16
  • Best player score: 24
  • Position: #37 / 63
  • Number of attempts: 5
Create json from a .env file - 1502 entries

A simple everyday task.

  • Best score: 39
  • Best player score: 53
  • Position: #129 / 350
  • Number of attempts: 2
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: 57
  • Position: #40 / 140
  • Number of attempts: 8
Changing date formats - 686 entries

Change the date format to Y/M/D.

  • Best score: 37
  • Best player score: 37
  • Position: #9 / 187
  • Number of attempts: 22
YAML to dotenv - 1436 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 16
  • Position: #53 / 296
  • Number of attempts: 15
Replace markdown sections with numbering - 303 entries

Replace each section and subsection with their respective numbers

  • Best score: 29
  • Best player score: 53
  • Position: #29 / 80
  • Number of attempts: 5
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: #63 / 108
  • Number of attempts: 2
Reorganize Pokémon - 764 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 18
  • Position: #36 / 212
  • Number of attempts: 5
Append leading hyphen count to each line - 126 entries

Append the number of leading hyphens to the end of each line.

  • Best score: 23
  • Best player score: 23
  • Position: #8 / 35
  • Number of attempts: 11
Remove adjacent duplicates - 666 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 19
  • Position: #20 / 167
  • Number of attempts: 7
Deleting text - 329 entries

Delete everything except some specific numbers.

  • Best score: 26
  • Best player score: 45
  • Position: #58 / 103
  • Number of attempts: 1
New teacher - 1465 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 24
  • Position: #121 / 306
  • Number of attempts: 4
months to html list items - 1130 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 25
  • Position: #138 / 306
  • Number of attempts: 2
Quicksort - 2094 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: 24
  • Position: #285 / 464
  • Number of attempts: 3
Tic-Tac-Toe Grid Transformation - 449 entries

Your mission is to efficiently convert the original Tic-Tac-Toe grid, represented by 'x's and 'o's, into a neat and well-organized game board.

  • Best score: 56
  • Best player score: 56
  • Position: #7 / 87
  • Number of attempts: 15
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: 16
  • Position: #202 / 576
  • Number of attempts: 5
simple replacements - 1861 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 24
  • Position: #233 / 399
  • Number of attempts: 9
Extract argument from function - 2379 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 13
  • Position: #277 / 760
  • Number of attempts: 2
Letterbox - 161 entries

Make a box!

  • Best score: 35
  • Best player score: 208
  • Position: #30 / 30
  • Number of attempts: 1
The D a n k Side of the Moon - 64 entries

You're making a vaporwave cover of The Dark Side of the Moon. So for the tracklisting, you want to: 1. Change the track names to v a p o r c a s e 2. Double the track lengths (since you're slowing them down). Well... let's just double the minutes.

  • Best score: 40
  • Best player score: 40
  • Position: #8 / 19
  • Number of attempts: 7
Adam's challenge - 1010 entries

Change both normal to bold and 4 by 2. Adam Wathan challenge this on twitter . He did it in 11 keystrokes on Sublime.

  • Best score: 18
  • Best player score: 22
  • Position: #204 / 277
  • Number of attempts: 1
Create Leading Zeros - 253 entries

Create leading zeros only for id columns. Please use generic approach!

  • Best score: 23
  • Best player score: 23
  • Position: #11 / 85
  • Number of attempts: 8
Fiddle percentages into real numbers - 880 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 13
  • Position: #167 / 295
  • Number of attempts: 7
Free hyphen! - 182 entries

Just like "Inner hyphens", but I'm giving you a free hyphen to play with. Will your solution be any different?

  • Best score: 9
  • Best player score: 9
  • Position: #37 / 92
  • Number of attempts: 4
Vim's not included features - 250 entries

Filter not included (-) features in a hypothetical installation of vim.

  • Best score: 23
  • Best player score: 32
  • Position: #42 / 67
  • Number of attempts: 6
Array transposition - 2444 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 25
  • Position: #299 / 453
  • Number of attempts: 8
Condensed Cases - 811 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 12
  • Position: #67 / 249
  • Number of attempts: 4
Happy TvvO - 432 entries

Don’t forget the past, learn from it. Happy New Year.

  • Best score: 12
  • Best player score: 12
  • Position: #158 / 207
  • Number of attempts: 5
A HAPPY NEW YEAR 2014 ! - 10720 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2531 / 3703
  • Number of attempts: 1
Vertical Limit - 2610 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 21
  • Position: #109 / 771
  • Number of attempts: 4
replacing each line of a block selection - 3026 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 19
  • Position: #235 / 783
  • Number of attempts: 8
Remove noise from HTTP log - 732 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 15
  • Position: #150 / 278
  • Number of attempts: 2
Shebangs for all - 2062 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 11
  • Position: #79 / 525
  • Number of attempts: 10

Contributed Challenges

Convert list of enums to list of localization terms - 100 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.

Find the devices that have no revoked time, and extract out the duration left on their leases. - 37 entries

Extract non-revoked devices and the duration of their leases.

Whitaker Trebella
Github:

entered into 36 challenges

contributed 2 challenges