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

hexagram binary tree - 86 entries

generate the binary tree that represents all possible hexagrams found in the book of changes (易经)

  • Best score: 24
  • Best player score: 88
  • Position: #20 / 21
  • Number of attempts: 1
Swap function parameters and delete all comments in python. - 923 entries

Swap function parameters and delete all comments in python.

  • Best score: 19
  • Best player score: 20
  • Position: #53 / 228
  • Number of attempts: 2
Delete the last function argument in python. - 611 entries

Delete the last function argument in this python script.

  • Best score: 6
  • Best player score: 7
  • Position: #124 / 221
  • Number of attempts: 1
Create json from a .env file - 1682 entries

A simple everyday task.

  • Best score: 38
  • Best player score: 78
  • Position: #302 / 411
  • Number of attempts: 2
Reordering properties - 1371 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: 69
  • Position: #135 / 297
  • Number of attempts: 1
YAML to dotenv - 1617 entries

Convert this YAML config file to a .env file.

  • Best score: 16
  • Best player score: 33
  • Position: #253 / 339
  • Number of attempts: 1
Swap columns and transform to CSV format - 487 entries

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

  • Best score: 16
  • Best player score: 19
  • Position: #111 / 175
  • Number of attempts: 1
Fix the git merge conflicts - 348 entries

Solve the merge conflicts in the Python file

  • Best score: 36
  • Best player score: 60
  • Position: #65 / 104
  • Number of attempts: 1
Fix the Scala Method - 374 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: 25
  • Position: #69 / 123
  • Number of attempts: 1
Change class fields from camel case to snake case - 664 entries

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

  • Best score: 18
  • Best player score: 23
  • Position: #88 / 153
  • Number of attempts: 1
Change class fields from snake case to camel case - 322 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #71 / 121
  • Number of attempts: 1
Reorganize Pokémon - 875 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 26
  • Position: #190 / 240
  • Number of attempts: 2
Replace csv column if it's not empty - 310 entries

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

  • Best score: 15
  • Best player score: 21
  • Position: #88 / 100
  • Number of attempts: 1
extract struct tag in go - 164 entries

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

  • Best score: 29
  • Best player score: 50
  • Position: #33 / 49
  • Number of attempts: 2
CaN yOuR ViM dO ThAt? #2 - 111 entries

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

  • Best score: 49
  • Best player score: 87
  • Position: #24 / 29
  • Number of attempts: 2
CaN yOuR ViM dO ThAt? #1 - 297 entries

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

  • Best score: 41
  • Best player score: 47
  • Position: #83 / 118
  • 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: 73
  • Position: #62 / 82
  • Number of attempts: 1
Fix timezone format - 372 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: 19
  • Position: #84 / 120
  • Number of attempts: 1
Search different SQL column with similar where clause - 363 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: 32
  • Position: #69 / 87
  • Number of attempts: 1
Move to corresponding lines - 334 entries

Move the values to the corresponding lines.

  • Best score: 16
  • Best player score: 39
  • Position: #70 / 76
  • Number of attempts: 1
Rearrange array to single level - 1829 entries

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

  • Best score: 14
  • Best player score: 27
  • Position: #167 / 307
  • Number of attempts: 3
Rearrange array to one line - 889 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #70 / 205
  • Number of attempts: 1
Copy punctuation - 739 entries

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

  • Best score: 19
  • Best player score: 59
  • Position: #149 / 181
  • Number of attempts: 2
New teacher - 1527 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 30
  • Position: #245 / 319
  • Number of attempts: 1
Remove line numbers - 786 entries

From http://web.archive.org/web/20140831121704/http://dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php#investigatingthestackwithgdb.

  • Best score: 8
  • Best player score: 15
  • Position: #123 / 209
  • Number of attempts: 1
Python dataclasses - 1253 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 27
  • Position: #188 / 313
  • Number of attempts: 2
Easy modification of ssh config - 406 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 30
  • Position: #77 / 119
  • Number of attempts: 1
Hogwarts Email Sorting - 954 entries

Given a list of emails, get the students full name and their associated house.

  • Best score: 20
  • Best player score: 26
  • Position: #224 / 272
  • Number of attempts: 1
Swap values inside brackets - 2551 entries

Easy challenge.

  • Best score: 13
  • Best player score: 23
  • Position: #496 / 594
  • Number of attempts: 1
remove lines containing the word "reader" - 3652 entries

easy stuff

  • Best score: 9
  • Best player score: 11
  • Position: #955 / 1185
  • Number of attempts: 2
Com(m)a Trouble - 3993 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 30
  • Position: #799 / 910
  • Number of attempts: 1
Box it - 8003 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 29
  • Position: #1379 / 1901
  • Number of attempts: 1
Extract argument from function - 2427 entries

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

  • Best score: 13
  • Best player score: 17
  • Position: #656 / 772
  • Number of attempts: 1
That hyphen - 2646 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 13
  • Position: #547 / 711
  • Number of attempts: 1
Basic renumbering - 5736 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 21
  • Position: #959 / 1280
  • Number of attempts: 1
Vice versa - 8019 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1469 / 2157
  • Number of attempts: 1
Replace and keep the case - 471 entries

Replace all instance of plugin and Plugin to device and Device.

  • Best score: 26
  • Best player score: 36
  • Position: #108 / 123
  • Number of attempts: 2
One to Ten - 2258 entries

Generate the sequence of numbers from 1 to 10, one number per line. Inspired by this Reddit thread: https://redd.it/ak4it2

  • Best score: 12
  • Best player score: 15
  • Position: #557 / 688
  • Number of attempts: 1
Increment each number - 1067 entries

Increment each number individually by one

  • Best score: 15
  • Best player score: 30
  • Position: #231 / 260
  • Number of attempts: 1
Delete to the end of the current line - 882 entries

Delete to the end of the current line, but keep the character under the cursor.

  • Best score: 5
  • Best player score: 6
  • Position: #384 / 418
  • Number of attempts: 1
Put the months in order - 1001 entries

Our contractor thought that months should be in alphabetical order. Put them in calendar order please.

  • Best score: 20
  • Best player score: 57
  • Position: #149 / 168
  • Number of attempts: 2
Array transposition - 2481 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 29
  • Position: #375 / 461
  • Number of attempts: 2
Space out the alphabet - 1693 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 31
  • Position: #438 / 457
  • Number of attempts: 1
Mute the second method of this script - 464 entries

prepend a # infront of every line of the second method

  • Best score: 8
  • Best player score: 10
  • Position: #226 / 245
  • Number of attempts: 1
Sorting database text output - 236 entries

Sometimes it is nice to be able to quickly take column-formatted text output from the SQL command line and turn it into a list of useful data. In this case we want a unique, sorted list of the values from the second column combined into one comma-separated list. What is the fewest strokes you can do this in?

  • Best score: 24
  • Best player score: 30
  • Position: #79 / 87
  • Number of attempts: 1
Condensed Cases - 827 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 22
  • Position: #234 / 254
  • Number of attempts: 1
Happy TvvO - 439 entries

Don’t forget the past, learn from it. Happy New Year.

  • Best score: 12
  • Best player score: 12
  • Position: #161 / 211
  • Number of attempts: 1
-a-b-c- - 3241 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Position: #885 / 1146
  • Number of attempts: 1
Count both ways - 1052 entries

Right AND down.

  • Best score: 13
  • Best player score: 17
  • Position: #323 / 361
  • Number of attempts: 1
Do you demand a shrubbery? - 1207 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 20
  • Position: #176 / 309
  • Number of attempts: 1
Don't know what this is - 2067 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 16
  • Position: #551 / 595
  • Number of attempts: 1
Where should I put the Newline? - 911 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #419 / 450
  • Number of attempts: 1
Shuffle puzzle - 377 entries

Sort the lines in each indent group, and sort the groups. That's the pattern. Or just move lines around manually to get a better score.

  • Best score: 13
  • Best player score: 16
  • Position: #88 / 108
  • Number of attempts: 1
NATO phonetic alphabet - 547 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 29
  • Position: #184 / 199
  • Number of attempts: 1
SFD-ROC: The Quick Brown Fox - 212 entries

Someone has vandalized our text (again). Please fix to read: The Quick Brown Fox Jumps Over The Lazy Dog.

  • Best score: 24
  • Best player score: 28
  • Position: #83 / 110
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 456 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 12
  • Position: #180 / 199
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1642 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 15
  • Position: #424 / 457
  • Number of attempts: 1
Saving the hashes(#) - 2116 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 30
  • Position: #406 / 488
  • Number of attempts: 1
Let's play some Ivmgolf - 1162 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 15
  • Position: #447 / 459
  • Number of attempts: 1
you're stuck on jQuery < 1.7 - 401 entries

replace calls to jQuery 1.7+'s `on` with calls to pre 1.7 `bind`

  • Best score: 25
  • Best player score: 32
  • Position: #81 / 116
  • Number of attempts: 2
Vertical Limit - 2637 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 29
  • Position: #667 / 778
  • Number of attempts: 1
Insert a Markdown link - 473 entries

Put a link in a markdown document, using the after-the-paragraph format.

  • Best score: 22
  • Best player score: 28
  • Position: #129 / 157
  • Number of attempts: 1
Sort and add attributes - 1591 entries

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

  • Best score: 33
  • Best player score: 37
  • Position: #506 / 615
  • Number of attempts: 1
Reconstruct the Sentence - 1745 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 19
  • Best player score: 25
  • Position: #379 / 457
  • Number of attempts: 2
Whitespace, empty lines and tabs - 4044 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 55
  • Position: #830 / 862
  • Number of attempts: 1
Simple text editing with Vim - 13626 entries

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

  • Best score: 13
  • Best player score: 24
  • Position: #3269 / 3902
  • Number of attempts: 1
Nıklas Rıeken
Twitter2:

#computerscience #optimization #vim #guitar #ukulele #kfcuerdingen #jets #mets #effectivealtruism #istillbelieve #nosteponsnek

entered into 66 challenges

contributed 0 challenges