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

Split the words - 356 entries

Add the spaces manually if you must, but if you use Vim's spell checking feature wisely, I think you'll save a LARGE number of strokes.

  • Best score: 18
  • Best player score: 20
  • Position: #14 / 108
  • Number of attempts: 8
Permutations N=4 - 60 entries

Could use backtracking or other algorithm to generate sorted numbers. Second chance !

  • Best score: 25
  • Best player score: 35
  • Position: #11 / 18
  • Number of attempts: 5
Letter case trickery - 1594 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 22
  • Position: #498 / 511
  • Number of attempts: 1
Words in parens - 12854 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #166 / 3945
  • Number of attempts: 4
NATO phonetic alphabet - 501 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 19
  • Position: #7 / 191
  • Number of attempts: 6
Create a pandoc compatible table - 182 entries

In [this vimcast][1], a featured gist from Tim Pope shows how to quickly make a simple table structure. How fast can you convert it to pandoc's markdown style? [1]: http://vimcasts.org/episodes/aligning-text-with-tabular-vim/

  • Best score: 32
  • Best player score: 52
  • Position: #40 / 53
  • Number of attempts: 3
Cleanining up 80 column concatenated text - 188 entries

1. Put the whole query on one line, remove the concatenation operators 2. Remove the double spaces that appear a few times in the query 3. Use string-interpolated variable statementPid rather than the ugly concatenation

  • Best score: 31
  • Best player score: 38
  • Position: #32 / 76
  • Number of attempts: 2
Aligning function arguments to match a specific coding style - 227 entries

Most projects have specific coding style guidelines. In this case, the argument list must be broken into a new line for each argument, with the argument names right aligned, taking into account pointers.

  • Best score: 16
  • Best player score: 17
  • Position: #19 / 68
  • Number of attempts: 5
Switch function arguments - 2078 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Position: #336 / 651
  • Number of attempts: 6
constructor - 180 entries

coding a constructor for a simple class

  • Best score: 59
  • Best player score: 108
  • Position: #39 / 58
  • Number of attempts: 2
Remove semicolons after expressions - 628 entries

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

  • Best score: 6
  • Best player score: 6
  • Position: #22 / 258
  • Number of attempts: 4
Generate Fibonacci Numbers - 262 entries

Use your super vim powers to generate Fibonacci Numbers.

  • Best score: 19
  • Best player score: 20
  • Position: #25 / 97
  • Number of attempts: 4
Generate English Alphabets - 472 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 24
  • Position: #39 / 202
  • Number of attempts: 5
Ruby 1.9 hashes - 1221 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: 14
  • Position: #197 / 401
  • Number of attempts: 6
CSV to JSON - 172 entries

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

  • Best score: 56
  • Best player score: 210
  • Position: #62 / 65
  • Number of attempts: 4
Reverse and count - 456 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: 26
  • Position: #90 / 172
  • Number of attempts: 5
The Cake is a Lie - 1286 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #50 / 512
  • Number of attempts: 3
Make Fancy Header - 1014 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 16
  • Position: #9 / 338
  • Number of attempts: 8
Simple text editing with Vim - 12281 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1127 / 3580
  • Number of attempts: 2
Ilya Ermolin
Twitter:

entered into 19 challenges

contributed 0 challenges