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

Change class fields from snake case to camel case - 150 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #17 / 56
  • Number of attempts: 2
Reorganize Pokémon - 301 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 23
  • Position: #64 / 80
  • Number of attempts: 3
Replace csv column if it's not empty - 93 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: #33 / 38
  • Number of attempts: 2
Move list of uuids into a SQL query - 68 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: #28 / 28
  • Number of attempts: 1
Fix timezone format - 225 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: #62 / 75
  • Number of attempts: 4
Rearrange array to single level - 1298 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: #138 / 205
  • Number of attempts: 6
Rearrange array to one line - 602 entries

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

  • Best score: 13
  • Best player score: 24
  • Position: #99 / 144
  • Number of attempts: 8
Copy punctuation - 487 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: #58 / 121
  • Number of attempts: 3
New teacher - 923 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 31
  • Position: #165 / 194
  • Number of attempts: 2
months to html list items - 1010 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 27
  • Position: #165 / 274
  • Number of attempts: 3
Pick and sort servers from mirror list - 431 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: #71 / 87
  • Number of attempts: 10
Populate 3D bone names list - 629 entries

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

  • Best score: 21
  • Best player score: 30
  • Position: #97 / 162
  • Number of attempts: 3
Find fix point of cos - 1402 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: 15
  • Position: #253 / 415
  • Number of attempts: 1
Paste a column after a column - 2537 entries

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

  • Best score: 14
  • Best player score: 50
  • Position: #486 / 553
  • Number of attempts: 1
Reformat symbols in list - 1621 entries

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

  • Best score: 24
  • Best player score: 35
  • Position: #230 / 348
  • Number of attempts: 2
Poorly indented Python comments - 1315 entries

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

  • Best score: 15
  • Best player score: 79
  • Position: #196 / 221
  • Number of attempts: 2
delete swap - 1786 entries

delete all swap

  • Best score: 5
  • Best player score: 12
  • Position: #486 / 555
  • Number of attempts: 2
Rural Post - 4479 entries

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

  • Best score: 9
  • Best player score: 13
  • Position: #663 / 1097
  • Number of attempts: 7
One number per line - 18727 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 28
  • Position: #3588 / 3864
  • Number of attempts: 1
Swap values inside brackets - 2496 entries

Easy challenge.

  • Best score: 14
  • Best player score: 29
  • Position: #534 / 579
  • Number of attempts: 2
Unsemantic linewrapping - 928 entries

[Inspired by a blog post I read: https://scott.mn/2014/02/21/semantic_linewrapping/. Text adapted.] Sometimes when editing a Markdown file, I wrap the lines semantically. Instead of inserting a newline at 70 columns (or whatever), or making paragraphs one long line, I put in newlines at a point that seems logical to me. This may seem silly, but it produces better diffs. Semantic linewrapping also makes editing snappier. I can delete, edit or insert sentences easily using linewise operations. Code-oriented text editors like Vim and [REDACTED] are really good at this kind of manipulation. Editing text that hasn't been wrapped semantically is a pain, though:

  • Best score: 9
  • Best player score: 19
  • Position: #223 / 231
  • Number of attempts: 1
Applying same text modification in several lines - 2880 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 12
  • Best player score: 16
  • Position: #620 / 851
  • Number of attempts: 1
Extract wireshark capture filter - 216 entries

Extract wireshark capture filter from IP plan

  • Best score: 25
  • Best player score: 34
  • Position: #61 / 72
  • Number of attempts: 2
From argument to object - 1508 entries

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

  • Best score: 17
  • Best player score: 22
  • Position: #401 / 458
  • Number of attempts: 1
Team names - 1836 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 20
  • Position: #500 / 588
  • Number of attempts: 2
Array transposition - 2417 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 43
  • Position: #410 / 448
  • Number of attempts: 1
replacing each line of a block selection - 2999 entries

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

  • Best score: 18
  • Best player score: 37
  • Position: #754 / 777
  • Number of attempts: 2
switch variable - 5071 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 15
  • Position: #1543 / 1748
  • Number of attempts: 1
Make it more readable - 2005 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 23
  • Position: #618 / 650
  • Number of attempts: 2
Sort and add attributes - 1451 entries

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

  • Best score: 33
  • Best player score: 36
  • Position: #434 / 563
  • Number of attempts: 2
Simple text editing with Vim - 12811 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #2018 / 3694
  • Number of attempts: 4
Reformat/Refactor a Golfer Class - 6982 entries

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

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

entered into 32 challenges

contributed 0 challenges