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

Dehamlizing - 155 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 56
  • Number of attempts: 2
Chucking wood - 75 entries

An exercise in compressing repetitive text. For this challenge, any entry that uses keys outside the main row (such as arrow keys, Home, End, Delete, etc.) will be removed. (Esc is OK, though you should be using C-[ anyway.)

  • Best score: 51
  • Best player score: 58
  • Number of attempts: 1
remove dupes from array - 1197 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 45
  • Number of attempts: 1
7th Birthday - 163 entries

We have a bunch of numbers written from 0 to 9 in the order present in the text input file. The task is to create 7 by replacing the numbers with dashes.

  • Best score: 19
  • Best player score: 41
  • Number of attempts: 1
Exchanging Quotes - 761 entries

Sometimes you need to exchange a choice of quotes in some code.

  • Best score: 30
  • Best player score: 40
  • Number of attempts: 1
Remove noise from HTTP log - 611 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 36
  • Number of attempts: 1
Simple, Practical, and Common - 25753 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: 32
  • Number of attempts: 1
The name of the game - 582 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 1
Replacing some words - 400 entries

How fast could it be?

  • Best score: 17
  • Best player score: 20
  • Number of attempts: 4
Let's play some Ivmgolf - 923 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 12
  • Number of attempts: 1
Sort by sum of numbers in a line(?) - 45 entries

The lines with the biggest sums need to be at the top. The sums are on the right, which makes life hard. Maybe you can find a feature that will do all the work for you...

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 1
Append semicolon after expressions - 869 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 330 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 2
The meaning - 502 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
Remove semicolons after expressions - 460 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 8
  • Number of attempts: 1
Number Sort - 244 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
  • Number of attempts: 1
switch variable - 4345 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 1
Com(m)a Trouble - 1849 entries

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

  • Best score: 12
  • Best player score: 17
  • Number of attempts: 3
Extract argument from function - 2019 entries

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

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
Cleanining up 80 column concatenated text - 184 entries

1. Put the whole query on one line, remove the concatenation operators 2. Remove the double spaces that appear a few times in the query 3. Use string-interpolated variable statementPid rather than the ugly concatenation

  • Best score: 31
  • Best player score: 49
  • Number of attempts: 1
Make it more readable - 1761 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 3
Switch function arguments - 1843 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 9608 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 4
Search and Replace 0 - 4170 entries

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

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 3
Reverse and double space - 408 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 19
  • Number of attempts: 3
Paragraph breaks - 407 entries

Swap the blank lines and the aaa lines.

  • Best score: 10
  • Best player score: 13
  • Number of attempts: 3
Vertical Limit - 2126 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 26
  • Number of attempts: 2
Preferably without multi-cursor plugin - 296 entries

Originally asked as question on reddit by kpthunder: https://www.reddit.com/r/vim/comments/9fvsro/what_is_the_most_efficient_way_to_go_about/

  • Best score: 30
  • Best player score: 59
  • Number of attempts: 1
Order and join - 756 entries

There's something special about the input order.

  • Best score: 10
  • Best player score: 13
  • Number of attempts: 2
Start coding format - 119 entries

I used to start coding with following format: int main(){ -(cursor here) }

  • Best score: 22
  • Best player score: 24
  • Number of attempts: 1

Contributed Challenges

Case preserving word replacement - 389 entries

Half way through my project, my people turned into dogs. Now I have to change everything in my source.

captain_morgan
Twitter:

...did you see that?

entered into 30 challenges

contributed 1 challenges