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

Migrated to Postgres! - 45 entries

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

  • Best score: 27
  • Best player score: 30
  • Number of attempts: 1
Increment number for every 10 lines - 20 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: 26
  • Best player score: 26
  • Number of attempts: 1
simple replacements - 339 entries

The goal is to see the replacement commands in action.

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 3
Inverting Lines - 544 entries

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

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 8
CSV to MD format - 131 entries

To convert a CSV list to Markdown list

  • Best score: 36
  • Best player score: 36
  • Number of attempts: 8
Generate a very basic Python constructor - 45 entries

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

  • Best score: 38
  • Best player score: 52
  • Number of attempts: 1
Python dataclasses - 174 entries

Simple challenge to extract fields from a Python class

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 4
Making 3 line function a one liner. - 26 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Number of attempts: 1
Put a cross in the square - 46 entries

Put a cross in the square

  • Best score: 22
  • Best player score: 23
  • Number of attempts: 2
Change double quotes to single quotes, but with a twist - 188 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
  • Number of attempts: 4
Simple, Practical, and Common - 32691 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
  • Number of attempts: 6
One number per line - 18197 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 6
TAR archive pretty print - 17 entries

Will you use isk ?

  • Best score: 24
  • Best player score: 38
  • Number of attempts: 1
Number Sort - 281 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
Just the middle - 11074 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 4
Team names - 1752 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 18
  • Number of attempts: 1
Remember VimGolf Rules ! - 225 entries

Rules, ... and don't forget !

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 1
Back to the roots - 42 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
  • Number of attempts: 2
Interactive git rebase changing commands - 155 entries

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

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 4
sort python functions and methods alphabetically - 14 entries

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

  • Best score: 20
  • Best player score: 25
  • Number of attempts: 1
I forgot quotes - 15638 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 8
A HAPPY NEW YEAR 2014 ! - 10509 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 3
quotes inside quotes - 2996 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: 3
  • Best player score: 17
  • Number of attempts: 2
Top X - 185 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
  • Number of attempts: 1
Number an outline - 210 entries

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

  • Best score: 25
  • Best player score: 36
  • Number of attempts: 3
Words in parens - 12676 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 6
The Quick Brown Fox Jumps Over The Lazy Vim - 352 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: 10
  • Number of attempts: 3
Convert pandoc unordered list to a numbered list - 141 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
  • Number of attempts: 1
Alphabet soup - 312 entries

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

  • Best score: 25
  • Best player score: 28
  • Number of attempts: 4
Vertical Limit - 2294 entries

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

  • Best score: 21
  • Best player score: 29
  • Number of attempts: 1
Exchanging Quotes - 779 entries

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

  • Best score: 30
  • Best player score: 44
  • Number of attempts: 1
Switch function arguments - 1919 entries

How to switch two arguments of a function.

  • Best score: 3
  • Best player score: 16
  • Number of attempts: 2
Append semicolon after expressions - 904 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 2
Reverse and double space - 424 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 2
switch variable - 4863 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 1
The meaning - 515 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 6
  • Number of attempts: 1
Calculate the table totals - 107 entries

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

  • Best score: 33
  • Best player score: 137
  • Number of attempts: 1
remove dupes from array - 1260 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
  • Number of attempts: 1
Sort and add attributes - 1113 entries

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

  • Best score: 33
  • Best player score: 34
  • Number of attempts: 3
Whitespace, empty lines and tabs - 2762 entries

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

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 7
Simple text editing with Vim - 11334 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
Eric Söderström
Twitter:

entered into 41 challenges

contributed 0 challenges