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

Interweave two blocks of text - 692 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: 19
  • Position: #160 / 217
  • Number of attempts: 2
Block Fun 1 - 245 entries

Manipulate the columns to produce desired result.

  • Best score: 14
  • Best player score: 20
  • Position: #35 / 79
  • Number of attempts: 1
Groups magic - 173 entries

Regexp or macros for string converting: (a) -> ___ (abc) -> ____ (abcd) -> ______ All in the '(' replace to _ multiply by char count + ()

  • Best score: 13
  • Best player score: 15
  • Position: #78 / 100
  • Number of attempts: 1
Dehamlizing - 193 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 37
  • Position: #14 / 73
  • Number of attempts: 2
NATO phonetic alphabet - 547 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 21
  • Position: #64 / 199
  • Number of attempts: 2
Vertical Limit - 2637 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 23
  • Position: #199 / 778
  • Number of attempts: 1
Exchanging Quotes - 878 entries

Sometimes you need to exchange a choice of quotes in some code.

  • Best score: 30
  • Best player score: 35
  • Position: #92 / 234
  • Number of attempts: 1
replacing each line of a block selection - 3068 entries

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

  • Best score: 18
  • Best player score: 21
  • Position: #305 / 789
  • Number of attempts: 1
constructor - 198 entries

coding a constructor for a simple class

  • Best score: 59
  • Best player score: 67
  • Position: #12 / 62
  • Number of attempts: 5
switch variable - 5128 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #36 / 1764
  • Number of attempts: 7
The meaning - 588 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #18 / 368
  • Number of attempts: 1
Ugly spreadsheet copy/paste to CSV - 1046 entries

convert an ugly spreadsheet copy/paste into a CSV format.

  • Best score: 19
  • Best player score: 23
  • Position: #64 / 199
  • Number of attempts: 5
Replacing some words - 445 entries

How fast could it be?

  • Best score: 17
  • Best player score: 21
  • Position: #75 / 152
  • Number of attempts: 2
formatted text to markdown - 193 entries

You're converting some posts from an old blog to markdown. The formatted text is far closer to the finished product than the html markup, so it seems like a good place to start. Word wrapping seems to be the main area for optimization.

  • Best score: 70
  • Best player score: 75
  • Position: #25 / 69
  • Number of attempts: 2
Make it more readable - 2039 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Position: #224 / 658
  • Number of attempts: 2
Line Zipper - 480 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 15
  • Position: #93 / 217
  • Number of attempts: 1
PHP <--> Java class conversion Part 2 - 98 entries

Same class but reverse!

  • Best score: 79
  • Best player score: 121
  • Position: #19 / 39
  • Number of attempts: 1
Case preserving word replacement - 477 entries

Half way through my project, my people turned into dogs. Now I have to change everything in my source.

  • Best score: 19
  • Best player score: 19
  • Position: #33 / 186
  • Number of attempts: 3
imports alignment (python) - 725 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 33
  • Position: #171 / 203
  • Number of attempts: 1
Rotating Philosophers Problem - 421 entries

Can you help the philosophers find a good place to sit before they get five forks and spaghetti?

  • Best score: 29
  • Best player score: 30
  • Position: #71 / 169
  • Number of attempts: 1
Reformat long lines - 388 entries

Rearrange this ruby method call to put each parameter on its own line. Could become a useful macro.

  • Best score: 15
  • Best player score: 15
  • Position: #12 / 141
  • Number of attempts: 4
Insert a Markdown link - 473 entries

Put a link in a markdown document, using the after-the-paragraph format.

  • Best score: 22
  • Best player score: 25
  • Position: #84 / 157
  • Number of attempts: 2
Numbering a List - 1969 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Position: #229 / 661
  • Number of attempts: 3
Java Array2List - 239 entries

Convert an java array initializer into a list.

  • Best score: 67
  • Best player score: 105
  • Position: #49 / 88
  • Number of attempts: 2
Assignment Alignment - 909 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 26
  • Position: #127 / 226
  • Number of attempts: 2
A Simple One - 1093 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: #255 / 681
  • Number of attempts: 1
Increment, increment, increment.... - 709 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #230 / 417
  • Number of attempts: 1
Reformat a C golf submission - 681 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: 27
  • Position: #54 / 222
  • Number of attempts: 1
Deleting folded text - 429 entries

The text below contains three folds. Delete them (and the text inside them). For example: 123 456 /*{{{*/ 789 /*}}}*/ 012 Should become: 123 012 Also, add `aoeuaoeu` to make sure small solutions don't get flagged as cheating.

  • Best score: 17
  • Best player score: 20
  • Position: #60 / 131
  • Number of attempts: 2
Add fold markers to a .c file - 739 entries

Fold markers can make it easier to navigate source code. Add them to this .c file.

  • Best score: 27
  • Best player score: 34
  • Position: #78 / 203
  • Number of attempts: 1
Reconstruct the Sentence - 1754 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 19
  • Best player score: 20
  • Position: #57 / 458
  • Number of attempts: 6
Whitespace, empty lines and tabs - 4054 entries

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

  • Best score: 16
  • Best player score: 27
  • Position: #489 / 866
  • Number of attempts: 1
Simple text editing with Vim - 13645 entries

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

  • Best score: 13
  • Best player score: 22
  • Position: #3080 / 3907
  • Number of attempts: 1
Tesnorth
Twitter:

entered into 33 challenges

contributed 0 challenges