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 - 33929 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: #5693 / 7489
  • Number of attempts: 1
Swap values - 4667 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 26
  • Position: #1234 / 1284
  • Number of attempts: 1
One number per line - 18840 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 46
  • Position: #3842 / 3893
  • Number of attempts: 1
V to the i - 4833 entries

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

  • Best score: 7
  • Best player score: 12
  • Position: #1817 / 1904
  • Number of attempts: 3
Add semicolons - 10923 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 12
  • Position: #1864 / 3087
  • Number of attempts: 5
remove lines containing the word "reader" - 3631 entries

easy stuff

  • Best score: 9
  • Best player score: 13
  • Position: #988 / 1179
  • Number of attempts: 7
Box it - 7987 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 41
  • Position: #1734 / 1895
  • Number of attempts: 1
Array propagate - 346 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 31
  • Position: #96 / 123
  • Number of attempts: 1
Extract argument from function - 2379 entries

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

  • Best score: 13
  • Best player score: 20
  • Position: #699 / 760
  • Number of attempts: 2
Search and Replace 0 - 5042 entries

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

  • Best score: 12
  • Best player score: 20
  • Position: #1494 / 1643
  • Number of attempts: 1
Number Sort - 321 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 / 171
  • Number of attempts: 2
Collect List - 4317 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 20
  • Position: #1136 / 1194
  • Number of attempts: 2
I forgot quotes - 16127 entries

Oops.

  • Best score: 10
  • Best player score: 23
  • Position: #3923 / 4208
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10720 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Position: #2875 / 3703
  • Number of attempts: 2
Words in parens - 13005 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 29
  • Position: #3884 / 3979
  • Number of attempts: 1
Append semicolon after expressions - 1061 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 18
  • Position: #411 / 421
  • Number of attempts: 1
switch variable - 5101 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 18
  • Position: #1656 / 1756
  • Number of attempts: 2
Shebangs for all - 2062 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: #512 / 525
  • Number of attempts: 5
Reverse and count - 486 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: #165 / 179
  • Number of attempts: 3
Simple text editing with Vim - 13419 entries

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

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

Data and AI Infrastructure, Previously @Databricks @Microsoft

entered into 20 challenges

contributed 0 challenges