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 - 275 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: 25
  • Best player score: 75
  • Position: #62 / 65
  • Number of attempts: 2
Reordering properties - 880 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: 98
  • Position: #148 / 209
  • Number of attempts: 1
YAML to dotenv - 1073 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 33
  • Position: #176 / 236
  • Number of attempts: 4
Rearrange array to single level - 1570 entries

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

  • Best score: 14
  • Best player score: 19
  • Position: #52 / 262
  • Number of attempts: 4
Rearrange array to one line - 724 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #6 / 176
  • Number of attempts: 8
Copy punctuation - 606 entries

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

  • Best score: 19
  • Best player score: 19
  • Position: #5 / 152
  • Number of attempts: 12
Deleting text - 296 entries

Delete everything except some specific numbers.

  • Best score: 26
  • Best player score: 49
  • Position: #74 / 96
  • Number of attempts: 1
Hex to binary - 106 entries

Convert hexadecimal numbers into binary format.

  • Best score: 29
  • Best player score: 32
  • Position: #7 / 22
  • Number of attempts: 13
Format a long line - 99 entries

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

  • Best score: 17
  • Best player score: 18
  • Position: #8 / 31
  • Number of attempts: 6
Find anomalies - 161 entries

There is one special character per line

  • Best score: 30
  • Best player score: 40
  • Position: #22 / 43
  • Number of attempts: 7
New teacher - 1393 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 19
  • Position: #11 / 291
  • Number of attempts: 11
Replace word while reserving first letter case - 637 entries

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

  • Best score: 24
  • Best player score: 41
  • Position: #89 / 123
  • Number of attempts: 3
months to html list items - 1098 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 22
  • Position: #40 / 299
  • Number of attempts: 11
Quicksort - 2049 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: #261 / 454
  • Number of attempts: 2
Tic-Tac-Toe Grid Transformation - 413 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: 112
  • Position: #43 / 85
  • Number of attempts: 2
Pick and sort servers from mirror list - 450 entries

Retrieve the primary server for each country from a mirror list file and organize them alphabetically by country name. Given a mirror list file containing server information for various countries, the objective is to extract the primary server from each country and then arrange these servers in alphabetical order based on the respective country names.

  • Best score: 28
  • Best player score: 30
  • Position: #35 / 89
  • Number of attempts: 13
Populate 3D bone names list - 636 entries

Ran into this at work, excited to see how this gets optimized

  • Best score: 21
  • Best player score: 22
  • Position: #47 / 164
  • Number of attempts: 10
Find fix point of cos - 1432 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: #68 / 424
  • Number of attempts: 4
Swap values inside brackets - 2522 entries

Easy challenge.

  • Best score: 13
  • Best player score: 14
  • Position: #110 / 586
  • Number of attempts: 6
Extract argument from function - 2372 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #271 / 757
  • Number of attempts: 7
Blake Raymond
Github:

entered into 20 challenges

contributed 0 challenges