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

Todo list specification - 288 entries

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

  • Best score: 37
  • Best player score: 39
  • Number of attempts: 1
Split the words - 334 entries

Add the spaces manually if you must, but if you use Vim's spell checking feature wisely, I think you'll save a LARGE number of strokes.

  • Best score: 18
  • Best player score: 34
  • Number of attempts: 3
Do you demand a shrubbery? - 1001 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 32
  • Number of attempts: 1
simple format - 2377 entries

make it look better.

  • Best score: 20
  • Best player score: 25
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 5464 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 32
  • Best player score: 36
  • Number of attempts: 2
Back to the roots - 37 entries

Johnny has a file with more integers. He wants to change each number with its square root. Can you help him?

  • Best score: 5
  • Best player score: 23
  • Number of attempts: 1
Basic renumbering - 4511 entries

Renumbering Basic.

  • Best score: 2
  • Best player score: 18
  • Number of attempts: 2
sort python functions and methods alphabetically - 13 entries

* sort functions in the python file alphabetically * sort functions within a Class alphabetically * sort Classes alphabetically

  • Best score: 20
  • Best player score: 24
  • Number of attempts: 2
From argument to object - 1051 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: 18
  • Number of attempts: 2
switch variable - 4251 entries

how fast can you switch two variable ?

  • Best score: 3
  • Best player score: 12
  • Number of attempts: 1
V to the i - 3801 entries

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

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 5
Swap values - 3420 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 7
Team names - 1397 entries

The team names are misspelled.

  • Best score: 13
  • Best player score: 19
  • Number of attempts: 1
Number Sort - 235 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: 3
One number per line - 12155 entries

Just give me the numbers.

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

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 6
comment and uncomment code inline - 769 entries

It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 6
Collect List - 3411 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 8
Just the middle - 8983 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 3
Array propagate - 227 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 25
  • Number of attempts: 2
Condensed Cases - 675 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 1
Words in parens - 10849 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 3
remove lines containing the word "reader" - 1282 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 2
Flip the bit - 68 entries

Change the specific 0 to a 1.

  • Best score: 8
  • Best player score: 10
  • Number of attempts: 1
Letter case trickery - 1426 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 11
  • Number of attempts: 3
One to Ten - 774 entries

Generate the sequence of numbers from 1 to 10, one number per line. Inspired by this Reddit thread: https://redd.it/ak4it2

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 3
Gray area - 625 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 3
Simple, Practical, and Common - 24051 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: 15
Increment each number - 393 entries

Increment each number individually by one

  • Best score: 6
  • Best player score: 21
  • Number of attempts: 5
Fiddle percentages into real numbers - 705 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 4
Adam's challenge - 742 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
  • Number of attempts: 5
Simple text editing with Vim - 10282 entries

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

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 3
Make it more readable - 1738 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 5
Copy three lines - 1983 entries

If the site is up (by some miracle), make the text under every header identical.

  • Best score: 13
  • Best player score: 18
  • Number of attempts: 1
-a-b-c- - 2530 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 2
Missing Library and a Typo - 654 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: 15
  • Best player score: 16
  • Number of attempts: 4
Split line with dots - 1794 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 21
  • Number of attempts: 1
I forgot quotes - 11381 entries

Oops.

  • Best score: 10
  • Best player score: 19
  • Number of attempts: 2
Array transposition - 1515 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 10
BareTull
Twitter:

entered into 39 challenges

contributed 0 challenges