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 markdown sections with numbering - 144 entries

Replace each section and subsection with their respective numbers

  • Best score: 29
  • Best player score: 35
  • Position: #6 / 43
  • Number of attempts: 6
Fix the Scala Method - 106 entries

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

  • Best score: 9
  • Best player score: 22
  • Position: #11 / 39
  • Number of attempts: 4
Change class fields from camel case to snake case - 277 entries

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

  • Best score: 18
  • Best player score: 18
  • Position: #15 / 71
  • Number of attempts: 9
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: #14 / 56
  • Number of attempts: 3
Reorganize Pokémon - 303 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 18
  • Position: #7 / 81
  • Number of attempts: 6
Replace csv column if it's not empty - 95 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: #8 / 39
  • Number of attempts: 3
Convert plain text into a markdown table - 22 entries

Convert the table to markdown to make it more usable

  • Best score: 56
  • Best player score: 59
  • Position: #4 / 10
  • Number of attempts: 6
Change readonly files - 33 entries

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

  • Best score: 20
  • Best player score: 53
  • Position: #10 / 12
  • Number of attempts: 2
CaN yOuR ViM dO ThAt? #2 - 34 entries

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

  • Best score: 49
  • Best player score: 49
  • Position: #3 / 9
  • Number of attempts: 5
CaN yOuR ViM dO ThAt? #1 - 82 entries

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

  • Best score: 41
  • Best player score: 48
  • Position: #31 / 35
  • Number of attempts: 2
Append leading hyphen count to each line - 47 entries

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

  • Best score: 23
  • Best player score: 23
  • Position: #3 / 14
  • Number of attempts: 8
Move list of uuids into a SQL query - 69 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: 63
  • Position: #10 / 29
  • Number of attempts: 6
Markdown Blog Editing - 262 entries

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

  • Best score: 30
  • Best player score: 30
  • Position: #7 / 63
  • Number of attempts: 14
Word completion - 185 entries

Try to complete these options within 20 keystrokes.

  • Best score: 20
  • Best player score: 22
  • Position: #16 / 51
  • Number of attempts: 9
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: 15
  • Position: #15 / 75
  • Number of attempts: 6
Search different SQL column with similar where clause - 168 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: 22
  • Position: #10 / 45
  • Number of attempts: 9
Remove adjacent duplicates - 446 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 19
  • Position: #8 / 118
  • Number of attempts: 8
Move to corresponding lines - 241 entries

Move the values to the corresponding lines.

  • Best score: 16
  • Best player score: 18
  • Position: #14 / 53
  • Number of attempts: 11
Rearrange array to single level - 1301 entries

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

  • Best score: 14
  • Best player score: 14
  • Position: #9 / 207
  • Number of attempts: 13
Rearrange array to one line - 604 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #19 / 145
  • Number of attempts: 11
Copy punctuation - 488 entries

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

  • Best score: 19
  • Best player score: 19
  • Position: #15 / 122
  • Number of attempts: 12
Column wise pasting - 172 entries

Make a table from 3 columns

  • Best score: 17
  • Best player score: 17
  • Position: #7 / 37
  • Number of attempts: 10
Deleting text - 254 entries

Delete everything except some specific numbers.

  • Best score: 26
  • Best player score: 42
  • Position: #14 / 81
  • Number of attempts: 4
Case matching substitution - 55 entries

Swap every "lorem" for "ipsum", keeping the letter cases the same.

  • Best score: 31
  • Best player score: 31
  • Position: #6 / 15
  • Number of attempts: 10
Define Gray code states - 36 entries

List the states using Gray code and assign Gray code values to each state.

  • Best score: 56
  • Best player score: 56
  • Position: #4 / 11
  • Number of attempts: 6
Hex to binary - 91 entries

Convert hexadecimal numbers into binary format.

  • Best score: 29
  • Best player score: 31
  • Position: #4 / 19
  • Number of attempts: 10
Count words - 62 entries

Merge duplicates and count each word.

  • Best score: 39
  • Best player score: 39
  • Position: #5 / 17
  • Number of attempts: 7
String decompression - 31 entries

3a4b2c => aaabbbbcc. Start a new line when you exceed 79 columns.

  • Best score: 27
  • Best player score: 27
  • Position: #8 / 11
  • Number of attempts: 4
Format a long line - 80 entries

Reformat long lines (gq), textwidth=78, no trailing spaces.

  • Best score: 17
  • Best player score: 17
  • Position: #4 / 26
  • Number of attempts: 9
Evil Numbers - 82 entries

Print the first 100 evil numbers https://oeis.org/A001969. This is an advert for code.golf https://code.golf/evil-numbers#viml

  • Best score: 25
  • Best player score: 25
  • Position: #7 / 23
  • Number of attempts: 9
Mirror image - 75 entries

Add the second eye

  • Best score: 15
  • Best player score: 15
  • Position: #6 / 27
  • Number of attempts: 5
Find anomalies - 148 entries

There is one special character per line

  • Best score: 30
  • Best player score: 30
  • Position: #12 / 39
  • Number of attempts: 14
Coordinate extraction - 55 entries

Get the coordinates of all "M"s from the Vim logo

  • Best score: 43
  • Best player score: 63
  • Position: #13 / 16
  • Number of attempts: 4
Morse - 148 entries

Translate Morse code to Text

  • Best score: 31
  • Best player score: 35
  • Position: #12 / 33
  • Number of attempts: 6
New teacher - 925 entries

Update the details of the new CS teacher.

  • Best score: 19
  • Best player score: 19
  • Position: #17 / 196
  • Number of attempts: 8
Replace word while reserving first letter case - 604 entries

Window -> Door window -> door Windows -> Windows windows -> windows

  • Best score: 24
  • Best player score: 25
  • Position: #35 / 118
  • Number of attempts: 14
months to html list items - 1010 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 23
  • Position: #52 / 274
  • Number of attempts: 3
Quicksort - 1962 entries

We need the numbers in the first row sorted as quickly as possible! Be careful not to disturb the data below the divider though: that must remain unchanged.

  • Best score: 6
  • Best player score: 7
  • Position: #162 / 431
  • Number of attempts: 6
EDN reformat - 1158 entries

The goal is to make the code more readable and concise while maintaining its functionality.

  • Best score: 17
  • Best player score: 17
  • Position: #12 / 164
  • Number of attempts: 14
Tic-Tac-Toe Grid Transformation - 396 entries

Your mission is to efficiently convert the original Tic-Tac-Toe grid, represented by 'x's and 'o's, into a neat and well-organized game board.

  • Best score: 56
  • Best player score: 56
  • Position: #5 / 83
  • Number of attempts: 15
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: 28
  • Position: #5 / 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: 21
  • Position: #39 / 162
  • Number of attempts: 6
Remove line numbers - 736 entries

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

  • Best score: 9
  • Best player score: 12
  • Position: #81 / 198
  • Number of attempts: 10
Find fix point of cos - 1403 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: 14
  • Position: #78 / 416
  • Number of attempts: 3
Insert column data on Confluence-style table - 458 entries

Add ip addresses into new "IP" column based on the last digits from the "Server" column

  • Best score: 33
  • Best player score: 33
  • Position: #6 / 109
  • Number of attempts: 8
Surround the 'z' character with brackets, quotes, and print as formatted string. - 555 entries

Surround the 'z' character with brackets, quotes, and print as formatted string.

  • Best score: 17
  • Best player score: 17
  • Position: #235 / 310
  • Number of attempts: 2
Easier Align - 406 entries

Align the columns of a markdown table

  • Best score: 51
  • Best player score: 51
  • Position: #4 / 96
  • Number of attempts: 12
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: 14
  • Position: #109 / 553
  • Number of attempts: 8
Filter number combinations that don't add to 11 - 408 entries

Append the sum of each line to its end, alongside an equals sign, and remove any that do not sum to 11. The ordering of lines should stay the same. Note that the combinations are semi-arbitrary and not all 4-number combinations are present in the file.

  • Best score: 27
  • Best player score: 27
  • Position: #45 / 117
  • Number of attempts: 2
Tabbed Table to Python Array - 734 entries

Not payed by the hour? So make it fast ;-) The table contains the relative occurencies of bigrams (two consecutive letters) in 1/100,000 in the german language, copy-pasted from http://www.mathe.tu-freiberg.de/~hebisch/cafe/kryptographie/bigramme.html

  • Best score: 50
  • Best player score: 50
  • Position: #9 / 179
  • Number of attempts: 13
HS exam question - 1589 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 47
  • Position: #23 / 417
  • Number of attempts: 11
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: 24
  • Position: #67 / 348
  • Number of attempts: 7
Fizzbuzz - 573 entries

type the first 100 lines of the fizzbuzz problem

  • Best score: 45
  • Best player score: 45
  • Position: #5 / 168
  • Number of attempts: 15
Substraction (bis) - 603 entries

Solve the equations (adapted from the original @Caek_'s challenge).

  • Best score: 21
  • Best player score: 21
  • Position: #8 / 113
  • Number of attempts: 15
got_windy
Github:

entered into 54 challenges

contributed 0 challenges