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

Swap function parameters and delete all comments in python. - 643 entries

Swap function parameters and delete all comments in python.

  • Best score: 19
  • Best player score: 24
  • Position: #61 / 173
  • Number of attempts: 1
Flip All Bits - 313 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: 46
  • Position: #58 / 100
  • Number of attempts: 1
Find the devices that have no revoked time, and extract out the duration left on their leases. - 169 entries

Extract non-revoked devices and the duration of their leases.

  • Best score: 50
  • Best player score: 57
  • Position: #9 / 48
  • Number of attempts: 4
Convert list of enums to list of localization terms - 183 entries

While making my game Piloteer, I had a large list of TaskTypes and needed to convert them to an equivalent list of localization terms, to be used when translating the game's text into different languages.

  • Best score: 75
  • Best player score: 119
  • Position: #36 / 60
  • Number of attempts: 2
From brakets to parens - 1252 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: 41
  • Position: #185 / 278
  • Number of attempts: 2
π - 321 entries

1200 π chars

  • Best score: 16
  • Best player score: 17
  • Position: #34 / 79
  • Number of attempts: 6
Create json from a .env file - 1637 entries

A simple everyday task.

  • Best score: 38
  • Best player score: 67
  • Position: #238 / 401
  • Number of attempts: 1
Reordering properties - 1308 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: 67
  • Position: #128 / 293
  • Number of attempts: 1
Changing date formats - 725 entries

Change the date format to Y/M/D.

  • Best score: 37
  • Best player score: 65
  • Position: #70 / 204
  • Number of attempts: 1
YAML to dotenv - 1581 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 16
  • Position: #64 / 330
  • Number of attempts: 7
Change to ascending order - 516 entries

Change each line of numbers consistently from descending to ascending order.

  • Best score: 17
  • Best player score: 51
  • Position: #75 / 129
  • Number of attempts: 1
Swap columns and transform to CSV format - 460 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #71 / 168
  • Number of attempts: 2
Generate an entry for each month - 384 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: 32
  • Position: #20 / 95
  • Number of attempts: 3
Fix the git merge conflicts - 342 entries

Solve the merge conflicts in the Python file

  • Best score: 36
  • Best player score: 55
  • Position: #44 / 102
  • Number of attempts: 1
Nested JSON Flattener - 133 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: 56
  • Position: #14 / 31
  • Number of attempts: 6
The Fibonacci Spacer - 169 entries

Split the words, remove punctuation and add spaces before each line following the Fibonacci sequence (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89)

  • Best score: 14
  • Best player score: 75
  • Position: #42 / 51
  • Number of attempts: 1
Replace markdown sections with numbering - 321 entries

Replace each section and subsection with their respective numbers

  • Best score: 29
  • Best player score: 50
  • Position: #27 / 89
  • Number of attempts: 1
Fix the Scala Method - 350 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: 22
  • Position: #48 / 117
  • Number of attempts: 2
Change class fields from camel case to snake case - 651 entries

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

  • Best score: 18
  • Best player score: 21
  • Position: #67 / 149
  • Number of attempts: 2
Change class fields from snake case to camel case - 318 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #69 / 120
  • Number of attempts: 1
Reorganize Pokémon - 858 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 19
  • Position: #71 / 235
  • Number of attempts: 6
Replace csv column if it's not empty - 293 entries

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

  • Best score: 15
  • Best player score: 15
  • Position: #41 / 97
  • Number of attempts: 3
Convert plain text into a markdown table - 102 entries

Convert the table to markdown to make it more usable

  • Best score: 56
  • Best player score: 72
  • Position: #12 / 33
  • Number of attempts: 3
Change readonly files - 117 entries

Try to write a file that was marked as read-only.

  • Best score: 20
  • Best player score: 20
  • Position: #11 / 35
  • Number of attempts: 5
extract struct tag in go - 157 entries

Can you extract all struct tags in the fewest keystrokes possible?

  • Best score: 29
  • Best player score: 40
  • Position: #20 / 48
  • Number of attempts: 2
CaN yOuR ViM dO ThAt? #2 - 106 entries

Tsoding's famous "Can your Vim do that?" https://www.youtube.com/watch?v=F4xc4jQO7ck&t=1429s

  • Best score: 49
  • Best player score: 57
  • Position: #10 / 28
  • Number of attempts: 2
CaN yOuR ViM dO ThAt? #1 - 292 entries

Tsoding's famous "Can your Vim do that?" https://youtu.be/Bafo3hhheHU?si=DfcT4sUEMTSAevnx&t=1091

  • Best score: 41
  • Best player score: 42
  • Position: #32 / 115
  • Number of attempts: 4
Append leading hyphen count to each line - 141 entries

Append the number of leading hyphens to the end of each line.

  • Best score: 23
  • Best player score: 25
  • Position: #24 / 40
  • Number of attempts: 3
Move list of uuids into a SQL query - 245 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: 68
  • Position: #48 / 82
  • Number of attempts: 2
Markdown Blog Editing - 476 entries

Convert the given link text in start file to a markdown link list.

  • Best score: 30
  • Best player score: 44
  • Position: #50 / 113
  • Number of attempts: 2
Search different SQL column with similar where clause - 360 entries

Replace a column in the where clause and convert all numbers from text to numeric, by replacing the leading 0 with the code 359.

  • Best score: 22
  • Best player score: 23
  • Position: #30 / 85
  • Number of attempts: 4
Remove adjacent duplicates - 718 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 21
  • Position: #61 / 179
  • Number of attempts: 5
Move to corresponding lines - 324 entries

Move the values to the corresponding lines.

  • Best score: 16
  • Best player score: 17
  • Position: #8 / 75
  • Number of attempts: 11
Rearrange array to single level - 1811 entries

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

  • Best score: 14
  • Best player score: 21
  • Position: #96 / 306
  • Number of attempts: 7
Rearrange array to one line - 862 entries

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

  • Best score: 13
  • Best player score: 20
  • Position: #108 / 202
  • Number of attempts: 1
Rafe Murray
Github:

entered into 35 challenges

contributed 0 challenges