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

From brakets to parens - 932 entries

This is one of the most common problem when you wrap an array for error handling. Vim is useful when you convert foo[i][j][k] into foo(i, j, k) for many times.

  • Best score: 24
  • Best player score: 87
  • Position: #210 / 215
  • Number of attempts: 1
Search different SQL column with similar where clause - 322 entries

Replace a column in the where clause and convert all numbers from text to numeric, by replacing the leading 0 with the code 359.

  • Best score: 22
  • Best player score: 24
  • Position: #31 / 74
  • Number of attempts: 12
Find fix point of cos - 1468 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: #269 / 431
  • Number of attempts: 9
swap number pairs - 2169 entries

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

  • Best score: 16
  • Best player score: 40
  • Position: #334 / 393
  • Number of attempts: 2
Wrap the text of an email message to 79 characters - 852 entries

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

  • Best score: 5
  • Best player score: 5
  • Position: #342 / 441
  • Number of attempts: 4
Search and Replace 0 - 5042 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #897 / 1643
  • Number of attempts: 5
SFD-ROC: vimvimvim - 1620 entries

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

  • Best score: 8
  • Best player score: 20
  • Position: #444 / 450
  • Number of attempts: 1
Ruby 1.9 hashes - 1277 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 12
  • Best player score: 19
  • Position: #363 / 413
  • Number of attempts: 8
Shebangs for all - 2062 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: 24
  • Position: #484 / 525
  • Number of attempts: 3
Make Fancy Header - 1079 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 22
  • Position: #277 / 351
  • Number of attempts: 5
Reformat a C golf submission - 629 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: 32
  • Position: #120 / 214
  • Number of attempts: 2
Reverse characters in a line - 806 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 12
  • Best player score: 13
  • Position: #98 / 271
  • Number of attempts: 11
Sort and add attributes - 1557 entries

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

  • Best score: 33
  • Best player score: 33
  • Position: #311 / 601
  • Number of attempts: 5
Reconstruct the Sentence - 1697 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: 28
  • Position: #400 / 445
  • Number of attempts: 2
Braces or Brackets? - 1140 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 50
  • Position: #257 / 349
  • Number of attempts: 6
Whitespace, empty lines and tabs - 3949 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #191 / 841
  • Number of attempts: 16
Flodder-challenge - 1443 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 30
  • Position: #98 / 369
  • Number of attempts: 9
Simple text editing with Vim - 13419 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #757 / 3846
  • Number of attempts: 8
Reformat/Refactor a Golfer Class - 7509 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 7
  • Best player score: 32
  • Position: #185 / 1848
  • Number of attempts: 23
donghwanjin
Github:

entered into 19 challenges

contributed 0 challenges