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

Filling braces - 125 entries

Inspired by a question on CoDidact (https://software.codidact.com/posts/296501), I wondered if Vim could offer a satisfactory ‘solution’ to this problem.

  • Best score: 24
  • Best player score: 29
  • Position: #19 / 44
  • Number of attempts: 1
Even and Odd - 254 entries

separate the even numbers from the odd numbers

  • Best score: 13
  • Best player score: 62
  • Position: #54 / 55
  • Number of attempts: 5
Swap function parameters and delete all comments in python. - 956 entries

Swap function parameters and delete all comments in python.

  • Best score: 19
  • Best player score: 19
  • Position: #47 / 235
  • Number of attempts: 10
Delete the last function argument in python. - 649 entries

Delete the last function argument in this python script.

  • Best score: 6
  • Best player score: 6
  • Position: #121 / 233
  • Number of attempts: 2
Flip All Bits - 401 entries

Perform a bitwise NOT operation on each bit, meaning that bits that are 0 become 1, and those that are 1 become 0.

  • Best score: 26
  • Best player score: 38
  • Position: #48 / 123
  • Number of attempts: 2
From brakets to parens - 1306 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: 38
  • Position: #160 / 295
  • Number of attempts: 1
Create json from a .env file - 1716 entries

A simple everyday task.

  • Best score: 38
  • Best player score: 60
  • Position: #197 / 416
  • Number of attempts: 2
Reordering properties - 1372 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: 56
  • Position: #98 / 298
  • Number of attempts: 3
Sort and Tag - 737 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: 98
  • Position: #89 / 156
  • Number of attempts: 4
Changing date formats - 751 entries

Change the date format to Y/M/D.

  • Best score: 36
  • Best player score: 123
  • Position: #168 / 211
  • Number of attempts: 2
YAML to dotenv - 1637 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 28
  • Position: #213 / 342
  • Number of attempts: 3
Swap columns and transform to CSV format - 491 entries

Turn this spreadsheet output into a CSV file but first swap the columns

  • Best score: 16
  • Best player score: 18
  • Position: #97 / 176
  • Number of attempts: 4
Generate an entry for each month - 395 entries

The input file contains a URI with a month in it. Generate the URIs for all the other months up to a couple of years

  • Best score: 27
  • Best player score: 36
  • Position: #27 / 100
  • Number of attempts: 5
Fix the git merge conflicts - 351 entries

Solve the merge conflicts in the Python file

  • Best score: 36
  • Best player score: 72
  • Position: #85 / 106
  • Number of attempts: 1
Nested JSON Flattener - 137 entries

Transform a deeply nested JSON structure into a flattened key-value format where each path is represented by dot notation

  • Best score: 44
  • Best player score: 79
  • Position: #20 / 32
  • Number of attempts: 4
Replace markdown sections with numbering - 323 entries

Replace each section and subsection with their respective numbers

  • Best score: 29
  • Best player score: 75
  • Position: #54 / 90
  • Number of attempts: 2
Fix the Scala Method - 375 entries

Fix the missing semicolons and the Int type, ensure the floating point division, and remove the unnecessary return.

  • Best score: 2
  • Best player score: 24
  • Position: #63 / 124
  • Number of attempts: 1
Change class fields from camel case to snake case - 669 entries

This is the reverse of the previous challenge: https://www.vimgolf.com/challenges/9v006705493c000000000513

  • Best score: 18
  • Best player score: 18
  • Position: #51 / 154
  • Number of attempts: 5
Change class fields from snake case to camel case - 325 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #75 / 122
  • Number of attempts: 3
Noitidart
Github:

entered into 19 challenges

contributed 0 challenges