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

Prime Numbers - 344 entries

List the first 100 prime numbers.

  • Best score: 34
  • Best player score: 43
  • Position: #39 / 102
  • Number of attempts: 4
Search and Replace 0 - 4792 entries

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

  • Best score: 12
  • Best player score: 18
  • Position: #1278 / 1585
  • Number of attempts: 1
Generate Fibonacci Numbers - 262 entries

Use your super vim powers to generate Fibonacci Numbers.

  • Best score: 19
  • Best player score: 23
  • Position: #59 / 97
  • Number of attempts: 3
Reformat long lines - 344 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: 17
  • Position: #53 / 131
  • Number of attempts: 4
Generate English Alphabets - 473 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 25
  • Position: #96 / 202
  • Number of attempts: 1
Overall Vimgolf Rank - 170 entries

Suppose you are trying to figure out what your overall rank is at Vimgolf(the sum of all the ranks you got), and as a Vim ninja you decided to use Vim to do the job. Your solution should work for every Vimgolf profile page(The actual input file for this challenge is my Vimgolf profile page). So, direct answer insertion is considered cheating.

  • Best score: 23
  • Best player score: 24
  • Position: #12 / 57
  • Number of attempts: 4
The Universal Declaration of Human Rights, Article 1 - 148 entries

Somebody's got this slightly muddled up. See how quickly you can fix it. (I made this to experiment with buffers. I'm not actually sure whether this is faster with buffers or without.)

  • Best score: 24
  • Best player score: 28
  • Position: #51 / 69
  • Number of attempts: 1
The holy-grail may help - 345 entries

Can you find it in less than 20 strokes, Arthur?

  • Best score: 16
  • Best player score: 16
  • Position: #65 / 205
  • Number of attempts: 1
Assignment Alignment - 832 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 18
  • Position: #8 / 215
  • Number of attempts: 7
Shebangs for all - 1912 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: 15
  • Position: #253 / 500
  • Number of attempts: 8
Sorting paragraphs - 505 entries

Order the paragraphs correctly, per prefixed index

  • Best score: 18
  • Best player score: 21
  • Position: #20 / 156
  • Number of attempts: 14
PEP8 Python Wrapping Comments and Code - 187 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: 23
  • Best player score: 35
  • Position: #48 / 64
  • Number of attempts: 2
Deleting folded text - 341 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: #40 / 113
  • Number of attempts: 4
SirVer
Twitter:

entered into 13 challenges

contributed 0 challenges