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 - 1268 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 / 278
  • Number of attempts: 1
EDN reformat - 840 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 / 120
  • Number of attempts: 4
Find fix point of cos - 1016 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: #92 / 296
  • Number of attempts: 2
Insert column data on Confluence-style table - 415 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 / 94
  • Number of attempts: 5
Filter number combinations that don't add to 11 - 346 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 / 103
  • Number of attempts: 2
Tabbed Table to Python Array - 604 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: #50 / 158
  • Number of attempts: 2
HS exam question - 1416 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 57
  • Position: #91 / 381
  • Number of attempts: 3
hello-world-vimgolf - 2294 entries

Simple number generation

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

Simple challenge for frequent action while programming.

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 53
  • Position: #237 / 303
  • 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 - 2000 entries

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

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

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

  • Best score: 9
  • Best player score: 13
  • Position: #640 / 1064
  • 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 - 33343 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: #2517 / 7356
  • Number of attempts: 3
Swap values - 4534 entries

Well, swap the values...

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

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

  • Best score: 5
  • Best player score: 5
  • Position: #221 / 383
  • 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 - 2837 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 / 634
  • Number of attempts: 5
Just the middle - 11345 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2256 / 4159
  • 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 - 7761 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1239 / 2093
  • 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 - 184 entries

The numbers are OK. The letters are wonky.

  • Best score: 12
  • Best player score: 12
  • Position: #12 / 67
  • 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 - 15918 entries

Oops.

  • Best score: 10
  • Best player score: 17
  • Position: #2859 / 4158
  • Number of attempts: 1
-a-b-c- - 3169 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Position: #817 / 1126
  • Number of attempts: 1
Count both ways - 995 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #253 / 349
  • Number of attempts: 1
Gray area - 724 entries

It's a golf metaphor or something.

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

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1546 / 3943
  • 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 - 5026 entries

how fast can you switch two variable ?

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

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

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

entered into 38 challenges

contributed 0 challenges