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

months to html list items - 1139 entries

Turn the months into list items.

  • Best score: 22
  • Best player score: 25
  • Position: #116 / 309
  • Number of attempts: 7
EDN reformat - 1218 entries

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

  • Best score: 17
  • Best player score: 34
  • Position: #132 / 172
  • Number of attempts: 4
Find fix point of cos - 1485 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: #220 / 434
  • Number of attempts: 3
Paste a column after a column - 2666 entries

This task is very common while using multi-cursor. What is the elegant vim way ?

  • Best score: 14
  • Best player score: 23
  • Position: #387 / 577
  • Number of attempts: 4
Tabbed Table to Python Array - 769 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: 86
  • Position: #165 / 184
  • Number of attempts: 2
HS exam question - 1611 entries

Convert the data to a python dictionary

  • Best score: 47
  • Best player score: 127
  • Position: #386 / 421
  • Number of attempts: 1
delete swap - 1880 entries

delete all swap

  • Best score: 5
  • Best player score: 5
  • Position: #319 / 575
  • Number of attempts: 10
Fix the shell script! - 2676 entries

Fix the shell script with the fewest keystrokes!

  • Best score: 26
  • Best player score: 38
  • Position: #399 / 622
  • Number of attempts: 4
simple replacements - 1873 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 42
  • Position: #389 / 401
  • Number of attempts: 3
Inverting Lines - 1956 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 17
  • Position: #438 / 524
  • Number of attempts: 6
Rural Post - 4595 entries

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

  • Best score: 9
  • Best player score: 13
  • Position: #678 / 1121
  • Number of attempts: 1
Satisfy the go linter - 2482 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 37
  • Position: #443 / 494
  • Number of attempts: 2
Yo To Hello - 1154 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 12
  • Position: #498 / 535
  • Number of attempts: 2
Replace pattern with 1, 2, 3, ... on each line - 1158 entries

For each line replace a search pattern (in this case $) with numbers starting at 1 and then increasing by 1 for each replaced match. a$b$c$ -> a0b1c2

  • Best score: 21
  • Best player score: 40
  • Position: #199 / 234
  • Number of attempts: 4
prepend * to every non-blank line - 6388 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 20
  • Position: #1328 / 1559
  • Number of attempts: 2
Bad Copy Syntax - 2079 entries

Copy should be from right to left, but sometimes you type it wrong.

  • Best score: 18
  • Best player score: 60
  • Position: #529 / 541
  • Number of attempts: 1
Extract argument from function - 2399 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 21
  • Position: #728 / 767
  • Number of attempts: 2
That hyphen - 2624 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 19
  • Position: #679 / 708
  • Number of attempts: 2
Just the middle - 11590 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3205 / 4246
  • Number of attempts: 5
Python Hello World! Reformatting - 1015 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 44
  • Position: #260 / 390
  • Number of attempts: 2
Adam's challenge - 1018 entries

Change both normal to bold and 4 by 2. Adam Wathan challenge this on twitter . He did it in 11 keystrokes on Sublime.

  • Best score: 18
  • Best player score: 26
  • Position: #254 / 278
  • Number of attempts: 7
Vice versa - 8011 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1457 / 2153
  • Number of attempts: 4
Order and join - 1030 entries

There's something special about the input order.

  • Best score: 10
  • Best player score: 11
  • Position: #147 / 264
  • Number of attempts: 8
Join 'em - 255 entries

This shouldn't be too tough

  • Best score: 4
  • Best player score: 4
  • Position: #23 / 154
  • Number of attempts: 1
Change your calendar - 421 entries

Happy New Year!

  • Best score: 18
  • Best player score: 58
  • Position: #86 / 89
  • Number of attempts: 7
-a-b-c- - 3233 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #740 / 1143
  • Number of attempts: 2
Count both ways - 1035 entries

Right AND down.

  • Best score: 13
  • Best player score: 15
  • Position: #136 / 358
  • Number of attempts: 4
Where should I put the Newline? - 897 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 7
  • Position: #221 / 445
  • Number of attempts: 4
Mess in revision history - 1228 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 73
  • Position: #254 / 256
  • Number of attempts: 3
SFD-ROC: vimvimvim - 1641 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 8
  • Position: #129 / 456
  • Number of attempts: 10
Let's play some Ivmgolf - 1151 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Position: #142 / 456
  • Number of attempts: 6
replacing each line of a block selection - 3041 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 25
  • Position: #555 / 786
  • Number of attempts: 13
Append semicolon after expressions - 1068 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 15
  • Position: #397 / 424
  • Number of attempts: 2
The meaning - 580 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #321 / 365
  • Number of attempts: 4
remove dupes from array - 1362 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 26
  • Position: #261 / 339
  • Number of attempts: 3
Numbering a List - 1942 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Position: #279 / 658
  • Number of attempts: 4
CSV to JSON - 173 entries

A search for shortest vimissh way to convert CSV to JSON.

  • Best score: 56
  • Best player score: 194
  • Position: #61 / 66
  • Number of attempts: 9
Shebangs for all - 2090 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 20
  • Position: #432 / 529
  • Number of attempts: 4
Make Fancy Header - 1080 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 25
  • Position: #313 / 352
  • Number of attempts: 6
Whitespace, empty lines and tabs - 3985 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 22
  • Position: #355 / 852
  • Number of attempts: 3
Simple text editing with Vim - 13526 entries

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

  • Best score: 13
  • Best player score: 40
  • Position: #3702 / 3879
  • Number of attempts: 2
Marius Ropotica
Github:

entered into 41 challenges

contributed 0 challenges