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

prepend * to every non-blank line - 6298 entries

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

  • Best score: 10
  • Best player score: 12
  • Position: #779 / 1535
  • Number of attempts: 2
Wrap the text of an email message to 79 characters - 750 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #147 / 405
  • Number of attempts: 2
Search and Replace 0 - 4970 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 14
  • Position: #934 / 1618
  • Number of attempts: 1
Interweave two blocks of text - 658 entries

Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?

  • Best score: 15
  • Best player score: 26
  • Position: #200 / 213
  • Number of attempts: 2
Python Hello World! Reformatting - 989 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: 43
  • Position: #158 / 379
  • Number of attempts: 2
Change your calendar - 392 entries

Happy New Year!

  • Best score: 18
  • Best player score: 26
  • Position: #35 / 87
  • Number of attempts: 1
Minimalist Limerick - 520 entries

Reproduce this lovely poem.

  • Best score: 30
  • Best player score: 37
  • Position: #99 / 174
  • Number of attempts: 2
Coordinates placeholder - 73 entries

Place coordinates instead of target search.

  • Best score: 22
  • Best player score: 25
  • Position: #20 / 38
  • Number of attempts: 1
SFD-ROC: The Quick Brown Fox - 189 entries

Someone has vandalized our text (again). Please fix to read: The Quick Brown Fox Jumps Over The Lazy Dog.

  • Best score: 24
  • Best player score: 28
  • Position: #62 / 105
  • Number of attempts: 1
Extract text from xml - 127 entries

Extract text from xml file (ignoring commented out elements) and create a one line regex.

  • Best score: 28
  • Best player score: 41
  • Position: #29 / 46
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 416 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 11
  • Position: #115 / 191
  • Number of attempts: 3
SFD-ROC: vimvimvim - 1606 entries

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

  • Best score: 8
  • Best player score: 16
  • Position: #424 / 446
  • Number of attempts: 1
Stairs Indenting - 473 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 20
  • Position: #179 / 197
  • Number of attempts: 1
Unwrap the text of an email message - 189 entries

Reverse of "Wrap the text of an email message to 79 characters". gq and gw are great for wrapping paragraphs. But sometimes other programs choke on your wrapped lines. What's the best way to un-gq?

  • Best score: 16
  • Best player score: 24
  • Position: #45 / 74
  • Number of attempts: 1
SFD-ROC: ROT13 Phonics - 101 entries

A is for apple, b is for ball, etc... This familiar phonics poem has been rotated 13 characters. Make the letter match the word.

  • Best score: 6
  • Best player score: 6
  • Position: #34 / 73
  • Number of attempts: 1
Let's play some Ivmgolf - 1118 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 13
  • Position: #415 / 445
  • Number of attempts: 1
Alphabet soup - 429 entries

Create a column of all alphabet characters organized in a funky way

  • Best score: 25
  • Best player score: 42
  • Position: #89 / 108
  • Number of attempts: 2
Switch function arguments - 2118 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Position: #357 / 657
  • Number of attempts: 1
Append semicolon after expressions - 1046 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 13
  • Position: #300 / 413
  • Number of attempts: 2
Remove semicolons after expressions - 648 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 10
  • Position: #246 / 262
  • Number of attempts: 1
switch variable - 5067 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #734 / 1746
  • Number of attempts: 1
Make it more readable - 1986 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Position: #365 / 646
  • Number of attempts: 1
Sort entries based on date - 392 entries

Sort some entries in a Ledger-file based on date.

  • Best score: 11
  • Best player score: 80
  • Position: #117 / 117
  • Number of attempts: 1
imports alignment (python) - 700 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 30
  • Position: #151 / 198
  • Number of attempts: 1
expand a list comprehension (python) - 333 entries

Please show your way to convert a list comprehension in python to an ordinary for-loop expression!

  • Best score: 42
  • Best player score: 58
  • Position: #75 / 109
  • Number of attempts: 1
Numbering a List - 1931 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 21
  • Position: #381 / 652
  • Number of attempts: 1
Shebangs for all - 1982 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: 21
  • Position: #427 / 510
  • Number of attempts: 2
A Simple One - 1043 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #299 / 659
  • Number of attempts: 1
82 bottles of beer on the wall - 310 entries

Take them down. (sorry, only 82 bottles because the problem size is limited!)

  • Best score: 106
  • Best player score: 123
  • Position: #49 / 144
  • Number of attempts: 1
Reverse and count - 473 entries

Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.

  • Best score: 18
  • Best player score: 28
  • Position: #109 / 176
  • Number of attempts: 1
Increment, increment, increment.... - 677 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #242 / 405
  • Number of attempts: 2
Sorting paragraphs - 514 entries

Order the paragraphs correctly, per prefixed index

  • Best score: 18
  • Best player score: 33
  • Position: #97 / 161
  • Number of attempts: 1
Indentation - 534 entries

Indent each line according to the right number of spaces it needs.

  • Best score: 20
  • Best player score: 26
  • Position: #68 / 177
  • Number of attempts: 2
Turn this csv list into queries - 237 entries

Transform each line of this csv file into a MySQL-ready INSERT query.

  • Best score: 98
  • Best player score: 123
  • Position: #51 / 99
  • Number of attempts: 1
The Cake is a Lie - 1330 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 13
  • Position: #490 / 523
  • Number of attempts: 1
Fix the Haiku - 293 entries

Change this slightly scrambled haiku to its unscrambled form and fix the capitalisation and punctuation along the way.

  • Best score: 28
  • Best player score: 47
  • Position: #91 / 112
  • Number of attempts: 1
Context insensitive completion 0 - 558 entries

Buried in the lines you're not supposed to add is the line "Add this line!" Add that line to the top of the file.

  • Best score: 6
  • Best player score: 12
  • Position: #229 / 242
  • Number of attempts: 2
Reformat some Python - 604 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 45
  • Position: #143 / 235
  • Number of attempts: 1
Reformat a C golf submission - 582 entries

Take this C golf submission (for the "tiny but standards-compliant Hello World program" category, naturally), and turn it into formatted C code.

  • Best score: 22
  • Best player score: 30
  • Position: #90 / 206
  • Number of attempts: 5
PEP8 Python Wrapping Comments and Code - 207 entries

According to PEP8, long flowy text and code should have different max line lengths. Code: 79 characters max Long flowy text: 72 characters max

  • Best score: 21
  • Best player score: 32
  • Position: #47 / 66
  • Number of attempts: 1
Remember FizzBuzz? - 713 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 76
  • Position: #152 / 188
  • Number of attempts: 1
Sort and add attributes - 1421 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 35
  • Position: #392 / 552
  • Number of attempts: 2
Simple text editing with Vim - 12680 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1008 / 3665
  • Number of attempts: 1
ajh
Twitter:

entered into 43 challenges

contributed 0 challenges