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 - 627 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: 75
  • Position: #138 / 144
  • Number of attempts: 2
Reordering properties - 1050 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: #170 / 243
  • Number of attempts: 1
YAML to dotenv - 1255 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 33
  • Position: #196 / 266
  • Number of attempts: 4
Rearrange array to single level - 1649 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: #56 / 272
  • Number of attempts: 4
Rearrange array to one line - 758 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #6 / 182
  • Number of attempts: 8
Copy punctuation - 671 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 / 159
  • Number of attempts: 12
Deleting text - 325 entries

Delete everything except some specific numbers.

  • Best score: 26
  • Best player score: 49
  • Position: #78 / 101
  • Number of attempts: 1
Hex to binary - 120 entries

Convert hexadecimal numbers into binary format.

  • Best score: 29
  • Best player score: 32
  • Position: #8 / 23
  • Number of attempts: 13
Format a long line - 119 entries

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

  • Best score: 17
  • Best player score: 18
  • Position: #10 / 33
  • 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 - 1423 entries

Update the details of the new CS teacher.

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

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

  • Best score: 24
  • Best player score: 41
  • Position: #90 / 124
  • Number of attempts: 3
months to html list items - 1110 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 22
  • Position: #40 / 301
  • Number of attempts: 11
Quicksort - 2061 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: #262 / 458
  • Number of attempts: 2
Tic-Tac-Toe Grid Transformation - 414 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 / 86
  • Number of attempts: 2
Pick and sort servers from mirror list - 451 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 / 90
  • Number of attempts: 13
Populate 3D bone names list - 638 entries

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

  • Best score: 21
  • Best player score: 22
  • Position: #48 / 166
  • Number of attempts: 10
Find fix point of cos - 1444 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 / 427
  • Number of attempts: 4
Swap values inside brackets - 2523 entries

Easy challenge.

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

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

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

entered into 20 challenges

contributed 0 challenges