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 - 33742 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: 31
  • Position: #5672 / 7447
  • Number of attempts: 1
Swap values - 4643 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 26
  • Position: #1226 / 1274
  • Number of attempts: 1
One number per line - 18776 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 46
  • Position: #3825 / 3875
  • Number of attempts: 1
V to the i - 4818 entries

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

  • Best score: 7
  • Best player score: 12
  • Position: #1813 / 1898
  • Number of attempts: 3
Add semicolons - 10887 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 12
  • Position: #1858 / 3074
  • Number of attempts: 5
remove lines containing the word "reader" - 3604 entries

easy stuff

  • Best score: 9
  • Best player score: 13
  • Position: #979 / 1169
  • Number of attempts: 7
Box it - 7916 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 41
  • Position: #1721 / 1881
  • Number of attempts: 1
Array propagate - 338 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 31
  • Position: #92 / 119
  • Number of attempts: 1
Extract argument from function - 2364 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 20
  • Position: #695 / 755
  • Number of attempts: 2
Search and Replace 0 - 5007 entries

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

  • Best score: 12
  • Best player score: 20
  • Position: #1483 / 1631
  • Number of attempts: 1
Number Sort - 314 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: 9
  • Position: #114 / 166
  • Number of attempts: 2
Collect List - 4308 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 20
  • Position: #1134 / 1192
  • Number of attempts: 2
I forgot quotes - 16038 entries

Oops.

  • Best score: 10
  • Best player score: 23
  • Position: #3907 / 4192
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10688 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Position: #2866 / 3691
  • Number of attempts: 2
Words in parens - 12967 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 29
  • Position: #3875 / 3969
  • Number of attempts: 1
Append semicolon after expressions - 1056 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 18
  • Position: #409 / 419
  • Number of attempts: 1
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 18
  • Position: #1650 / 1749
  • Number of attempts: 2
Shebangs for all - 2018 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: 28
  • Position: #506 / 519
  • Number of attempts: 5
Reverse and count - 480 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: 38
  • Position: #164 / 178
  • Number of attempts: 3
Simple text editing with Vim - 13017 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1840 / 3745
  • Number of attempts: 8
Akshay Aurora
Twitter:

Data and AI Infrastructure, Previously @Databricks @Microsoft

entered into 20 challenges

contributed 0 challenges