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

Quicksort - 1559 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: #8 / 344
  • Number of attempts: 1
EDN reformat - 1055 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #4 / 147
  • Number of attempts: 4
Find fix point of cos - 1138 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: 15
  • Position: #97 / 341
  • Number of attempts: 2
Insert column data on Confluence-style table - 426 entries

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

  • Best score: 33
  • Best player score: 34
  • Position: #13 / 100
  • Number of attempts: 5
Filter number combinations that don't add to 11 - 376 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: #18 / 110
  • Number of attempts: 2
Tabbed Table to Python Array - 644 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: 56
  • Position: #53 / 167
  • Number of attempts: 2
HS exam question - 1510 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 57
  • Position: #94 / 397
  • Number of attempts: 3
hello-world-vimgolf - 2362 entries

Simple number generation

  • Best score: 10
  • Best player score: 10
  • Position: #272 / 668
  • Number of attempts: 1
Making 3 line function a one liner. - 306 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #151 / 195
  • Number of attempts: 1
Modernise code - 1336 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 53
  • Position: #241 / 309
  • Number of attempts: 1
Staircase - 137 entries

Going downstairs, while singing the alphabet song. Some vb practice to us all. Would it be much easier to make it go from left to right instead?

  • Best score: 21
  • Best player score: 42
  • Position: #25 / 31
  • Number of attempts: 5
swap number pairs - 2011 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #108 / 370
  • Number of attempts: 5
Rural Post - 4368 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 13
  • Position: #645 / 1072
  • Number of attempts: 1
Levenshtein distance - 104 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: 27
  • Position: #1 / 36
  • Number of attempts: 3
Simple, Practical, and Common - 33385 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 23
  • Position: #2521 / 7364
  • Number of attempts: 3
Swap values - 4543 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 11
  • Position: #112 / 1257
  • Number of attempts: 5
Wrap the text of an email message to 79 characters - 680 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Position: #221 / 387
  • Number of attempts: 1
Every other line - 2886 entries

AaAaAaA

  • Best score: 12
  • Best player score: 13
  • Position: #115 / 700
  • Number of attempts: 4
Copy three lines - 2840 entries

If the site is up (by some miracle), make the text under every header identical.

  • Best score: 13
  • Best player score: 13
  • Position: #29 / 635
  • Number of attempts: 5
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2258 / 4164
  • Number of attempts: 1
Fiddle percentages into real numbers - 840 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 16
  • Position: #188 / 287
  • Number of attempts: 1
Vice versa - 7805 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1244 / 2101
  • Number of attempts: 1
Free hyphen! - 159 entries

Just like "Inner hyphens", but I'm giving you a free hyphen to play with. Will your solution be any different?

  • Best score: 9
  • Best player score: 11
  • Position: #69 / 85
  • Number of attempts: 1
Paragraph breaks - 505 entries

Swap the blank lines and the aaa lines.

  • Best score: 10
  • Best player score: 10
  • Position: #15 / 165
  • Number of attempts: 4
Maze path - 36 entries

Follow the given motions and mark your path with Xs. Attention: This maze is quite big (20x20), please set your terminal size to at least 82.

  • Best score: 25
  • Best player score: 27
  • Position: #7 / 15
  • Number of attempts: 3
Restore order to the alphabet - 188 entries

The numbers are OK. The letters are wonky.

  • Best score: 12
  • Best player score: 12
  • Position: #12 / 68
  • Number of attempts: 1
From A to B - 564 entries

Mirror and change this text block

  • Best score: 16
  • Best player score: 18
  • Position: #101 / 155
  • Number of attempts: 2
camel riding - 769 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 16
  • Position: #149 / 274
  • Number of attempts: 3
Fill visual area - 82 entries

Just have fun!

  • Best score: 20
  • Best player score: 20
  • Position: #9 / 36
  • Number of attempts: 3
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 17
  • Position: #2862 / 4161
  • Number of attempts: 1
-a-b-c- - 3176 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Position: #820 / 1129
  • Number of attempts: 1
Count both ways - 1001 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #255 / 351
  • Number of attempts: 1
Gray area - 732 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 12
  • Position: #94 / 268
  • Number of attempts: 3
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1546 / 3946
  • Number of attempts: 1
Delete unwanted lines - 396 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 9
  • Position: #159 / 225
  • Number of attempts: 1
199 Fibonacci Numbers - 39 entries

Generate 199 Fibonacci Numbers using, if you like, the function S(x,y), a vimscript to sum two big numbers in reverse order.

  • Best score: 51
  • Best player score: 65
  • Position: #9 / 17
  • Number of attempts: 2
switch variable - 5036 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #441 / 1736
  • Number of attempts: 2
Simple text editing with Vim - 12290 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1521 / 3581
  • Number of attempts: 3
jinx balotchnik
Twitter:

entered into 38 challenges

contributed 0 challenges