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

hello-world-vimgolf - 1981 entries

Simple number generation

  • Best score: 10
  • Best player score: 14
  • Position: #411 / 564
  • Number of attempts: 1
Migrated to Postgres! - 268 entries

Celebration completion of this project. https://github.com/igrigorik/vimgolf/pull/322

  • Best score: 26
  • Best player score: 30
  • Position: #61 / 107
  • Number of attempts: 1
Increment number for every 10 lines - 180 entries

The file consists of 2 columns (code and percentage). We need to add 2 more columns with increasing number for 4th column (Xcols) and increment 3rd column (Ycols) only for every 10 lines with reset of 4th column

  • Best score: 25
  • Best player score: 26
  • Position: #7 / 53
  • Number of attempts: 1
simple replacements - 1264 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 19
  • Position: #3 / 283
  • Number of attempts: 3
Inverting Lines - 1562 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 10
  • Position: #28 / 423
  • Number of attempts: 8
CSV to MD format - 330 entries

To convert a CSV list to Markdown list

  • Best score: 36
  • Best player score: 36
  • Position: #5 / 77
  • Number of attempts: 8
Generate a very basic Python constructor - 292 entries

I actually needed to do this myself, so I look forward to learning how.

  • Best score: 38
  • Best player score: 52
  • Position: #43 / 85
  • Number of attempts: 1
Python dataclasses - 796 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 19
  • Position: #15 / 204
  • Number of attempts: 4
Making 3 line function a one liner. - 237 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #21 / 157
  • Number of attempts: 1
Put a cross in the square - 175 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 23
  • Position: #43 / 76
  • Number of attempts: 2
Change double quotes to single quotes, but with a twist - 263 entries

Although this challenge is in the context of a Python function, you don't need to know Python to do this challenge. It is to add contexts and interesting constraints. The file contains a function that prints a multi-line string literal. I wrote the string literal with double quotes, but then I decided to use single quotes instead, and that's your challenge. However, interestingly enough, the string itself contains single and double quotes. This means, inside the string literal, the originally escaped double quotes no longer need to be escaped, but the single quotes now need to be escaped. Note that the triple double quotes in the docstring should be left alone.

  • Best score: 22
  • Best player score: 35
  • Position: #31 / 50
  • Number of attempts: 4
Simple, Practical, and Common - 33136 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: 23
  • Position: #2560 / 7308
  • Number of attempts: 6
One number per line - 18497 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1155 / 3815
  • Number of attempts: 6
TAR archive pretty print - 22 entries

Will you use isk ?

  • Best score: 24
  • Best player score: 38
  • Position: #10 / 10
  • Number of attempts: 1
Number Sort - 299 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: #47 / 159
  • Number of attempts: 1
Just the middle - 11289 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1594 / 4144
  • Number of attempts: 4
Team names - 1790 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 18
  • Position: #323 / 575
  • Number of attempts: 1
Remember VimGolf Rules ! - 247 entries

Rules, ... and don't forget !

  • Best score: 7
  • Best player score: 8
  • Position: #66 / 132
  • Number of attempts: 1
Back to the roots - 47 entries

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

  • Best score: 23
  • Best player score: 23
  • Position: #10 / 33
  • Number of attempts: 2
Interactive git rebase changing commands - 158 entries

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

  • Best score: 15
  • Best player score: 15
  • Position: #40 / 75
  • Number of attempts: 4
sort python functions and methods alphabetically - 21 entries

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

  • Best score: 20
  • Best player score: 25
  • Position: #10 / 12
  • Number of attempts: 1
I forgot quotes - 15852 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #649 / 4136
  • Number of attempts: 8
A HAPPY NEW YEAR 2014 ! - 10566 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2226 / 3647
  • Number of attempts: 3
quotes inside quotes - 3088 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 17
  • Position: #660 / 1060
  • Number of attempts: 2
Top X - 191 entries

The End File is the Top 10 Vimgolf Leaderboard at June 29, 2013. This is a second version, with a great contribution of @udioica. X is ten in Roman,a numeric system in ancient Rome

  • Best score: 18
  • Best player score: 33
  • Position: #51 / 69
  • Number of attempts: 1
Number an outline - 246 entries

The indent and words are right, but the numbers are all wrong.

  • Best score: 25
  • Best player score: 36
  • Position: #21 / 74
  • Number of attempts: 3
Words in parens - 12790 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1183 / 3932
  • Number of attempts: 6
The Quick Brown Fox Jumps Over The Lazy Vim - 394 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: 8
  • Best player score: 10
  • Position: #19 / 184
  • Number of attempts: 3
Convert pandoc unordered list to a numbered list - 157 entries

I know it's possible to use #. in pandoc to auto-generate numbered lists, but then it's not easy to tell how many items there are when reading it in Markdown. How fast can you make the switch?

  • Best score: 20
  • Best player score: 29
  • Position: #35 / 55
  • Number of attempts: 1
Alphabet soup - 402 entries

Create a column of all alphabet characters organized in a funky way

  • Best score: 25
  • Best player score: 28
  • Position: #54 / 98
  • Number of attempts: 4
Vertical Limit - 2389 entries

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

  • Best score: 21
  • Best player score: 29
  • Position: #584 / 724
  • Number of attempts: 1
Exchanging Quotes - 801 entries

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

  • Best score: 30
  • Best player score: 44
  • Position: #198 / 221
  • Number of attempts: 1
Switch function arguments - 2002 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 16
  • Position: #563 / 634
  • Number of attempts: 2
Append semicolon after expressions - 975 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #156 / 394
  • Number of attempts: 2
Reverse and double space - 471 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Position: #124 / 190
  • Number of attempts: 2
switch variable - 4997 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1055 / 1724
  • Number of attempts: 1
The meaning - 538 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 6
  • Position: #320 / 346
  • Number of attempts: 1
Calculate the table totals - 123 entries

Go ahead... commit the treachery of using vim as a spreadsheet.

  • Best score: 33
  • Best player score: 137
  • Position: #38 / 41
  • Number of attempts: 1
remove dupes from array - 1324 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: 24
  • Position: #218 / 328
  • Number of attempts: 1
Sort and add attributes - 1250 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 34
  • Position: #293 / 505
  • Number of attempts: 3
Whitespace, empty lines and tabs - 3107 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 17
  • Position: #48 / 691
  • Number of attempts: 7
Simple text editing with Vim - 11897 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #934 / 3482
  • Number of attempts: 3
Eric Söderström
Twitter:

entered into 42 challenges

contributed 0 challenges