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

Replace csv column if it's not empty - 29 entries

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

  • Best score: 15
  • Best player score: 30
  • Position: #10 / 13
  • Number of attempts: 2
Move list of uuids into a SQL query - 39 entries

Take the list of UUIDs and use them as a filter in the where statement of a SQL query

  • Best score: 57
  • Best player score: 83
  • Position: #18 / 18
  • Number of attempts: 1
Fix timezone format - 183 entries

Add the missing T and Z in the datetime field. There should be a T instead of the space, and a Z at the end of the datetime. `2024-08-31 18:32:00;` -> `2024-08-31T18:32:00Z;`

  • Best score: 15
  • Best player score: 20
  • Position: #49 / 60
  • Number of attempts: 4
Rearrange array to single level - 1092 entries

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

  • Best score: 14
  • Best player score: 31
  • Position: #119 / 184
  • Number of attempts: 6
Rearrange array to one line - 521 entries

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

  • Best score: 13
  • Best player score: 24
  • Position: #86 / 129
  • Number of attempts: 8
Copy punctuation - 419 entries

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

  • Best score: 19
  • Best player score: 34
  • Position: #52 / 106
  • Number of attempts: 3
New teacher - 836 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 31
  • Position: #148 / 174
  • Number of attempts: 2
months to html list items - 957 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 27
  • Position: #156 / 254
  • Number of attempts: 3
Pick and sort servers from mirror list - 409 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: 50
  • Position: #68 / 84
  • Number of attempts: 10
Paste a column after a column - 2504 entries

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

  • Best score: 14
  • Best player score: 50
  • Position: #480 / 547
  • Number of attempts: 1
Reformat symbols in list - 1606 entries

Saw this in some lecture, easy reformatting using multiple cursor in VS Code

  • Best score: 24
  • Best player score: 35
  • Position: #227 / 344
  • Number of attempts: 2
Poorly indented Python comments - 1313 entries

Fix the alignment of some Python comments as quickly as possible.

  • Best score: 15
  • Best player score: 79
  • Position: #195 / 220
  • Number of attempts: 2
delete swap - 1768 entries

delete all swap

  • Best score: 5
  • Best player score: 12
  • Position: #484 / 548
  • Number of attempts: 2
Rural Post - 4460 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 13
  • Position: #659 / 1092
  • Number of attempts: 7
Sort and add attributes - 1421 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 36
  • Position: #425 / 552
  • Number of attempts: 2
Simple text editing with Vim - 12680 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 14
  • Position: #2008 / 3665
  • Number of attempts: 4
Reformat/Refactor a Golfer Class - 6866 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 28
  • Best player score: 73
  • Position: #1617 / 1681
  • Number of attempts: 2
Alex Elarbee
Github:

entered into 17 challenges

contributed 0 challenges