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 - 2472 entries

Simple number generation

  • Best score: 10
  • Best player score: 14
  • Position: #506 / 699
  • Number of attempts: 1
Migrated to Postgres! - 324 entries

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

  • Best score: 26
  • Best player score: 30
  • Position: #72 / 126
  • Number of attempts: 1
Increment number for every 10 lines - 229 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: #9 / 63
  • Number of attempts: 1
simple replacements - 1710 entries

The goal is to see the replacement commands in action.

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

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

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

To convert a CSV list to Markdown list

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

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

  • Best score: 38
  • Best player score: 52
  • Position: #48 / 97
  • Number of attempts: 1
Python dataclasses - 1121 entries

Simple challenge to extract fields from a Python class

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

Simple challenge for frequent action while programming.

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

Put a cross in the square

  • Best score: 20
  • Best player score: 23
  • Position: #51 / 87
  • Number of attempts: 2
Change double quotes to single quotes, but with a twist - 291 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: #36 / 55
  • Number of attempts: 4
Simple, Practical, and Common - 33483 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: #2585 / 7384
  • Number of attempts: 6
One number per line - 18673 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1171 / 3852
  • Number of attempts: 6
TAR archive pretty print - 25 entries

Will you use isk ?

  • Best score: 24
  • Best player score: 38
  • Position: #12 / 12
  • Number of attempts: 1
Number Sort - 307 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 / 165
  • Number of attempts: 1
Just the middle - 11380 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1605 / 4174
  • Number of attempts: 4
Team names - 1812 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 18
  • Position: #329 / 585
  • Number of attempts: 1
Remember VimGolf Rules ! - 260 entries

Rules, ... and don't forget !

  • Best score: 7
  • Best player score: 8
  • Position: #68 / 140
  • Number of attempts: 1
Back to the roots - 54 entries

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

  • Best score: 21
  • Best player score: 23
  • Position: #12 / 37
  • Number of attempts: 2
Interactive git rebase changing commands - 163 entries

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

  • Best score: 14
  • Best player score: 15
  • Position: #41 / 78
  • Number of attempts: 4
sort python functions and methods alphabetically - 23 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: #12 / 14
  • Number of attempts: 1
I forgot quotes - 15946 entries

Oops.

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

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2244 / 3677
  • Number of attempts: 3
quotes inside quotes - 3128 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: #670 / 1073
  • Number of attempts: 2
Top X - 192 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: #52 / 70
  • Number of attempts: 1
Number an outline - 252 entries

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

  • Best score: 25
  • Best player score: 36
  • Position: #23 / 76
  • Number of attempts: 3
Words in parens - 12868 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1193 / 3950
  • Number of attempts: 6
The Quick Brown Fox Jumps Over The Lazy Vim - 404 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: #21 / 190
  • Number of attempts: 3
Convert pandoc unordered list to a numbered list - 166 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: #36 / 57
  • Number of attempts: 1
Alphabet soup - 425 entries

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

  • Best score: 25
  • Best player score: 28
  • Position: #60 / 106
  • Number of attempts: 4
Vertical Limit - 2487 entries

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

  • Best score: 21
  • Best player score: 29
  • Position: #603 / 748
  • Number of attempts: 1
Exchanging Quotes - 824 entries

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

  • Best score: 30
  • Best player score: 44
  • Position: #203 / 227
  • Number of attempts: 1
Switch function arguments - 2085 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 16
  • Position: #578 / 653
  • Number of attempts: 2
Append semicolon after expressions - 1023 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #164 / 410
  • Number of attempts: 2
Reverse and double space - 498 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Position: #129 / 197
  • Number of attempts: 2
switch variable - 5045 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1065 / 1742
  • Number of attempts: 1
The meaning - 566 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 6
  • Position: #332 / 360
  • Number of attempts: 1
Calculate the table totals - 133 entries

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

  • Best score: 33
  • Best player score: 137
  • Position: #41 / 44
  • Number of attempts: 1
remove dupes from array - 1345 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: #221 / 333
  • Number of attempts: 1
Sort and add attributes - 1369 entries

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

  • Best score: 33
  • Best player score: 34
  • Position: #316 / 542
  • Number of attempts: 3
Whitespace, empty lines and tabs - 3508 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #62 / 758
  • Number of attempts: 7
Simple text editing with Vim - 12491 entries

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

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

entered into 42 challenges

contributed 0 challenges