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

CSV to JSON - 143 entries

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

  • Best score: 56
  • Best player score: 166
  • Number of attempts: 2
SFD-ROC: vimvimvim - 1257 entries

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

  • Best score: 8
  • Best player score: 15
  • Number of attempts: 3
Number Sort - 231 entries

sort the list of newline-separated numbers incrementally. Numbers are in the range 1 to 1000, with 500 missing

  • Best score: 9
  • Best player score: 11
  • Number of attempts: 2
One number per line - 11400 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 5
The meaning - 491 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
switch variable - 4189 entries

how fast can you switch two variable ?

  • Best score: 3
  • Best player score: 12
  • Number of attempts: 4
Sort yaml structures alphabetically by root key names - 25 entries

sometimes we want to sort structures alphabetically in yaml files

  • Best score: 31
  • Best player score: 44
  • Number of attempts: 5
Collect List - 3308 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 9
Simple, Practical, and Common - 22762 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 2
  • Best player score: 22
  • Number of attempts: 4
Just the middle - 8777 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 1
Interactive git rebase changing commands - 142 entries

How to change the action of some commits in git rebase dialog.

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 2
I forgot quotes - 10876 entries

Oops.

  • Best score: 10
  • Best player score: 19
  • Number of attempts: 2
Delete to the end of the current line - 329 entries

Delete to the end of the current line, but keep the character under the cursor.

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 2
Swap values - 3316 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 15
  • Number of attempts: 2
lipsum lines - 239 entries

Convert a quoted block of text into strings in a list.

  • Best score: 28
  • Best player score: 40
  • Number of attempts: 1
Switch function arguments - 1795 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 19
  • Number of attempts: 1
Deleting folded text - 274 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: 30
  • Number of attempts: 1
Vice versa - 5635 entries

Little role switching.

  • Best score: 2
  • Best player score: 19
  • Number of attempts: 2
Words in parens - 10646 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 4
A Simple One - 828 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
  • Number of attempts: 3
Array propagate - 220 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 26
  • Number of attempts: 4
Changing URL path in CSS - 111 entries

What's the quickest way to swap out all the URLs in a CSS file? Is it wasted keystrokes using look-behinds and look-aheads? (I'm sorry for the delete/report--I made a mistake with the last one requiring an ugly search for graphic to replace with images. I just intended this to be a simple search and replace that might possibly generate some macros or normals solutions that are quicker)

  • Best score: 40
  • Best player score: 49
  • Number of attempts: 3
Table Reshuffle - 316 entries

Fix the column order in this table... also append the new 'username' column.

  • Best score: 22
  • Best player score: 45
  • Number of attempts: 2
Flodder-challenge - 804 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 47
  • Number of attempts: 4

Contributed Challenges

Switch function arguments - 1795 entries

How to switch two arguments of a function.

Interactive git rebase changing commands - 142 entries

How to change the action of some commits in git rebase dialog.

Lajos Koszti
Twitter:

whatever, foo, bar, baz, JavaScript, linux, vim

entered into 24 challenges

contributed 2 challenges