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

Find fix point of cos - 648 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: #62 / 181
  • Number of attempts: 2
Insert column data on Confluence-style table - 264 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 / 67
  • Number of attempts: 5
Filter number combinations that don't add to 11 - 249 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 / 81
  • Number of attempts: 2
Tabbed Table to Python Array - 486 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: #41 / 136
  • Number of attempts: 2
HS exam question - 1275 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 57
  • Position: #81 / 347
  • Number of attempts: 3
hello-world-vimgolf - 2125 entries

Simple number generation

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

Simple challenge for frequent action while programming.

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 53
  • Position: #225 / 283
  • Number of attempts: 1
Staircase - 99 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: 51
  • Position: #27 / 27
  • Number of attempts: 3
swap number pairs - 1925 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #107 / 354
  • Number of attempts: 5
Rural Post - 4290 entries

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

  • Best score: 9
  • Best player score: 13
  • Position: #631 / 1052
  • Number of attempts: 1
Levenshtein distance - 92 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 / 32
  • Number of attempts: 3
Simple, Practical, and Common - 33236 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: #2511 / 7330
  • Number of attempts: 3
Swap values - 4513 entries

Well, swap the values...

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

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

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

AaAaAaA

  • Best score: 12
  • Best player score: 13
  • Position: #114 / 695
  • Number of attempts: 4
Copy three lines - 2825 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 / 631
  • Number of attempts: 5
Just the middle - 11318 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2252 / 4152
  • Number of attempts: 1
Fiddle percentages into real numbers - 832 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: #186 / 283
  • Number of attempts: 1
Vice versa - 7687 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1231 / 2079
  • Number of attempts: 1
Free hyphen! - 156 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: #68 / 84
  • Number of attempts: 1
Paragraph breaks - 497 entries

Swap the blank lines and the aaa lines.

  • Best score: 10
  • Best player score: 10
  • Position: #15 / 163
  • Number of attempts: 4
Maze path - 35 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 / 14
  • 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 - 562 entries

Mirror and change this text block

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

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 16
  • Position: #148 / 273
  • 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 - 15880 entries

Oops.

  • Best score: 10
  • Best player score: 17
  • Position: #2850 / 4146
  • Number of attempts: 1
-a-b-c- - 3160 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Position: #815 / 1124
  • Number of attempts: 1
Count both ways - 987 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #252 / 348
  • Number of attempts: 1
Gray area - 713 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 12
  • Position: #93 / 265
  • Number of attempts: 3
Words in parens - 12821 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1543 / 3938
  • Number of attempts: 1
Delete unwanted lines - 392 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #159 / 224
  • 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 - 5012 entries

how fast can you switch two variable ?

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

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

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

entered into 36 challenges

contributed 0 challenges