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

Simple, Practical, and Common - 33866 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: 22
  • Best player score: 22
  • Position: #1029 / 7474
  • Number of attempts: 8
Swap values - 4661 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 11
  • Position: #183 / 1282
  • Number of attempts: 5
One number per line - 18831 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #279 / 3889
  • Number of attempts: 6
Separate the lines - 191 entries

Every other line is mixed up. Separate them into their original texts.

  • Best score: 11
  • Best player score: 11
  • Position: #37 / 95
  • Number of attempts: 3
V to the i - 4830 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 7
  • Position: #510 / 1903
  • Number of attempts: 2
remove lines containing the word "reader" - 3622 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #170 / 1177
  • Number of attempts: 3
Com(m)a Trouble - 3941 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 12
  • Position: #31 / 892
  • Number of attempts: 5
Box it - 7962 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Position: #607 / 1891
  • Number of attempts: 4
multiple cursor alternative - 1547 entries

from: https://www.reddit.com/r/vim/comments/6w5pfa/crosspost_from_remacs_how_would_you_do_this_in_vim/

  • Best score: 19
  • Best player score: 20
  • Position: #107 / 385
  • Number of attempts: 4
From argument to object - 1536 entries

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

  • Best score: 17
  • Best player score: 17
  • Position: #49 / 466
  • Number of attempts: 4
Every other line - 2925 entries

AaAaAaA

  • Best score: 12
  • Best player score: 13
  • Position: #206 / 707
  • Number of attempts: 5
Search and Replace 0 - 5027 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #498 / 1637
  • Number of attempts: 3
Just the middle - 11541 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #966 / 4230
  • Number of attempts: 2
Un"finnish"ed Work - 119 entries

Replace å by a, ä by a and ö by o.

  • Best score: 14
  • Best player score: 15
  • Position: #35 / 61
  • Number of attempts: 2
Todo list specification - 405 entries

The every item on the todo list must be done today. Modify the list to reflect that.

  • Best score: 37
  • Best player score: 37
  • Position: #48 / 183
  • Number of attempts: 2
Python Hello World! Reformatting - 1007 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 41
  • Position: #73 / 384
  • Number of attempts: 5
Missing Library and a Typo - 943 entries

I forgot to add a c library, please add it for me. Also I'm bad at typing so fix my typo too.

  • Best score: 14
  • Best player score: 15
  • Position: #12 / 221
  • Number of attempts: 6
Interactive git rebase changing commands - 176 entries

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

  • Best score: 14
  • Best player score: 15
  • Position: #7 / 80
  • Number of attempts: 2
Adam's challenge - 1009 entries

Change both normal to bold and 4 by 2. Adam Wathan challenge this on twitter . He did it in 11 keystrokes on Sublime.

  • Best score: 18
  • Best player score: 18
  • Position: #44 / 276
  • Number of attempts: 4
Create a table - 333 entries

Convert the given input into a formatted table

  • Best score: 16
  • Best player score: 16
  • Position: #23 / 106
  • Number of attempts: 2
Wrap text in quotes - 368 entries

All the blocks of text should be wrapped in quotation marks.

  • Best score: 16
  • Best player score: 16
  • Position: #33 / 122
  • Number of attempts: 5
ninja substitution - 1427 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 15
  • Position: #89 / 269
  • Number of attempts: 4
Vice versa - 7974 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #308 / 2146
  • Number of attempts: 6
Paragraph sort - 450 entries

My large herbivorous mammals, Vim commands, and POSIX utilities need to be sorted separately.

  • Best score: 14
  • Best player score: 14
  • Position: #29 / 125
  • Number of attempts: 4
Array transposition - 2436 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 17
  • Position: #75 / 452
  • Number of attempts: 10
Collect List - 4317 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #321 / 1194
  • Number of attempts: 3
Fix the XML - 1039 entries

The challenge consists in having a valid xml from an incomplete source.

  • Best score: 18
  • Best player score: 18
  • Position: #46 / 290
  • Number of attempts: 8
I forgot quotes - 16093 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #618 / 4202
  • Number of attempts: 5
Words in parens - 12992 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #818 / 3977
  • Number of attempts: 1
Resort and deup a CSV list - 170 entries

I'm always adding items to a sorted list. There has to be a better way dedup and resort the lists. There are multiple lists with varying lengths to discourage manual sorting. Also Australia's animals are weird.

  • Best score: 44
  • Best player score: 44
  • Position: #6 / 44
  • Number of attempts: 8
replacing each line of a block selection - 3007 entries

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

  • Best score: 18
  • Best player score: 18
  • Position: #98 / 780
  • Number of attempts: 8
Switch function arguments - 2182 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Position: #142 / 674
  • Number of attempts: 7
switch variable - 5094 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #482 / 1754
  • Number of attempts: 4
Simple text editing with Vim - 13262 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #492 / 3810
  • Number of attempts: 4
Darren Weston
Twitter:

entered into 34 challenges

contributed 0 challenges