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

Generate an entry for each month - 100 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: #6 / 33
  • Number of attempts: 5
Fix the git merge conflicts - 74 entries

Solve the merge conflicts in the Python file

  • Best score: 36
  • Best player score: 44
  • Position: #7 / 23
  • Number of attempts: 4
The Fibonacci Spacer - 52 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: 25
  • Best player score: 32
  • Position: #5 / 19
  • Number of attempts: 3
Replace markdown sections with numbering - 144 entries

Replace each section and subsection with their respective numbers

  • Best score: 29
  • Best player score: 53
  • Position: #15 / 43
  • Number of attempts: 5
Change class fields from camel case to snake case - 274 entries

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

  • Best score: 18
  • Best player score: 18
  • Position: #9 / 69
  • Number of attempts: 5
Reorganize Pokémon - 301 entries

Change the format of the each line and sort alphabetically.

  • Best score: 18
  • Best player score: 18
  • Position: #3 / 80
  • Number of attempts: 6
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: 15
  • Position: #3 / 38
  • Number of attempts: 6
Word completion - 179 entries

Try to complete these options within 20 keystrokes.

  • Best score: 20
  • Best player score: 24
  • Position: #21 / 50
  • Number of attempts: 4
Remove adjacent duplicates - 445 entries

Try to find a way to remove adjacent duplicate letters.

  • Best score: 19
  • Best player score: 20
  • Position: #13 / 117
  • Number of attempts: 3
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: 21
  • Position: #69 / 205
  • Number of attempts: 4
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: 22
  • Position: #18 / 121
  • Number of attempts: 7
Column wise pasting - 172 entries

Make a table from 3 columns

  • Best score: 17
  • Best player score: 24
  • Position: #16 / 37
  • Number of attempts: 5
Case matching substitution - 55 entries

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

  • Best score: 31
  • Best player score: 37
  • Position: #7 / 15
  • Number of attempts: 1
Count words - 62 entries

Merge duplicates and count each word.

  • Best score: 39
  • Best player score: 61
  • Position: #9 / 17
  • Number of attempts: 3
Mirror image - 75 entries

Add the second eye

  • Best score: 15
  • Best player score: 21
  • Position: #10 / 27
  • Number of attempts: 6
months to html list items - 1010 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 28
  • Position: #173 / 274
  • Number of attempts: 2
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: 6
  • Position: #75 / 431
  • Number of attempts: 8
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: 18
  • Position: #22 / 164
  • Number of attempts: 4
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: 75
  • Position: #25 / 83
  • Number of attempts: 9
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: #15 / 162
  • Number of attempts: 7
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: #51 / 553
  • Number of attempts: 7
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: 60
  • Position: #87 / 179
  • Number of attempts: 6
HS exam question - 1589 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 48
  • Position: #26 / 417
  • Number of attempts: 6
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: 27
  • Position: #123 / 348
  • Number of attempts: 5
Fizzbuzz - 573 entries

type the first 100 lines of the fizzbuzz problem

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

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

  • Best score: 21
  • Best player score: 28
  • Position: #49 / 113
  • 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: 16
  • Position: #59 / 221
  • Number of attempts: 12
Generate a very basic Python constructor (fixed) - 1253 entries

Original by @BiddulphCaleb (http://www.vimgolf.com/challenges/6019f1c4642668000cee11e8) - had some extra spaces in output file.

  • Best score: 29
  • Best player score: 29
  • Position: #25 / 271
  • Number of attempts: 11
Fix the shell script! - 2544 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 27
  • Position: #88 / 589
  • Number of attempts: 6
Put a newline after every 10 lines in vim - 1657 entries

Goal is to put a newline after every 10 lines in vim.

  • Best score: 10
  • Best player score: 13
  • Position: #346 / 556
  • Number of attempts: 2
Wikitext headings to markdown - 987 entries

Convert the wikitext headings to markdown.

  • Best score: 20
  • Best player score: 21
  • Position: #59 / 209
  • Number of attempts: 6
Fill in the chess board - 959 entries

Fill in the name of each square using its file (a-h) and rank (1-8).

  • Best score: 19
  • Best player score: 19
  • Position: #18 / 185
  • Number of attempts: 9
Learn to ask for :help - 587 entries

Learn to use the help to reduce your strokes...

  • Best score: 19
  • Best player score: 25
  • Position: #48 / 130
  • Number of attempts: 4
Plotting some variables in python - 1661 entries

4 sets of (x,y) variables to plot. Just increment the numbers! Well, let's change the colors of the lines as well. Oh and we meant to plot the absolute values of course.

  • Best score: 34
  • Best player score: 34
  • Position: #40 / 348
  • Number of attempts: 10
Transpose a python matrix - 873 entries

Rotate the matrix in 90 degrees.

  • Best score: 23
  • Best player score: 23
  • Position: #15 / 138
  • Number of attempts: 9
Python dataclasses - 1136 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 23
  • Position: #130 / 284
  • Number of attempts: 3
Modernise code - 1400 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 41
  • Position: #136 / 323
  • Number of attempts: 5
swap number pairs - 2103 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 20
  • Position: #142 / 380
  • Number of attempts: 3
HS Final exam vimgolf - 897 entries

Change the initial file to a single line containing all names comma-separated with numbers inside parentheses.

  • Best score: 21
  • Best player score: 22
  • Position: #77 / 236
  • Number of attempts: 10
Levenshtein distance - 105 entries

Compute distance for each pair. Notice that this recursive implementation is very inefficient. Wagner-Fischer algorithm is iterative and much faster. #vimscript

  • Best score: 27
  • Best player score: 34
  • Position: #19 / 37
  • Number of attempts: 4
Data reformat - 294 entries

Reformat this copy-paste data! #csv

  • Best score: 36
  • Best player score: 55
  • Position: #44 / 65
  • Number of attempts: 3
Get mail address from outlook format - 649 entries

Create a mail list space separated of mail list formatted by outlook

  • Best score: 15
  • Best player score: 16
  • Position: #123 / 204
  • Number of attempts: 3
Conway sequence - 26 entries

Generate the the first fifteen numbers. See here for more information: http://en.wikipedia.org/wiki/Look-and-say_sequence

  • Best score: 43
  • Best player score: 64
  • Position: #20 / 20
  • Number of attempts: 1
Pascal's Triangle - 38 entries

Generate the first 17 left-justified rows of Pascal's triangle.

  • Best score: 36
  • Best player score: 36
  • Position: #10 / 17
  • Number of attempts: 3
ShookerAndBeta
Twitter:

entered into 44 challenges

contributed 0 challenges